1
0
mirror of https://github.com/beestat/app.git synced 2025-05-24 02:14:03 -04:00

Fixed scene highlighting whatever is under 0,0 on first render

This commit is contained in:
Jon Ziebell 2022-09-17 07:41:24 -04:00
parent 3a20c951c6
commit 04f31c327e

View File

@ -239,7 +239,13 @@ beestat.component.scene.prototype.add_raycaster_ = function() {
this.raycaster_ = new THREE.Raycaster();
this.raycaster_.layers.set(beestat.component.scene.layer_visible);
this.raycaster_pointer_ = new THREE.Vector2();
/**
* Initialize a pointer representing the raycaster. Initialize it pointing
* way off screen instead of 0,0 so nothing starts thinking the mouse is
* over it.
*/
this.raycaster_pointer_ = new THREE.Vector2(10000, 10000);
// TODO remove event listener on dispose
document.addEventListener('mousemove', function(e) {