Three.js: TypeScript definitions (.d.ts) files are missing **BufferGeometry exports

Created on 5 Oct 2020  路  2Comments  路  Source: mrdoob/three.js

The Geometries.d.ts file shipped with each bundle of npm install three has exports for many kinds of Geometries but it seems to be missing BufferGeometry classes. For example BoxGeometry is exported but BoxBufferGeometry isn't. I'm inclined to believe this was intentional because I was able to add the line export * from './BoxBufferGeometry'; and TypeScript no longer complained. Is this a non-issue and should I continue to use Geometry? There was a noticeable difference in GPU memory consumption, BoxGeometry used more memory (100+ MB) but seemed faster and responsive while BoxBufferGeometry used less memory (50 MB tops) but seemed a little less performant.

Error message: Property BoxBufferGeometry does not exist on typenode_modules/three/src/Three``

image

Platform:

  • Device: Desktop
  • OS: Ubuntu 20.04 LTS
  • Browser: Chrome
  • Three.js version: r121

Most helpful comment

I think this is fixed the 0.121.1 version of the package?

All 2 comments

I think this is fixed the 0.121.1 version of the package?

Yes, my bad. For some reason the definition files were out-of-date. Doing a npm install three fixed it. Thanks!

Was this page helpful?
0 / 5 - 0 ratings