Skip to content

ReferenceError: Vector3 is not defined in PointerLockControls #17594

@kdaimiel

Description

@kdaimiel

I am getting this error after updating three.js to the las version (0.108.0) when I try to use PointerLockControls.

   ReferenceError: Vector3 is not defined
	    at <Jasmine>
	    at new THREE.PointerLockControls (node_modules/three/examples/js/controls/PointerLockControls.js:25:12)
	    at Object.createControls (src/js/scene-factory.js:7:2946)
	    at UserContext.<anonymous> (test/js/scene-factorySpec.js:86:35)
	    at <Jasmine>

I guess this came from change c15c2d6#diff-91b9b80f02ab244e0330fd5aac0bd483 where two new functions are created moveForward and moveRight with a new vector instanced as var vec = new Vector3(); and I suppose it should be instanced as var vec = new THREE.Vector3()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions