summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--public/assets/javascripts/rectangles/engine/sculpture/types/image.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/public/assets/javascripts/rectangles/engine/sculpture/types/image.js b/public/assets/javascripts/rectangles/engine/sculpture/types/image.js
index 9399097..9e8de58 100644
--- a/public/assets/javascripts/rectangles/engine/sculpture/types/image.js
+++ b/public/assets/javascripts/rectangles/engine/sculpture/types/image.js
@@ -17,7 +17,6 @@ Sculpture.types.image = Sculpture.types.base.extend(function(base){
},
build: function(opt){
- this.footprint = new MX.Object3D()
this.mx = new MX.Image({
src: this.media.url,
scale: this.scale,
@@ -26,9 +25,10 @@ Sculpture.types.image = Sculpture.types.base.extend(function(base){
})
if (opt.position) {
- opt.position.y = opt.position.y || this.scale * this.media.height/2 + 5
+ opt.position.y = opt.position.y || this.scale * this.media.height/2 + 3
opt.position.rotationY = opt.position.rotationY || scene.camera.rotationY
this.billboard = true
+ this.backface = true
}
scene.add( this.mx )
@@ -37,6 +37,7 @@ Sculpture.types.image = Sculpture.types.base.extend(function(base){
serialize: function(){
var data = base.serialize.call(this)
data.billboard = this.billboard
+ data.backface = this.backface
return data
},
@@ -45,6 +46,8 @@ Sculpture.types.image = Sculpture.types.base.extend(function(base){
this.mx.ops.width = data.dimensions.a
this.mx.ops.height = data.dimensions.b
this.billboard = data.billboard
+ this.backface = data.backface
+ if (! this.backface) this.mx.el.classList.remove("backface-visible")
this.dimensions.deserialize(data.dimensions)
},
}