Quellcode durchsuchen

Allowed fading when level 3 is completed

pull/880/head
NiHoel vor 5 Jahren
Ursprung
Commit
679211fc7f
1 geänderte Dateien mit 13 neuen und 4 gelöschten Zeilen
  1. +13
    -4
      src/js/libpannellum.js

+ 13
- 4
src/js/libpannellum.js Datei anzeigen

@@ -863,10 +863,19 @@ function Renderer(container) {
multiresrecDraw();
}

if (this.tilesLoadedCallback && program.currentNodes
&& program.currentNodes.length > 0 && !this.isLoading()) {
this.tilesLoadedCallback();
delete this.tilesLoadedCallback;
// check if tiles are loaded up to level 3 and issue callback
if (this.tilesLoadedCallback && program.currentNodes && program.currentNodes.length > 0) {
var minLoadedLevel = Number.MAX_SAFE_INTEGER;
for (var i = 0; i < program.currentNodes.length; i++) {
if (!program.currentNodes[i].textureLoaded) {
minLoadedLevel = Math.min(minLoadedLevel, program.currentNodes[i].level)
}
}

if (minLoadedLevel > 3) {
this.tilesLoadedCallback();
delete this.tilesLoadedCallback;
}
}

if (params.returnImage !== undefined) {


Laden…
Abbrechen
Speichern