From 0aa70fdb14e3c7d6aeabf5b2910d0184433f8fda Mon Sep 17 00:00:00 2001 From: xief <1789784602@qq.com> Date: Wed, 17 Mar 2021 15:53:32 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E9=BC=A0=E6=A0=87=E9=80=89?= =?UTF-8?q?=E6=8B=A9=E5=9B=9E=E8=B0=83=E4=BA=8B=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Viewer.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Viewer.ts b/src/Viewer.ts index 0f3f7fd..ef3da9a 100644 --- a/src/Viewer.ts +++ b/src/Viewer.ts @@ -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; }