完成下列功能:

1.板件显示
2.板件选中状态
3.标注显示
4.相机控制.
This commit is contained in:
ChenX
2018-05-24 17:13:23 +08:00
commit ba3e5cabfd
26 changed files with 9553 additions and 0 deletions

13
src/Material.ts Normal file
View File

@@ -0,0 +1,13 @@
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) });