From 50de79a5464397f07f186761522d536ec72e1a46 Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Mon, 13 Apr 2026 22:26:32 +0200 Subject: [PATCH] Update path render object state to reflect changes in points --- src/viewport-three/viewport-host.ts | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/src/viewport-three/viewport-host.ts b/src/viewport-three/viewport-host.ts index 33266bd2..e997bf83 100644 --- a/src/viewport-three/viewport-host.ts +++ b/src/viewport-three/viewport-host.ts @@ -3508,6 +3508,33 @@ export class ViewportHost { this.refreshPathPresentation(); } + private updatePathRenderObjectState(path: ScenePath) { + const renderObjects = this.pathRenderObjects.get(path.id); + + if (renderObjects === undefined) { + return; + } + + renderObjects.line.geometry.dispose(); + renderObjects.line.geometry = this.createPathLineGeometry(path); + + for (const pointMesh of renderObjects.pointMeshes) { + const point = path.points.find( + (candidatePoint) => candidatePoint.id === pointMesh.pointId + ); + + if (point === undefined) { + continue; + } + + pointMesh.mesh.position.set( + point.position.x, + point.position.y, + point.position.z + ); + } + } + private configureFogVolumeMesh( mesh: Mesh, materials: Material[]