summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2015-04-20 14:31:24 -0400
committerJules Laplace <jules@okfoc.us>2015-04-20 14:31:24 -0400
commit546fba7ee9dac48d2fb0015709247b1b2efca8bc (patch)
tree9bf5457982fa455c76795575386175af4ac5b876
parentcee602fc6e1431fd505665a7b285c3fa85d32d3e (diff)
store billboard setting
-rw-r--r--public/assets/javascripts/rectangles/engine/scenery/resize.js2
-rw-r--r--public/assets/javascripts/rectangles/engine/sculpture/types/_object.js6
-rw-r--r--public/assets/javascripts/ui/editor/EditorView.js1
-rw-r--r--public/assets/javascripts/ui/editor/SculptureEditor.js7
4 files changed, 11 insertions, 5 deletions
diff --git a/public/assets/javascripts/rectangles/engine/scenery/resize.js b/public/assets/javascripts/rectangles/engine/scenery/resize.js
index a5e255a..006ff2a 100644
--- a/public/assets/javascripts/rectangles/engine/scenery/resize.js
+++ b/public/assets/javascripts/rectangles/engine/scenery/resize.js
@@ -49,7 +49,7 @@ Scenery.resize = new function(){
// rotate the dots as appropriate
base.rotate_dots = function(){
- console.trace()
+ // console.trace()
rotationY = obj.wall.rotationY
dots.forEach(function(dot){
dot.rotationY = rotationY
diff --git a/public/assets/javascripts/rectangles/engine/sculpture/types/_object.js b/public/assets/javascripts/rectangles/engine/sculpture/types/_object.js
index 489a6a1..b903c5b 100644
--- a/public/assets/javascripts/rectangles/engine/sculpture/types/_object.js
+++ b/public/assets/javascripts/rectangles/engine/sculpture/types/_object.js
@@ -54,9 +54,13 @@ Sculpture.types.base = Fiber.extend(function(base){
setBillboard: function(val){
this.billboard = val
if (this.billboard) {
+ this.mx.el.classList.add("backface-visible")
+ this.mx.el.classList.remove("backface-hidden")
this.mx.rotationY = cam.rotationY
}
else {
+ this.mx.el.classList.add("backface-hidden")
+ this.mx.el.classList.remove("backface-visible")
this.mx.rotationY = PI/2
}
},
@@ -106,6 +110,8 @@ Sculpture.types.base = Fiber.extend(function(base){
scale: this.scale,
media: this.media,
billboard: this.billboard,
+ outline: this.outline,
+ outlineColor: this.outlineColor,
backface: this.backface,
}
return data
diff --git a/public/assets/javascripts/ui/editor/EditorView.js b/public/assets/javascripts/ui/editor/EditorView.js
index e5e2ca0..a7b4f20 100644
--- a/public/assets/javascripts/ui/editor/EditorView.js
+++ b/public/assets/javascripts/ui/editor/EditorView.js
@@ -80,6 +80,7 @@ var EditorView = View.extend({
},
hideExtras: function(){
+ this.sculptureEditor.hide()
this.mediaEditor.hide()
this.textEditor.hide()
this.share.hide()
diff --git a/public/assets/javascripts/ui/editor/SculptureEditor.js b/public/assets/javascripts/ui/editor/SculptureEditor.js
index ab0ccd2..ff1e6b9 100644
--- a/public/assets/javascripts/ui/editor/SculptureEditor.js
+++ b/public/assets/javascripts/ui/editor/SculptureEditor.js
@@ -79,10 +79,9 @@ var SculptureEditor = FormView.extend({
this.setDimensions()
this.$units.val( "ft" )
- this.$outline.prop( 'checked', !! media.outline )
- this.$outlineColor.val( media.outlineColor )
- this.$billboard.prop( 'checked', !! media.billboard )
-
+ this.$outline.prop( 'checked', !! sculpture.outline )
+ this.$outlineColor.val( sculpture.outlineColor || "#000000" )
+ this.$billboard.prop( 'checked', !! sculpture.billboard )
switch (media.type) {
case "image":