Skip to content

Commit fbdcb7e

Browse files
committed
fix(reconciler): unlink texture from material when dispose it
1 parent f104414 commit fbdcb7e

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

packages/library/src/components/hosts/TextureHost.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,13 @@ export class TextureHost {
2626
}
2727
}
2828

29-
static removeChild(parentInstance: BabylonEntity, child: AugmentedTexture): void {}
29+
static removeChild(parentInstance: BabylonEntity, child: AugmentedTexture): void {
30+
const textureType = child.kind;
31+
if (textureType in parentInstance) {
32+
//@ts-ignore
33+
parentInstance[textureType] = null;
34+
}
35+
}
3036

3137
static prepareUpdate(): UpdatePayload {
3238
return {};

0 commit comments

Comments
 (0)