Actually fix dice initial load

This commit is contained in:
Mitchell McCaffrey 2020-05-28 13:32:55 +10:00
parent a229d190e4
commit df57f09080

View File

@ -102,6 +102,13 @@ function DiceTrayOverlay({ isOpen }) {
let diceTray = new DiceTray("single", scene, shadowGenerator);
await diceTray.load();
diceTrayRef.current = diceTray;
// Force rerender on initialize
forceSceneRenderRef.current = true;
setTimeout(() => {
forceSceneRenderRef.current = false;
}, 1000);
assetLoadFinish();
}