Fix bug where dice tray doesn't show after load

This commit is contained in:
Mitchell McCaffrey 2020-05-28 13:24:33 +10:00
parent b8e5554058
commit a229d190e4

View File

@ -71,9 +71,9 @@ function DiceTrayOverlay({ isOpen }) {
};
}, [isOpen]);
const handleSceneMount = useCallback(({ scene, engine }) => {
const handleSceneMount = useCallback(async ({ scene, engine }) => {
sceneRef.current = scene;
initializeScene(scene);
await initializeScene(scene);
engine.runRenderLoop(() => update(scene));
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);