gu-ru
August 12, 2021, 3:48am
1
Hi.
I am developing an application to display .ply files on Next.js with react-three-fiber.
I refered below example, but when I try to import the PLYLoader, it throws an error. Does anyone know of a solution?
The example I refer to
https://sbcode.net/threejs/loaders-ply/
How do I import:
import { PLYLoader } from 'three/examples/jsm/loaders/PLYLoader'
Error:
I’m afraid this is a very basic question.
drcmda
August 12, 2021, 8:41pm
2
three/jsm is untranspiled, it can’t run in node. we have made a mirror for module usage, tree-shaking and better dependency management GitHub - pmndrs/three-stdlib: Stand-alone library of threejs examples designed to run without transpilatio
import { PLYLoader } from 'three-stdlib'
this will universally help using three in node or ssr.
1 Like
gu-ru
August 13, 2021, 5:01am
3
@drcmda
Thanks for giving me a solution! It works!
Hey drcmda,
Can you email me at projects@jackapplications.com