From 0876154ebc11c2e024a10fdca46eab924d746a6b Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Sun, 5 Apr 2026 03:17:14 +0200 Subject: [PATCH] Update runtime-host.js to use new box brush mesh data builder --- src/runtime-three/runtime-host.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/runtime-three/runtime-host.js b/src/runtime-three/runtime-host.js index 94491fb4..5396b17d 100644 --- a/src/runtime-three/runtime-host.js +++ b/src/runtime-three/runtime-host.js @@ -1,7 +1,6 @@ -import { AmbientLight, AnimationClip, AnimationMixer, BoxGeometry, DirectionalLight, Group, LoopOnce, LoopRepeat, Mesh, MeshStandardMaterial, PerspectiveCamera, PointLight, Quaternion, Scene, Vector3, SpotLight, WebGLRenderer } from "three"; -import { EffectComposer } from "postprocessing"; +import { AmbientLight, AnimationClip, AnimationMixer, DirectionalLight, Group, LoopOnce, LoopRepeat, Mesh, MeshStandardMaterial, PerspectiveCamera, PointLight, Quaternion, Scene, Vector3, SpotLight, WebGLRenderer } from "three"; import { createModelInstanceRenderGroup, disposeModelInstance } from "../assets/model-instance-rendering"; -import { applyBoxBrushFaceUvsToGeometry } from "../geometry/box-face-uvs"; +import { buildBoxBrushDerivedMeshData } from "../geometry/box-brush-mesh"; import { createStarterMaterialSignature, createStarterMaterialTexture } from "../materials/starter-material-textures"; import { applyAdvancedRenderingLightShadowFlags, applyAdvancedRenderingRenderableShadowFlags, configureAdvancedRenderingRenderer, createAdvancedRenderingComposer } from "../rendering/advanced-rendering"; import { areAdvancedRenderingSettingsEqual, cloneAdvancedRenderingSettings } from "../document/world-settings"; @@ -329,8 +328,7 @@ export class RuntimeHost { rebuildBrushMeshes(brushes) { this.clearBrushMeshes(); for (const brush of brushes) { - const geometry = new BoxGeometry(brush.size.x, brush.size.y, brush.size.z); - applyBoxBrushFaceUvsToGeometry(geometry, brush); + const geometry = buildBoxBrushDerivedMeshData(brush).geometry; const materials = [ this.createFaceMaterial(brush.faces.posX.material), this.createFaceMaterial(brush.faces.negX.material),