From 18bbb77fa6e4d649761c9ca5a3ebea7a1cab1cb8 Mon Sep 17 00:00:00 2001 From: Thomas FORGIONE Date: Tue, 30 Jun 2015 17:35:21 +0200 Subject: [PATCH] Changed stuff --- js/prototype/initScene.js | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/js/prototype/initScene.js b/js/prototype/initScene.js index 59c503a..cbed754 100644 --- a/js/prototype/initScene.js +++ b/js/prototype/initScene.js @@ -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;