Skip to content

Commit 4dc0afa

Browse files
committed
docs: idk why this works locally/prod build but not deployed?!
1 parent 4087b78 commit 4dc0afa

File tree

1 file changed

+8
-2
lines changed
  • apps/kitchen-sink/src/app/soba/aquarium

1 file changed

+8
-2
lines changed

apps/kitchen-sink/src/app/soba/aquarium/tank.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
input,
88
viewChild,
99
} from '@angular/core';
10-
import { NgtVector3 } from 'angular-three';
10+
import { getLocalState, NgtVector3 } from 'angular-three';
1111
import { injectGLTF } from 'angular-three-soba/loaders';
1212
import { NgtsMeshTransmissionMaterial } from 'angular-three-soba/materials';
1313
import { injectMask } from 'angular-three-soba/staging';
@@ -67,9 +67,15 @@ export class Tank {
6767
const group = this.groupRef()?.nativeElement;
6868
if (!group) return;
6969

70+
const localState = getLocalState(group);
71+
if (!localState) return;
72+
73+
// track all children
74+
localState.objects();
75+
7076
// Apply stencil to all contents
7177
group.traverse((child) => {
72-
if (child instanceof Mesh && child.material) {
78+
if (child instanceof Mesh) {
7379
Object.assign(child.material, { ...this.stencilParameters() });
7480
}
7581
});

0 commit comments

Comments
 (0)