From 47d9c195c6fca99508f11545272cdcdfab3c10f7 Mon Sep 17 00:00:00 2001
From: Robert Long <robert@robertlong.me>
Date: Wed, 7 Feb 2018 16:39:15 -0800
Subject: [PATCH] Update bone-visibility to use near zero scale.

---
 src/components/bone-visibility.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/components/bone-visibility.js b/src/components/bone-visibility.js
index 7e2dd7bf6..17933edcd 100644
--- a/src/components/bone-visibility.js
+++ b/src/components/bone-visibility.js
@@ -6,7 +6,8 @@ AFRAME.registerComponent("bone-visibility", {
       if (visible) {
         this.el.object3D.scale.set(1, 1, 1);
       } else {
-        this.el.object3D.scale.set(0, 0, 0);
+        // Three.js doesn't like updating matrices with 0 scale, so we set it to a near zero number.
+        this.el.object3D.scale.set(0.00000001, 0.00000001, 0.00000001);
       }
 
       this.lastVisible = visible;
-- 
GitLab