summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2015-04-20 13:17:15 -0400
committerJules Laplace <jules@okfoc.us>2015-04-20 13:17:15 -0400
commitcee602fc6e1431fd505665a7b285c3fa85d32d3e (patch)
treeca4cbff8bf8c71c64ed18ee38b893890e5cac286
parent24543d0839ad51b2afa7195b16d29bc52b3f1a1b (diff)
toggle billboard
-rw-r--r--public/assets/javascripts/rectangles/engine/sculpture/types/_object.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/public/assets/javascripts/rectangles/engine/sculpture/types/_object.js b/public/assets/javascripts/rectangles/engine/sculpture/types/_object.js
index 48fd96a..489a6a1 100644
--- a/public/assets/javascripts/rectangles/engine/sculpture/types/_object.js
+++ b/public/assets/javascripts/rectangles/engine/sculpture/types/_object.js
@@ -53,7 +53,13 @@ Sculpture.types.base = Fiber.extend(function(base){
},
setBillboard: function(val){
this.billboard = val
- },
+ if (this.billboard) {
+ this.mx.rotationY = cam.rotationY
+ }
+ else {
+ this.mx.rotationY = PI/2
+ }
+ },
remove: function(){
if (this.removed) return