2017-11-06 20:52:14 +01:00
|
|
|
//console.log(data);
|
2017-11-06 20:44:12 +01:00
|
|
|
|
|
|
|
var camera = GameLib.EntityManager.Instance.findComponentById('knwkksjc7n');
|
|
|
|
|
2017-11-06 20:55:56 +01:00
|
|
|
camera.lookAt.x = (data.event.x * 0.01) - 0.5;//(window.clientWidth/ 2) + data.event.x;
|
2017-11-06 20:52:14 +01:00
|
|
|
camera.lookAt.y = data.event.y * 0.01;
|
2017-11-06 20:44:12 +01:00
|
|
|
|
2017-11-06 20:52:14 +01:00
|
|
|
//if (camera.lookAt.x < -0.5) {
|
|
|
|
// camera.lookAt.x = -0.5;
|
|
|
|
//}
|
|
|
|
//var vector = new THREE.Vector3();
|
2017-11-06 20:55:56 +01:00
|
|
|
|
2017-11-06 20:52:14 +01:00
|
|
|
//vector.set(
|
|
|
|
// ( data.event.clientX / window.innerWidth ) * 2 - 1,
|
|
|
|
// - ( data.event.clientY / window.innerHeight ) * 2 + 1,
|
|
|
|
// 0.5 );
|
|
|
|
|
|
|
|
//vector.unproject( camera.instance );
|
|
|
|
|
|
|
|
//vector.x = -1 * ((window.innerWidth / 2) - (data.event.clientX));
|
|
|
|
//vector.y = 1 * ((window.innerHeight / 2) - (data.event.clientY));
|
|
|
|
//vector.z = 0;
|
|
|
|
|
|
|
|
//camera.lookAt.x = vector.x;
|
|
|
|
//camera.lookAt.y = vector.y;
|
|
|
|
//camera.lookAt.z = vector.z;
|
2017-11-06 20:44:12 +01:00
|
|
|
|
|
|
|
camera.updateInstance();
|
2017-11-06 20:38:13 +01:00
|
|
|
|
|
|
|
//@ sourceURL=mouseMove.js
|