From cee602fc6e1431fd505665a7b285c3fa85d32d3e Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Mon, 20 Apr 2015 13:17:15 -0400 Subject: toggle billboard --- .../javascripts/rectangles/engine/sculpture/types/_object.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'public/assets/javascripts/rectangles/engine') 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 -- cgit v1.2.3-70-g09d2