From 0f71f6da4641008f9d7872ce0b922f14e5e891e1 Mon Sep 17 00:00:00 2001 From: MNAth_ Date: Thu, 21 Dec 2023 23:17:28 +0300 Subject: [PATCH] refactor: traverse objects to apply texture --- src/experiences/blueprints/Scene.blueprint.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/experiences/blueprints/Scene.blueprint.ts b/src/experiences/blueprints/Scene.blueprint.ts index d796b69..7030af5 100644 --- a/src/experiences/blueprints/Scene.blueprint.ts +++ b/src/experiences/blueprints/Scene.blueprint.ts @@ -61,7 +61,7 @@ export abstract class SceneBlueprint if (!TEXTURES_MESH_BASIC_MATERIALS) return; - this.modelScene?.children?.forEach((child) => { + this.modelScene?.traverse((child) => { this._modelChildrenTextures?.forEach((item) => { const CHILD_TEXTURE = TEXTURES_MESH_BASIC_MATERIALS[item.linkedTextureName];