From 59b56e498d66e9b2acbf6e661aca7caeb0f0e998 Mon Sep 17 00:00:00 2001 From: alvarosabu Date: Sun, 25 May 2025 18:51:12 +0200 Subject: [PATCH 1/2] fix: update renderer context references in useDevtoolsHook and comment out invalidate in AnimatedDonnut --- client/composables/useDevtoolsHook.ts | 6 +++--- playground/components/AnimatedDonnut.vue | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/client/composables/useDevtoolsHook.ts b/client/composables/useDevtoolsHook.ts index a344653..3e574c4 100644 --- a/client/composables/useDevtoolsHook.ts +++ b/client/composables/useDevtoolsHook.ts @@ -183,9 +183,9 @@ export function useDevtoolsHook(): DevtoolsHookReturn { cb(context: TresContext) { scene.value = context.scene.value scene.objects = countObjectsInScene(context.scene.value) - Object.assign(gl.renderer.info.render, context.renderer.value.info.render) - Object.assign(gl.renderer.info.memory, context.renderer.value.info.memory) - gl.renderer.info.programs = [...(context.renderer.value.info.programs || []) as unknown as ProgramObject[]] + Object.assign(gl.renderer.info.render, context.renderer.instance.value.info.render) + Object.assign(gl.renderer.info.memory, context.renderer.instance.value.info.memory) + gl.renderer.info.programs = [...(context.renderer.instance.value.info.programs || []) as unknown as ProgramObject[]] Object.assign(gl.fps, context.perf.fps) gl.fps.accumulator = [...context.perf.fps.accumulator] Object.assign(gl.memory, context.perf.memory) diff --git a/playground/components/AnimatedDonnut.vue b/playground/components/AnimatedDonnut.vue index fb0e5a1..b8ca628 100644 --- a/playground/components/AnimatedDonnut.vue +++ b/playground/components/AnimatedDonnut.vue @@ -7,11 +7,11 @@ const donutRef = ref() const { onBeforeRender } = useLoop() -onBeforeRender(({ delta, invalidate }) => { +onBeforeRender(({ delta /* invalidate */ }) => { if (donutRef.value) { donutRef.value.rotation.x += delta donutRef.value.rotation.y += delta - invalidate() + // invalidate() } }) From 5c046b44b4c7e79bf754dc04af785c8eadde4603 Mon Sep 17 00:00:00 2001 From: alvarosabu Date: Thu, 19 Jun 2025 15:57:06 +0200 Subject: [PATCH 2/2] chore: update @tresjs/core and @tresjs/cientos to latest next versions in package.json and playground --- package.json | 4 +-- playground/components/AnimatedDonnut.vue | 1 - playground/package.json | 4 +-- playground/pnpm-lock.yaml | 32 +++++++++++++----------- pnpm-lock.yaml | 28 +++++++++++++-------- 5 files changed, 39 insertions(+), 30 deletions(-) diff --git a/package.json b/package.json index f2c3734..4ffffe2 100644 --- a/package.json +++ b/package.json @@ -55,7 +55,7 @@ "dependencies": { "@nuxt/kit": "^3.16.0", "@nuxt/ui": "^2.21.0", - "@tresjs/core": "5.0.0-next.1", + "@tresjs/core": "5.0.0-next.3", "@unocss/nuxt": "^66.0.0", "defu": "^6.1.4", "mlly": "^1.7.4", @@ -77,7 +77,7 @@ "@nuxt/test-utils": "^3.18.0", "@nuxt/ui": "^2.20.0", "@release-it/conventional-changelog": "^9.0.3", - "@tresjs/cientos": "5.0.0-next.0", + "@tresjs/cientos": "5.0.0-next.2", "@types/node": "^22.15.21", "@types/three": "^0.171.0", "@unocss/nuxt": "^66.1.2", diff --git a/playground/components/AnimatedDonnut.vue b/playground/components/AnimatedDonnut.vue index 3b301b8..b8ca628 100644 --- a/playground/components/AnimatedDonnut.vue +++ b/playground/components/AnimatedDonnut.vue @@ -17,7 +17,6 @@ onBeforeRender(({ delta /* invalidate */ }) => {