Remove redundant position setting and add transform application in ViewportHost

This commit is contained in:
2026-04-04 19:29:11 +02:00
parent 0bfa3613d5
commit 5d3d9c394d

View File

@@ -1786,7 +1786,6 @@ export class ViewportHost {
const mesh = new Mesh(geometry, materials);
const brushSelected = isBrushSelected(selection, brush.id);
mesh.position.set(brush.center.x, brush.center.y, brush.center.z);
mesh.userData.brushId = brush.id;
mesh.castShadow = false;
mesh.receiveShadow = false;
@@ -1797,7 +1796,6 @@ export class ViewportHost {
color: brushSelected ? BRUSH_SELECTED_EDGE_COLOR : BRUSH_EDGE_COLOR
})
);
edges.position.copy(mesh.position);
edges.visible = this.displayMode !== "wireframe";
this.brushGroup.add(mesh);
@@ -1806,6 +1804,7 @@ export class ViewportHost {
mesh,
edges
});
this.applyBrushRenderObjectTransform(brush.id, brush.center, brush.rotationDegrees, brush.size);
}
this.applyShadowState();