Using THREE.js with XR8.Threejs.pipelineModule()
or customThreejsPipelineModule
(from XR Web github), it’s not possible to use camera.aspect
or camera.fov
, as these value are never updated.
camera.aspect
always equals 2
and camera.fov
always equals 60
.
Looking at the code for the three.js pipeline module’s onUpdate()
function, it looks like 8th Wall is updating the camera projection matrix directly:
for (let i = 0; i < 16; i++) {
camera.projectionMatrix.elements[i] = intrinsics[i];
}
But this doesn’t update camera.aspect
or camera.fov
, so any calculations relying on these are broken - they need to be calculated from the projection matrix directly.