pmndrs / drei

🥉 useful helpers for react-three-fiber
https://docs.pmnd.rs/drei
MIT License
8.33k stars 689 forks source link

useTexture with WebGPU causes the error `undefined is not a function` #1653

Closed verekia closed 1 year ago

verekia commented 1 year ago

Problem description:

useTexture with WebGPU crashes with the following error:

Uncaught TypeError: undefined is not a function
    at Array.forEach (<anonymous>)
    at eval (useTexture.js:16:1)
    at commitHookEffectListMount (react-reconciler.development.js:14669:1)
    at commitPassiveMountOnFiber (react-reconciler.development.js:16531:1)
    at commitPassiveMountEffects_complete (react-reconciler.development.js:16495:1)
    at commitPassiveMountEffects_begin (react-reconciler.development.js:16482:1)
    at commitPassiveMountEffects (react-reconciler.development.js:16470:1)
    at flushPassiveEffectsImpl (react-reconciler.development.js:19142:1)
    at flushPassiveEffects (react-reconciler.development.js:19095:1)
    at eval (react-reconciler.development.js:18891:1)
    at workLoop (scheduler.development.js:266:1)
    at flushWork (scheduler.development.js:239:1)
    at MessagePort.performWorkUntilDeadline (scheduler.development.js:533:1)

Chrome 116 @react-three/drei: 9.83.9 @react-three/fiber: 8.14.2 three: 0.156.1 node version: v18.12.1

Relevant code:

Reproduced in this repo, uncomment useTexture:

https://github.com/verekia/r3f-webgpu/blob/main/components/Box.tsx

github-actions[bot] commented 1 year ago

:tada: This issue has been resolved in version 9.84.3 :tada:

The release is available on:

Your semantic-release bot :package::rocket: