分离选择材质,避免实体选中时,选中材质导致的内部拉槽显示问题.
修正未选中板件时,视图没有刷新的问题. 加入排钻显示.
This commit is contained in:
@@ -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;
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user