From 9df3fa032042302f21540b595971ba7cca6f0316 Mon Sep 17 00:00:00 2001 From: martinRenou <martin.renou@gmail.com> Date: Mon, 21 Oct 2024 09:40:36 +0200 Subject: [PATCH] Fix clip plane color --- packages/base/src/3dview/mainview.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/base/src/3dview/mainview.tsx b/packages/base/src/3dview/mainview.tsx index dc4c48cb8..a6197566d 100644 --- a/packages/base/src/3dview/mainview.tsx +++ b/packages/base/src/3dview/mainview.tsx @@ -330,7 +330,7 @@ export class MainView extends React.Component<IProps, IStates> { this._clippingPlaneMeshControl = new THREE.Mesh( new THREE.PlaneGeometry(1, 1), new THREE.MeshBasicMaterial({ - color: 'black', + color: DEFAULT_MESH_COLOR_CSS, opacity: 0.2, transparent: true, side: THREE.DoubleSide @@ -1435,6 +1435,8 @@ export class MainView extends React.Component<IProps, IStates> { DEFAULT_EDGE_COLOR.set(getCSSVariableColor(DEFAULT_EDGE_COLOR_CSS)); BOUNDING_BOX_COLOR.set(getCSSVariableColor(BOUNDING_BOX_COLOR_CSS)); + this._clippingPlaneMeshControl.material.color = DEFAULT_EDGE_COLOR; + this.setState(old => ({ ...old, lightTheme })); }; @@ -1544,7 +1546,7 @@ export class MainView extends React.Component<IProps, IStates> { private _explodedViewLinesHelperGroup: THREE.Group | null = null; // The list of line helpers for the exploded view private _cameraSettings: CameraSettings = { type: 'Perspective' }; private _clipSettings: ClipSettings = { enabled: false, showClipPlane: true }; - private _clippingPlaneMeshControl: THREE.Mesh; // Plane mesh using for controlling the clip plane in the UI + private _clippingPlaneMeshControl: BasicMesh; // Plane mesh using for controlling the clip plane in the UI private _clippingPlaneMesh: THREE.Mesh | null = null; // Plane mesh used for "filling the gaps" private _clippingPlane = new THREE.Plane(new THREE.Vector3(-1, 0, 0), 0); // Mathematical object for clipping computation private _clippingPlanes = [this._clippingPlane];