Update: CC - Mouse Move - Moorcow (hibvg7v1d0.js) 20 bytes modified

beta.r3js.org
-=yb4f310 2017-11-15 14:08:20 +01:00
parent a9296d4948
commit d1592692bd
1 changed files with 2 additions and 2 deletions

View File

@ -12,8 +12,8 @@ if (!this.initialized) {
this.initialized = true;
}
this.mouse.x = (event.offsetX / event.target.width ) * 2 - 1;
this.mouse.y = -(event.offsetY / event.target.height) * 2 + 1;
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;