MouseMeshInteraction
是一个实用程序类,它使您可以轻松地为threejs网格(THREE.Mesh对象)设置鼠标事件处理程序。
用法:
初始化MouseMeshInteraction对象(创建网格对象之前不必一定要这样做)
// pass threejs scene and camera
const mmi = new MouseMeshInteraction ( scene , camera ) ;
创建一个可交互的网格
// create an interactable mesh
const mesh = new THREE . Mesh ( geometry , material ) ;
// specify a name for the mesh (needed for mmi to work, you can give the same nam