summaryrefslogtreecommitdiff
path: root/public/assets/javascripts/rectangles/engine/sculpture/_sculpture.js
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2015-04-03 16:54:51 -0400
committerJules Laplace <jules@okfoc.us>2015-04-03 16:54:51 -0400
commit66e10f749fcc35e779e2492521b8dd98a8770820 (patch)
tree98a1097b7b39b5f56060f8820518daa7d177d620 /public/assets/javascripts/rectangles/engine/sculpture/_sculpture.js
parent3986bd98b0c0a4674310aa6425c75dba5962f2c7 (diff)
billboard mode
Diffstat (limited to 'public/assets/javascripts/rectangles/engine/sculpture/_sculpture.js')
-rw-r--r--public/assets/javascripts/rectangles/engine/sculpture/_sculpture.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/public/assets/javascripts/rectangles/engine/sculpture/_sculpture.js b/public/assets/javascripts/rectangles/engine/sculpture/_sculpture.js
index c8c90d3..1543def 100644
--- a/public/assets/javascripts/rectangles/engine/sculpture/_sculpture.js
+++ b/public/assets/javascripts/rectangles/engine/sculpture/_sculpture.js
@@ -8,6 +8,15 @@ var Sculpture = new function(){
base.mouse = new mouse ({ use_offset: false, mousedownUsesCapture: true })
base.init = function(){
+ app.on("move", base.updateBillboards)
+ }
+
+ base.updateBillboards = function(){
+ base.forEach(function(sculpture){
+ if (sculpture.billboard) {
+ sculpture.mx.rotationY = cam.rotationY
+ }
+ })
}
base.add = function(opt){