You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 1, 2026. It is now read-only.
I have a Nuxt 3 app and in it a page with a Tres.js scene. The scene contains <TresDirectionalLight cast-shadow /> which casts a shadow. When navigating away from the page with the scene and navigating back to the scene (using NuxtLink), I get the error below.
When I remove the cast-shadow prop, the bug disappears.
three.js?v=f17f74c8:17801 Uncaught TypeError: Cannot read properties of null (reading 'state')
at setProgram (three.js?v=f17f74c8:17801:41)
at WebGLRenderer.renderBufferDirect (three.js?v=f17f74c8:17292:23)
at renderObject (three.js?v=f17f74c8:13624:21)
at renderObject (three.js?v=f17f74c8:13631:7)
at WebGLShadowMap.render (three.js?v=f17f74c8:13519:9)
at WebGLRenderer.render (three.js?v=f17f74c8:17493:17)
at tres.js:387:33
at index.mjs:71:52
at Array.map (<anonymous>)
at Object.trigger (index.mjs:71:40)
Describe the bug
I have a Nuxt 3 app and in it a page with a Tres.js scene. The scene contains
<TresDirectionalLight cast-shadow />which casts a shadow. When navigating away from the page with the scene and navigating back to the scene (using NuxtLink), I get the error below.When I remove the
cast-shadowprop, the bug disappears.complete error log
Reproduction
https://stackblitz.com/edit/nuxt-starter-w3neca?file=pages%2Findex.vue
Steps to reproduce
No response
System Info
System: OS: macOS 14.6.1 CPU: (10) arm64 Apple M1 Pro Memory: 79.77 MB / 32.00 GB Shell: 5.9 - /bin/zsh Binaries: Node: 20.9.0 - ~/.nvm/versions/node/v20.9.0/bin/node Yarn: 1.22.19 - /opt/homebrew/bin/yarn npm: 10.1.0 - ~/.nvm/versions/node/v20.9.0/bin/npm pnpm: 9.4.0 - ~/Library/pnpm/pnpm bun: 1.0.3 - ~/.bun/bin/bun Browsers: Chrome: 129.0.6668.100 Safari: 17.6 npmPackages: @tresjs/cientos: ^4.0.3 => 4.0.2 @tresjs/core: ^4.2.10 => 4.2.10 @tresjs/nuxt: ^3.0.7 => 3.0.7Used Package Manager
npm
Code of Conduct