From da8ea7a5314d7e798a6f8ba6681aba91577841dc Mon Sep 17 00:00:00 2001 From: xiange Date: Wed, 17 Jul 2024 21:15:12 +0800 Subject: [PATCH] refactor(config): update visual config --- packages/chili-core/src/config.ts | 16 ++++++++-------- packages/chili-three/src/threeView.ts | 5 +++-- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/packages/chili-core/src/config.ts b/packages/chili-core/src/config.ts index 6703cf7d..c2482ae0 100644 --- a/packages/chili-core/src/config.ts +++ b/packages/chili-core/src/config.ts @@ -6,17 +6,17 @@ import { ObjectSnapType } from "./snapType"; export const VisualConfig = { defaultEdgeColor: 0x121314, defaultFaceColor: 0xdedede, - highlightEdgeColor: 0xfef08a, - highlightFaceColor: 0xfef08a, - selectedEdgeColor: 0xffffff, - selectedFaceColor: 0xfde047, - editVertexSize: 5, + highlightEdgeColor: 0x0000ee, + highlightFaceColor: 0x0000ee, + selectedEdgeColor: 0x0000ff, + selectedFaceColor: 0x0000ff, + editVertexSize: 7, editVertexColor: 0x0000ff, - hintVertexSize: 3, + hintVertexSize: 5, hintVertexColor: 0x0000ff, - trackingVertexSize: 5, + trackingVertexSize: 7, trackingVertexColor: 0x0000ff, - temporaryVertexSize: 3, + temporaryVertexSize: 5, temporaryVertexColor: 0x0000ff, temporaryEdgeColor: 0x0000ff, }; diff --git a/packages/chili-three/src/threeView.ts b/packages/chili-three/src/threeView.ts index 41168d82..8b412637 100644 --- a/packages/chili-three/src/threeView.ts +++ b/packages/chili-three/src/threeView.ts @@ -11,6 +11,7 @@ import { Ray, ShapeMeshGroup, ShapeType, + VisualConfig, VisualShapeData, XY, XYZ, @@ -130,8 +131,8 @@ export class ThreeView extends Observable implements IView { protected initRender() { return new ThreeRenderBuilder(this._scene, this.camera) - .addOutlinePass(this.highlighter.sceneHorver, 0xffff00, true) - .addOutlinePass(this.highlighter.sceneSelected, 0x0000ff, true) + .addOutlinePass(this.highlighter.sceneHorver, VisualConfig.highlightEdgeColor, true) + .addOutlinePass(this.highlighter.sceneSelected, VisualConfig.selectedEdgeColor, true) .addGammaCorrection() .build(); }