d3-force-graph
d3-force-graph copied to clipboard
关于节点拾取的疑问
threshold 固定值无法精准适配 scale 节点大小的问题。
let ray = new THREE.Raycaster()
ray.setFromCamera(normalMouse, this.camera)
ray.params.Points.threshold = 2 // 对于不同的scale 这个固定的值会导致无法像碰撞检测那样精准的拾取,有无更好的方案?
let intersects = ray.intersectObjects(this.scene.children).filter(e => e.object.type ===
'Points' && !e.object.name.startsWith('hl'))