浏览代码

chore: test if onReady is the culprit

alvarosabu 3 月之前
父节点
当前提交
20b51caf45
共有 1 个文件被更改,包括 1 次插入4 次删除
  1. 1 4
      src/composables/useTresContextProvider/index.ts

+ 1 - 4
src/composables/useTresContextProvider/index.ts

@@ -79,11 +79,8 @@ export function useTresContextProvider({
   ctx.loop.setReady(false)
   ctx.loop.start()
 
-  whenever(renderer.isReady, () => { // TODO #994 This does not belong here, see https://github.com/Tresjs/tres/issues/595
+  renderer.onReady(() => {
     ctx.loop.setReady(true)
-  }, {
-    once: true,
-    immediate: true,
   })
 
   onUnmounted(() => {