新增鼠标选择回调事件
This commit is contained in:
		@@ -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;
 | 
			
		||||
  }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user