summaryrefslogtreecommitdiff
path: root/assets/javascripts/rectangles/engine/scenery/_scenery.js
diff options
context:
space:
mode:
authorJulie Lala <jules@okfoc.us>2014-06-04 00:31:01 -0400
committerJulie Lala <jules@okfoc.us>2014-06-04 00:31:01 -0400
commit80e1fcbc52870366f2e885fe82724960929765c9 (patch)
treed380e04e8d784c40606bdaad82dcd37d0e260de5 /assets/javascripts/rectangles/engine/scenery/_scenery.js
parent5fb0ad045820de96848e1bde8e2dba8a6853dd4d (diff)
parent90142bd07f926ef8a7f3ea86a563ec0ca648ca5d (diff)
Merge branch 'master' of github.com:okfocus/vvalls
Diffstat (limited to 'assets/javascripts/rectangles/engine/scenery/_scenery.js')
-rw-r--r--assets/javascripts/rectangles/engine/scenery/_scenery.js45
1 files changed, 0 insertions, 45 deletions
diff --git a/assets/javascripts/rectangles/engine/scenery/_scenery.js b/assets/javascripts/rectangles/engine/scenery/_scenery.js
deleted file mode 100644
index 9e9e2bf..0000000
--- a/assets/javascripts/rectangles/engine/scenery/_scenery.js
+++ /dev/null
@@ -1,45 +0,0 @@
-
-var Scenery = new function(){
-
- var base = this;
-
- base.images = []
-
- base.mouse = new mouse ({ use_offset: false })
-
- base.init = function(){
- base.resize.init()
-
- var urls = [
- "http://okfocus.s3.amazonaws.com/office/ducks/duck1.jpg",
- "http://okfocus.s3.amazonaws.com/office/ducks/duck2.jpg",
- "http://okfocus.s3.amazonaws.com/office/ducks/duck3.jpg",
- "http://okfocus.s3.amazonaws.com/office/ducks/duck4.jpg",
- "http://okfocus.s3.amazonaws.com/office/ducks/duck5.jpg",
- ]
- var loader = new Loader(function(){
- base.load(loader.images)
- })
- // loader.preloadImages(urls)
- }
-
- base.load = function(images){
- images.forEach(function(img){
- img.width = 300
- img.height = ~~(300 * img.naturalHeight/img.naturalWidth)
- })
-
- Rooms.forEach(function(room){
- room.walls.forEach(function(wall){
- var img = choice(images)
- if (wall.fits(img)) {
- var scene_img = new Scenery.image (wall, img)
- base.images.push(scene_img)
- scene_img.init()
- }
- })
- })
- }
-
- return base
-}