diff --git a/packages/chili-three/src/threeHighlighter.ts b/packages/chili-three/src/threeHighlighter.ts index d50601f4..124678e7 100644 --- a/packages/chili-three/src/threeHighlighter.ts +++ b/packages/chili-three/src/threeHighlighter.ts @@ -16,7 +16,6 @@ import { hilightEdgeMaterial, selectedEdgeMaterial } from "./common"; import { ThreeGeometry } from "./threeGeometry"; import { ThreeGeometryFactory } from "./threeGeometryFactory"; import { ThreeVisualContext } from "./threeVisualContext"; -import { ThreeHelper } from "./threeHelper"; export class GeometryState { private readonly _states: Map = new Map(); @@ -140,12 +139,12 @@ export class GeometryState { console.warn(`Invalid type ${type} for ${key}`); return undefined; } - points = ThreeHelper.toMatrix(this.geometry.matrixWorld).ofPoints(points); let lineGeometry = new LineSegmentsGeometry(); lineGeometry.setPositions(points); let segment = new LineSegments2(lineGeometry); this.highlighter.container.add(segment); + segment.applyMatrix4(this.geometry.matrixWorld); return segment; } }