I encountered an issue with my project that utilizes A-frame and three.js, resulting in the following error:
Uncaught TypeError: THREE.CSS3DObject is not a constructor
To reproduce the error, I used the following sample:
The source code for this sample can be found here:
https://github.com/mrdoob/three.js/blob/master/examples/css3d_periodictable.html
Adding the A-frame script to this sample led to the same error.
<script src="https://threejs.org/build/three.js"></script>
<script src="https://threejs.org/examples/js/libs/tween.min.js"></script>
<script src="https://threejs.org/examples/js/controls/TrackballControls.js"></script>
<script src="https://threejs.org/examples/js/renderers/CSS3DRenderer.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/aframe/0.7.1/aframe.js"></script>
I have questions about whether A-frame affects three.js and if they can be used together. Additionally, I am seeking solutions on how to resolve this error in the sample provided.
Any suggestions or help would be greatly appreciated!