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 eab0887 commit 56cf058
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/chili-three/src/threeShape.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,19 @@ const highlightFaceMaterial = new MeshStandardMaterial({
side: DoubleSide,
transparent: true,
opacity: 0.85,
polygonOffset: true,
polygonOffsetFactor: -1,
polygonOffsetUnits: -1,
});

const selectedFaceMaterial = new MeshStandardMaterial({
color: ThreeHelper.fromColor(Config.instance.visual.selectedFaceColor),
side: DoubleSide,
transparent: true,
opacity: 0.32,
polygonOffset: true,
polygonOffsetFactor: -1,
polygonOffsetUnits: -1,
});

export class ThreeShape extends Object3D implements IVisualShape {
Expand Down

0 comments on commit 56cf058

Please sign in to comment.