diff options
| author | Jules Laplace <jules@okfoc.us> | 2014-06-03 17:51:34 -0400 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2014-06-03 17:51:34 -0400 |
| commit | 90142bd07f926ef8a7f3ea86a563ec0ca648ca5d (patch) | |
| tree | 2851e990b4b71e215ad2fff4dbcaf80229953c35 /public/assets/javascripts/rectangles/_env.js | |
| parent | 607f69c67a5b4dc72d2754192e3cdf67d0ad11d0 (diff) | |
pulling in more stuff from posthang
Diffstat (limited to 'public/assets/javascripts/rectangles/_env.js')
| -rw-r--r-- | public/assets/javascripts/rectangles/_env.js | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/public/assets/javascripts/rectangles/_env.js b/public/assets/javascripts/rectangles/_env.js new file mode 100644 index 0000000..972b1fe --- /dev/null +++ b/public/assets/javascripts/rectangles/_env.js @@ -0,0 +1,49 @@ + +var environment = new function(){} +environment.init = function(){ + if (window.scene) { + scene.camera.move({ + "x": 0, + "y": 0, + "z": 0, + "rotationX": 0, // PI/2, + "rotationY": PI/2, // PI +// "rotationX": 0, +// "rotationY": PI + }) + + scene.camera.radius = 20 + } + +// map.center.a = scene.camera.x +// map.center.b = scene.camera.z + map.center.a = 0 + map.center.b = 0 + + Rooms.list.push( new Room ({ + rect: new Rect(-500,-500, 500,500), + height: 500, + })) + Rooms.list.push( new Room ({ + rect: new Rect(600,0, 1100,500), + height: 500, + })) + Rooms.list.push( new Room ({ + rect: new Rect(450,150, 650,350), + height: 300, + })) + + app.movements.gravity(true) + + $("#map").hide() + + Rooms.init() + Scenery.init() + + scene.update() + environment.update() +} +environment.update = function(t){ + map.update() + z = false +} |
