summaryrefslogtreecommitdiff
path: root/assets/javascripts/rectangles/_env.js
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2014-04-24 16:36:49 -0400
committerJules Laplace <jules@okfoc.us>2014-04-24 16:36:49 -0400
commit0e4bc72fe453797743d63f57db47ef3e0468fc65 (patch)
tree31c8983117d7043ff2af5bc315691900ae80a592 /assets/javascripts/rectangles/_env.js
parent796e1194d13bfa16f41676d81f7d9cdb4b9fc96f (diff)
collide based on a radius
Diffstat (limited to 'assets/javascripts/rectangles/_env.js')
-rw-r--r--assets/javascripts/rectangles/_env.js20
1 files changed, 12 insertions, 8 deletions
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