2018-01-12 11:19:14 +01:00
|
|
|
if (!this.entityLoaded) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2018-01-12 11:22:58 +01:00
|
|
|
if (!this.initialized) {
|
|
|
|
this.camera = this.entityLoaded.camera;
|
|
|
|
this.initialized = true;
|
|
|
|
}
|
|
|
|
|
2018-01-12 13:09:51 +01:00
|
|
|
this.camera.position.x = ((window.innerWidth / 2 - data.event.clientX) / 15) + 32;
|
|
|
|
this.camera.position.y = ((window.innerHeight / 2 + data.event.clientY) / 15) - 32;
|
|
|
|
this.camera.updateInstance('position');
|
|
|
|
|
2018-01-12 13:11:11 +01:00
|
|
|
//console.log('camera x:' + this.camera.position.x + ',x: ' + data.event.clientX + ',y: ' + data.event.clientY);
|
2018-01-12 11:22:58 +01:00
|
|
|
|
2018-01-12 11:19:14 +01:00
|
|
|
//@ sourceURL=mouseMove.js
|