diff options
| author | Jules Laplace <jules@okfoc.us> | 2015-04-03 16:54:51 -0400 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2015-04-03 16:54:51 -0400 |
| commit | 66e10f749fcc35e779e2492521b8dd98a8770820 (patch) | |
| tree | 98a1097b7b39b5f56060f8820518daa7d177d620 /public/assets/javascripts/rectangles/engine/sculpture/_sculpture.js | |
| parent | 3986bd98b0c0a4674310aa6425c75dba5962f2c7 (diff) | |
billboard mode
Diffstat (limited to 'public/assets/javascripts/rectangles/engine/sculpture/_sculpture.js')
| -rw-r--r-- | public/assets/javascripts/rectangles/engine/sculpture/_sculpture.js | 9 |
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){ |
