repo: janusweb
action: commit
revision: 
path_from: 
revision_from: ad89210c43e41f81ded547b881e6b584809dd2e5:
path_to: 
revision_to: 
git.thebackupbox.net
janusweb
git clone git://git.thebackupbox.net/janusweb
commit ad89210c43e41f81ded547b881e6b584809dd2e5
Author: James Baicoianu 
Date:   Tue Sep 3 10:02:03 2024 -0700

    Allow highlighter to work directly with THREE.js Object3Ds

diff --git a/scripts/elements/outliner.js b/scripts/elements/outliner.js
index e72bdfbc190e766fb280673ff0b4f87ce15e1e35..
index ..69255374781ab7668b8407db257ca8b93b24f229 100644
--- a/scripts/elements/outliner.js
+++ b/scripts/elements/outliner.js
@@ -74,14 +74,25 @@ elation.require(['janusweb.janusbase'], function() {
         return;
       }
       let objmeshes = [], skinnedmeshes = [];
-      object.traverseObjects(n => {
-        if (n instanceof THREE.Mesh && n.material !== this.outlinematerial) {
-          if (n.isSkinnedMesh)
-            skinnedmeshes.push(n);
-          else
-            objmeshes.push(n);
-        }
-      });
+      if (object instanceof THREE.Object3D) {
+        object.traverse(n => {
+          if (n instanceof THREE.Mesh && n.material !== this.outlinematerial) {
+            if (n.isSkinnedMesh)
+              skinnedmeshes.push(n);
+            else
+              objmeshes.push(n);
+          }
+        });
+      } else {
+        object.traverseObjects(n => {
+          if (n instanceof THREE.Mesh && n.material !== this.outlinematerial) {
+            if (n.isSkinnedMesh)
+              skinnedmeshes.push(n);
+            else
+              objmeshes.push(n);
+          }
+        });
+      }
       // Create and update regular Meshes
       let meshIdx = 0;
       for (; meshIdx < objmeshes.length; meshIdx++) {

-----END OF PAGE-----