I wanted to add a GLB model into my angular 15 project, and getting this error Error:
This is my three.js version
I want know how to fix that
I wanted to add a GLB model into my angular 15 project, and getting this error Error:
three/webgpu
isn’t recognized (yet) out of the box
as manthrax wrote, you have to either use importmap
or a complete path
another trick is current addons always import three
. some cases could require to open the script and use three/webgpu
instead (like GLTFloader, line 67). But once again it depend. If you forward three
to the gpu version it is not necessary (theorically) , but if you importmap three/webgpu
you rather do it.
following people having issue with this from discord help channel, seem this is indeed not working well. There is some throttle in place I guess? Don’t leech from three.org
Yea.. feel free to post the correct package setup and importmap then.
three.webgpu.js (1.6 MB)
Grab this ^
Put it somewhere in your source tree and import it…
import *as THREE from "yourpath/three.webgpu.js"
Thanks for everyone’s answers but I still can’t solve maybe I didn’t describe the problem. My native language is not English,I commented some code for KTX2Loader.d.ts ,My project is run,Maybe this error can fix in the future
As @manthrax pointed out, you’ll also need to install the types, and make sure they’re the same version as the installed three
package, especially with three/webgpu
as the updates are quite often.
npm install three@0.174.0 @types/three@0.174.0