分离选择材质,避免实体选中时,选中材质导致的内部拉槽显示问题.

修正未选中板件时,视图没有刷新的问题.
加入排钻显示.
This commit is contained in:
ChenX
2018-05-31 11:12:29 +08:00
parent 4f3d7a6388
commit cbe28efb08
10 changed files with 79 additions and 27 deletions

View File

@@ -3,7 +3,7 @@ import * as THREE from "three";
import { CameraUpdate } from "./CameraUpdate";
import { GetBox, GetBoxArr, cZeroVec } from "./GeUtils";
import { PlaneExt } from "./PlaneExt";
import { PointPick, boardMaterial, CameraControls } from ".";
import { PointPick, boardMaterial, CameraControls, selectMaterial } from ".";
import { MeshBasicMaterial, Color, Mesh } from "three";
export class Viewer
@@ -32,9 +32,6 @@ export class Viewer
this.OnSize();
});
//选中
let selectMaterial = new MeshBasicMaterial({ color: new Color(0.1, 0.5, 0.5) });
let oldMesh: Mesh;
this.m_Render.domElement.addEventListener("mousemove", (e: MouseEvent) =>
{
@@ -45,8 +42,8 @@ export class Viewer
{
oldMesh = mesh;
mesh.material = selectMaterial;
this.m_bNeedUpdate = true;
}
this.m_bNeedUpdate = true;
})
}