From 43907a6f15febe48f670ae0846dc0e590cef9bfe Mon Sep 17 00:00:00 2001 From: Thomas FORGIONE Date: Thu, 23 Apr 2015 10:43:58 +0200 Subject: [PATCH] Corrected transparency bug --- js/FixedCamera.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/js/FixedCamera.js b/js/FixedCamera.js index a4a3047..1f44ff8 100644 --- a/js/FixedCamera.js +++ b/js/FixedCamera.js @@ -133,6 +133,8 @@ FixedCamera.prototype.update = function(mainCamera) { if (elt instanceof THREE.Mesh) { elt.material.transparent = new_value < 0.9; elt.material.opacity = new_value; + + elt.material.transparent = elt.visible = new_value > 0.05; } });