From 0e4bc72fe453797743d63f57db47ef3e0468fc65 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Thu, 24 Apr 2014 16:36:49 -0400 Subject: collide based on a radius --- assets/javascripts/rectangles/_env.js | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'assets/javascripts/rectangles/_env.js') diff --git a/assets/javascripts/rectangles/_env.js b/assets/javascripts/rectangles/_env.js index 5b4643a..d41d490 100644 --- a/assets/javascripts/rectangles/_env.js +++ b/assets/javascripts/rectangles/_env.js @@ -1,14 +1,18 @@ var environment = new function(){} environment.init = function(){ - window.scene && scene.camera.move({ - "x": 1000, - "y": 1500, - "z": 250, - "rotationX": 0, // PI/2, - "rotationY": PI/2, // PI - }) - + if (window.scene) { + scene.camera.move({ + "x": 1000, + "y": 1500, + "z": 250, + "rotationX": 0, // PI/2, + "rotationY": PI/2, // PI + }) + + scene.camera.radius = 25 + } + map.center.a = scene.camera.x map.center.b = scene.camera.z // map.center.a = 0 -- cgit v1.2.3-70-g09d2