summaryrefslogtreecommitdiff
path: root/public/assets/javascripts/rectangles/engine/sculpture/_sculpture.js
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2015-04-02 17:05:31 -0400
committerJules Laplace <jules@okfoc.us>2015-04-02 17:05:31 -0400
commitc6eea0f4887ba14e5a6ecfff8c9e8480ae6421c1 (patch)
treeec20a90df31e662224e0e73d09229ced17e751ff /public/assets/javascripts/rectangles/engine/sculpture/_sculpture.js
parentf9112718b560d4cc8380dd905d6cb60c497230bb (diff)
placing objects on the floor
Diffstat (limited to 'public/assets/javascripts/rectangles/engine/sculpture/_sculpture.js')
-rw-r--r--public/assets/javascripts/rectangles/engine/sculpture/_sculpture.js24
1 files changed, 11 insertions, 13 deletions
diff --git a/public/assets/javascripts/rectangles/engine/sculpture/_sculpture.js b/public/assets/javascripts/rectangles/engine/sculpture/_sculpture.js
index eb64e92..c8c90d3 100644
--- a/public/assets/javascripts/rectangles/engine/sculpture/_sculpture.js
+++ b/public/assets/javascripts/rectangles/engine/sculpture/_sculpture.js
@@ -4,7 +4,6 @@ var Sculpture = new function(){
var base = this;
base.list = {}
- base.nextMedia = null
base.mouse = new mouse ({ use_offset: false, mousedownUsesCapture: true })
@@ -12,29 +11,28 @@ var Sculpture = new function(){
}
base.add = function(opt){
- var scene_media
+ var sculpture
switch (opt.media.type) {
case 'image':
- scene_media = new Sculpture.types.image (opt)
+ sculpture = new Sculpture.types.image (opt)
break
}
- base.list[scene_media.id] = scene_media
- return scene_media
+ base.list[sculpture.id] = sculpture
+ return sculpture
}
- base.addNextToWall = function(opt){
+ base.addNext = function(opt){
opt.newMedia = true
- opt.media = base.nextMedia
- opt.index = opt.index || 0
- var scene_media = base.add(opt)
+ opt.media = Scenery.nextMedia
+ var sculpture = base.add(opt)
- // test if scenery was placed here
- if (! scene_media) {
+ // test if sculpture was placed here
+ if (! sculpture) {
return null
}
else {
- base.nextMedia = null
- return scene_media
+ Scenery.nextMedia = null
+ return sculpture
}
}