r3-custom-code/gzewp2awcf.js

23 lines
424 B
JavaScript
Raw Normal View History

if (!this.entityLoaded) {
return;
}
if (!this.initialized) {
this.camera = this.entityLoaded.camera;
this.buttons = this.entityLoaded.buttons;
this.raycaster = this.entityLoaded.raycaster;
this.initialized = true;
}
var mouse = {
x : (data.event.offsetX / data.event.target.width ) * 2 - 1,
y : -(data.event.offsetY / data.event.target.height) * 2 + 1
}
console.log(mouse);
//@ sourceURL=mouseDown.js