14 lines
463 B
TypeScript
14 lines
463 B
TypeScript
![]() |
import { MeshBasicMaterial, Color, LineBasicMaterial } from "three";
|
||
|
|
||
|
//板件的材质,使用这个材质避免板件将线覆盖.
|
||
|
export let boardMaterial = new MeshBasicMaterial({
|
||
|
color: new Color(0.8, 0.8, 0.8),
|
||
|
polygonOffset: true,
|
||
|
polygonOffsetFactor: 1, // positive value pushes polygon further away
|
||
|
polygonOffsetUnits: 1
|
||
|
});
|
||
|
|
||
|
//线框的材质
|
||
|
export let edgeMaterial = new LineBasicMaterial({ linewidth: 2, color: new Color(0, 0, 0) });
|
||
|
|