-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Attempted import error: 'CSS3DObject/CSS3DRenderer' is not exported from 'three' (imported as 'THREE'). #16095
Comments
As mentioned at stackoverflow, For now, you have to convert them to modules by yourself or you use an Related issue: #9562 |
It's seems the only way to use new function like EXR or HDR. The problem is r110 is the latest npm version. see: https://stackoverflow.com/questions/55208134/why-am-i-getting-the-error-css3dobject-is-not-exported-from-three/55208449#55208449 mrdoob/three.js#16095 even Three.js Fundamental uses r119. There is no WebGLCubeRenderTarget in r110.
It's seems the only way to use new function like EXR or HDR. The problem is r110 is the latest npm version. see: https://stackoverflow.com/questions/55208134/why-am-i-getting-the-error-css3dobject-is-not-exported-from-three/55208449#55208449 mrdoob/three.js#16095 even Three.js Fundamental uses r119. There is no WebGLCubeRenderTarget in r110: https://threejsfundamentals.org/threejs/lessons/threejs-backgrounds.html
I'm coding with React and Three.js, trying to embed a URL but the following code gives me an
Attempted import error: 'CSS3DObject/CSS3DRenderer' is not exported from 'three' (imported as 'THREE')
:I even tried
import 'three/examples/js/renderers/CSS3DRenderer';
and some other random stuffs. It seems that Three.js is not yet ready to be used as a 'node_module'?'three/examples/jsm/renderers/CSS3DRenderer'
andthree/examples/jsm/objects/CSS3DObject
doesn't even existing yet? And I'm glad that{ OBJLoader }
can be importedfrom 'three/examples/jsm/loaders/OBJLoader'
.How can I embed a URL using Three.js in React if the needed constructors couldn't be imported? Is there an official
CSS3DObject
andCSS3DRenderer
modules for it, or any other alternative?The text was updated successfully, but these errors were encountered: