摘要: 屏幕坐标转世界坐标: let pX = (screenPoint.x / this.scene.renderer.domElement.clientWidth) * 2 - 1; let pY = - (screenPoint.y / this.scene.renderer.domElement.c 阅读全文
posted @ 2018-01-18 11:46 善未易明 阅读(14330) 评论(2) 推荐(1) 编辑
摘要: objects=[]; raycaster = new THREE.Raycaster(); mouse = new THREE.Vector2(); //监听全局点击事件,通过ray检测选中哪一个object document.addEventListener("mousedown", (even 阅读全文
posted @ 2018-01-18 10:54 善未易明 阅读(13757) 评论(0) 推荐(1) 编辑