if (!this.entityLoaded) { return; } if (!this.initialized) { this.mouse = this.entityLoaded.mouse; this.raycaster = this.entityLoaded.raycaster; this.initialized = true; } this.mouse.x = (data.event.offsetX / data.event.target.width ) * 2 - 1; this.mouse.y = -(data.event.offsetY / data.event.target.height) * 2 + 1; //this.camera.lookAt.x = this.mouse.x * 20; //this.camera.lookAt.y = this.mouse.y * 20; //this.camera.lookAt.z = 0; //this.camera.updateInstance('lookAt'); this.raycaster.setFromCamera( this.mouse, this.camera ); var distance = - this.camera.position.z / this.raycaster.direction.z; var cursorPosition = this.camera.position.clone().add( this.raycaster.direction.clone().multiply( distance, true ) ); cursorPosition.z = 3; this.lookAtTarget = cursorPosition; //var left = false; //var right = false; //var leftAmount = 0; //var rightAmount = 0; //if (data.event.movementX < 0) { // left = true; // leftAmount = Math.abs(data.event.movementX); //} //if (data.event.movementX > 0) { // right = true; // rightAmount = Math.abs(data.event.movementX); //} //this.entityLoaded.movement = { // left : left, // right : right //}; //@ sourceURL=mouseMove.js