Skip to content

Commit

Permalink
perf: set hilighlight offset
Browse files Browse the repository at this point in the history
  • Loading branch information
xiangechen committed Jan 27, 2024
1 parent 56cf058 commit 455fa76
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/chili-three/src/threeShape.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,8 @@ import {
VisualState,
} from "chili-core";
import {
AlwaysDepth,
BufferGeometry,
DoubleSide,
EqualDepth,
Float32BufferAttribute,
LineBasicMaterial,
LineSegments,
Expand All @@ -31,10 +29,16 @@ import { ThreeHelper } from "./threeHelper";

const hilightEdgeMaterial = new LineBasicMaterial({
color: ThreeHelper.fromColor(Config.instance.visual.highlightEdgeColor),
polygonOffset: true,
polygonOffsetFactor: -1,
polygonOffsetUnits: -1,
});

const selectedEdgeMaterial = new LineBasicMaterial({
color: ThreeHelper.fromColor(Config.instance.visual.selectedEdgeColor),
polygonOffset: true,
polygonOffsetFactor: -1,
polygonOffsetUnits: -1,
});

const highlightFaceMaterial = new MeshStandardMaterial({
Expand Down

0 comments on commit 455fa76

Please sign in to comment.