Skip to content

Commit

Permalink
refactor(config): update visual config
Browse files Browse the repository at this point in the history
  • Loading branch information
xiangechen committed Jul 17, 2024
1 parent e7c2f8a commit da8ea7a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
16 changes: 8 additions & 8 deletions packages/chili-core/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
Expand Down
5 changes: 3 additions & 2 deletions packages/chili-three/src/threeView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
Ray,
ShapeMeshGroup,
ShapeType,
VisualConfig,
VisualShapeData,
XY,
XYZ,
Expand Down Expand Up @@ -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();
}
Expand Down

0 comments on commit da8ea7a

Please sign in to comment.