Browse Source

fixed black screen when fading

pull/880/head
NiHoel 5 years ago
parent
commit
d1b36ec3e6
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      src/js/pannellum.js

+ 1
- 1
src/js/pannellum.js View File

@@ -2369,7 +2369,7 @@ function loadScene(sceneId, targetPitch, targetYaw, targetHfov, fadeDone) {
fadeImg.style.width = '100%';
fadeImg.style.height = '100%';
fadeImg.onload = function() {
loadScene(sceneId, targetPitch, targetYaw, targetHfov, true);
setTimeout(() => loadScene(sceneId, targetPitch, targetYaw, targetHfov, true), 100); // prevents black flickering before fading
};
fadeImg.src = data;
renderContainer.appendChild(fadeImg);


Loading…
Cancel
Save