Three.js Cannot find name ‘WebGL2RenderingContext’
发布于 1 个月前 作者 qjzd 127 次浏览 来自 码农

处理办法

npm install --save-dev @types/offscreencanvas
npm install --save-dev @types/webgl2

修改tsconfig.json

 "types": ["node", "webgl2", "offscreencanvas"]

参考

https://discourse.threejs.org/t/cannot-find-name-webgl2renderingcontext/10725

https://stackoverflow.com/questions/59168792/three-js-angular-7-getting-error-bufferattribute-after-imported-to-controller

回到顶部