Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: Update comparison of BufferGeometry vs Geometry? #13654

Closed
donmccurdy opened this issue Mar 21, 2018 · 1 comment
Closed

Docs: Update comparison of BufferGeometry vs Geometry? #13654

donmccurdy opened this issue Mar 21, 2018 · 1 comment

Comments

@donmccurdy
Copy link
Collaborator

Current language:

This class is an efficient alternative to Geometry, because it stores all data, including vertex positions, face indices, normals, colors, UVs, and custom attributes within buffers; this reduces the cost of passing all this data to the GPU.

This also makes BufferGeometry harder to work with than Geometry; rather than accessing position data as Vector3 objects, color data as Color objects, and so on, you have to access the raw data from the appropriate attribute buffer. This makes BufferGeometry best-suited for static objects where you don't need to manipulate the geometry much after instantiating it.

Is this still how we want to compare these, especially if we want to move toward putting Geometry in examples/js? The last paragraph particularly sounds to me like we're recommending Geometry for dynamic objects, and I don't think that's the case... perhaps we'd change to something like:

An efficient representation of mesh, line, or point geometry. Includes vertex positions, face indices, normals, colors, UVs, and custom attributes within buffers, reducing the cost of passing all this data to the GPU.

To read and edit data in BufferGeometry attributes, see BufferAttribute documentation.

For a less efficient but easier-to-use representation of geometry, see Geometry.

(context on Stack Overflow)

@Mugen87
Copy link
Collaborator

Mugen87 commented Mar 21, 2018

The last paragraph particularly sounds to me like we're recommending Geometry for dynamic objects, and I don't think that's the case.

Yes, the current wording is somewhat misleading. I like your suggestion since it's clear and compact.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants