新增鼠标选择回调事件
This commit is contained in:
parent
93ac737777
commit
0aa70fdb14
@ -10,7 +10,7 @@ export class ViewerSettings
|
||||
{
|
||||
boardMaterial: MeshBasicMaterial = boardMaterial;
|
||||
selectMaterial: MeshBasicMaterial = selectMaterial;
|
||||
|
||||
selectByPointCallback: (meshId: number) => void = () => { };
|
||||
}
|
||||
|
||||
export class Viewer
|
||||
@ -211,6 +211,10 @@ export class Viewer
|
||||
{
|
||||
this.oldMesh = mesh;
|
||||
mesh.material = this._Settings.selectMaterial;
|
||||
if (this._Settings.selectByPointCallback)
|
||||
{
|
||||
this._Settings.selectByPointCallback(mesh.id);
|
||||
}
|
||||
}
|
||||
this.m_bNeedUpdate = true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user