Add heuristics for line threshold during ray casting.
This commit is contained in:
parent
0319fd4b32
commit
f83d5f02f5
@ -301,7 +301,12 @@ export class ViewerMainModel
|
||||
}
|
||||
|
||||
let raycaster = new THREE.Raycaster ();
|
||||
raycaster.params.Line.threshold = 0.1;
|
||||
if (this.hasLines) {
|
||||
let boundingSphere = this.GetBoundingSphere (() => {
|
||||
return true;
|
||||
});
|
||||
raycaster.params.Line.threshold = boundingSphere.radius / 100.0;
|
||||
}
|
||||
|
||||
let mousePos = new THREE.Vector2 ();
|
||||
mousePos.x = (mouseCoords.x / width) * 2 - 1;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user