File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
libs/soba/performances/src/lib Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -124,6 +124,7 @@ export class NgtsBVH {
124124 raycaster . firstHitOnly = firstHitOnly ;
125125
126126 let timeoutId : ReturnType < typeof setTimeout > | undefined ;
127+ group . visible = false ;
127128 group . traverse ( ( child ) => {
128129 if (
129130 is . three < THREE . Mesh > ( child , 'isMesh' ) &&
@@ -141,6 +142,8 @@ export class NgtsBVH {
141142 return ;
142143 }
143144
145+ if ( ! group . visible ) group . visible = true ;
146+
144147 child . raycast = acceleratedRaycast ;
145148 child . geometry . computeBoundsTree = computeBoundsTree ;
146149 child . geometry . disposeBoundsTree = disposeBoundsTree ;
@@ -158,6 +161,8 @@ export class NgtsBVH {
158161 child . raycast = THREE . Mesh . prototype . raycast ;
159162 }
160163 } ) ;
164+
165+ if ( ! group . visible ) group . visible = true ;
161166 } ) ;
162167 } ) ;
163168
You can’t perform that action at this time.
0 commit comments