summaryrefslogtreecommitdiff
path: root/public/assets/javascripts/rectangles/engine/sculpture/_sculpture.js
diff options
context:
space:
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){