Compare commits

..

2 Commits

Author SHA1 Message Date
xief
c586096fe0 更新版本号 2021-04-08 14:56:48 +08:00
xief
0aa70fdb14 新增鼠标选择回调事件 2021-03-17 15:53:32 +08:00
2 changed files with 6 additions and 2 deletions

View File

@ -1,6 +1,6 @@
{
"name": "cadview",
"version": "1.2.3",
"version": "1.2.5",
"description": "",
"main": "src/index.ts",
"private": true,

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