瀏覽代碼

fixed black screen when fading

pull/880/head
NiHoel 5 年之前
父節點
當前提交
d1b36ec3e6
共有 1 個檔案被更改,包括 1 行新增1 行删除
  1. +1
    -1
      src/js/pannellum.js

+ 1
- 1
src/js/pannellum.js 查看文件

@@ -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…
取消
儲存