1 Commits
1.2.3 ... 1.2.4

Author SHA1 Message Date
xief
0aa70fdb14 新增鼠标选择回调事件 2021-03-17 15:53:32 +08:00

View File

@@ -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;
}