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

[geometry-merger] Use BufferGeometryUtils.mergeBufferGeometries() #133

Closed
donmccurdy opened this issue Mar 4, 2018 · 3 comments
Closed

Comments

@donmccurdy
Copy link

donmccurdy commented Mar 4, 2018

three.js r91 will have a utility for merging buffer geometries non-destructively:

var mergedGeom = BufferGeometryUtils.mergeBufferGeometries( [ geom1, geom2, geom3 ] );

The method will return null and do nothing if any of the geometries are incompatible (different attributes, some indexed others not, etc.) so this works best with geometry that has all been created in the same way.

mrdoob/three.js#13241

@ngokevin
Copy link
Collaborator

done

@ngokevin
Copy link
Collaborator

I think I use a modified one that checks if that extra/userData object exists...been a bit of pain to have a version that works with multiple versions of three.js. That can be upstreamed to three.js to be backwards-compat

@donmccurdy
Copy link
Author

@ngokevin the docs page still says:

Doesn't support buffer geometries yet.

Looks like that needs to be updated? With Geometry pretty much deprecated in three.js, it may be worth encouraging people that way.

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

No branches or pull requests

2 participants