mirror of
https://github.com/BlueMap-Minecraft/BlueMapWeb.git
synced 2024-11-28 04:45:13 +01:00
Fix raytracing
This commit is contained in:
parent
5be6dc8089
commit
8d581ce782
@ -188,6 +188,7 @@ export class MapViewer {
|
|||||||
let lowresHits = [];
|
let lowresHits = [];
|
||||||
let hiresHit = null;
|
let hiresHit = null;
|
||||||
let covered = false;
|
let covered = false;
|
||||||
|
|
||||||
for (let i = 0; i < intersects.length; i++) {
|
for (let i = 0; i < intersects.length; i++) {
|
||||||
if (intersects[i].object){
|
if (intersects[i].object){
|
||||||
let object = intersects[i].object;
|
let object = intersects[i].object;
|
||||||
@ -208,12 +209,12 @@ export class MapViewer {
|
|||||||
while(parentRoot.parent) parentRoot = parentRoot.parent;
|
while(parentRoot.parent) parentRoot = parentRoot.parent;
|
||||||
|
|
||||||
for (let l = 0; l < this.map.lowresTileManager.length; l++) {
|
for (let l = 0; l < this.map.lowresTileManager.length; l++) {
|
||||||
if (parentRoot === this.map.lowresTileManager[l].scene) {
|
if (parentRoot === this.map.lowresTileManager[l].sceneParent) {
|
||||||
if (!lowresHits[l]) lowresHits[l] = intersects[i];
|
if (!lowresHits[l]) lowresHits[l] = intersects[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (parentRoot === this.map.hiresTileManager.scene) {
|
if (parentRoot === this.map.hiresTileManager.sceneParent) {
|
||||||
if (!hiresHit) hiresHit = intersects[i];
|
if (!hiresHit) hiresHit = intersects[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -224,7 +225,7 @@ export class MapViewer {
|
|||||||
})) return;
|
})) return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (parentRoot !== this.map.lowresTileManager[0].scene) {
|
if (parentRoot !== this.map.lowresTileManager[0].sceneParent) {
|
||||||
covered = true;
|
covered = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user