After a long time, I revisited my three.js
project and was reminded of the days when I used to type out the full name PlaneBufferGeometry
. The project features several vehicles that are supposed to reflect their environment (and each other) through the use of CubeCamera
s. However, upon activating this feature, I encountered the following error:
Uncaught TypeError: Cannot read properties of undefined (reading 'up')
at CubeCamera.updateCoordinateSystem (three.module.js:12739:13)
at CubeCamera.update (three.module.js:12803:9)
at CLASS_drone.update (blend.levels.php:2960:19)
Here is what is happening in the context of CLASS_drone
:
function CLASS_drone(x,y,z,path,pts)
{
this.x = x;
this.y = y+0.25;
this.z = z;
this.path = path;
this.ptstart = pts;
this.pts = pts;
this.drone = new THREE.Group();
this.body = drone.clone();
this.bidx = 0;
this.widx = 0;
this.fps = 0;
...
And here is how I include three.js
in the project:
<script type="importmap">
{
"imports":
{
"three": "https://threejs.org/build/three.module.js",
"OBJLoader": "https://threejs.org/examples/jsm/loaders/OBJLoader.js"
}
}
</script>