Changed stuff

This commit is contained in:
Thomas FORGIONE 2015-06-30 17:35:21 +02:00
parent ec7ab5c622
commit 18bbb77fa6
1 changed files with 19 additions and 10 deletions

View File

@ -331,16 +331,25 @@ function initWhompScene(scene, collidableObjects, loader, camera) {
loader.obj.rotation.z = Math.PI/2;
loader.obj.scale.set(0.1,0.1,0.1);
// loader.getCamera = function() {
// return [
// loader.camera.position.z * 10,
// loader.camera.position.x * 10,
// loader.camera.position.y * 10,
// loader.camera.target.z * 10,
// loader.camera.target.x * 10,
// loader.camera.target.y * 10
// ];
// }
loader.getCamera = function() {
var ret = loader.camera.toList();
ret[0][0] *= 10;
ret[0][1] *= 10;
ret[0][2] *= 10;
ret[1][0] *= 10;
ret[1][1] *= 10;
ret[1][2] *= 10;
// Planes
for (var i = 2; i < ret.length; i++) {
ret[i][3] *= 10;
}
return ret;
}
collidableObjects.push(loader.obj);
loader.obj.raycastable = true;