Skip to content

Conversation

@takahirox
Copy link
Collaborator

Related PR: #21225

Description

This PR adds missing BufferAttribute .name, .usage, and .updateRange serialization and deserialization to BufferAttribute.toJSON() and BufferGeometryLoader.parse() and adds unit tests to check them.

@takahirox
Copy link
Collaborator Author

takahirox commented Feb 15, 2021

By the way, I found that BufferAttribute.name is serialized in BufferGeometry.toJSON().

https://github.com/mrdoob/three.js/blob/r125/src/core/BufferGeometry.js#L934

Do you folks know what's this design for?

@Mugen87
Copy link
Collaborator

Mugen87 commented Feb 15, 2021

No idea, but that is confusing.

@takahirox
Copy link
Collaborator Author

It seems the line was missed to be moved into BufferAttribute.toJSON() when introducing BufferAttribute.toJSON() in 672258e

I would suggest moving the line (meaning, deleting the line of BufferGeometry.toJSON() in this PR).

@takahirox takahirox force-pushed the ImproveBufferAttributeToJSON branch from 8e1a3ac to 54d246f Compare February 15, 2021 10:34
@Mugen87 Mugen87 added this to the r126 milestone Feb 16, 2021
@mrdoob mrdoob modified the milestones: r126, r127 Feb 23, 2021
@mrdoob mrdoob merged commit 7821479 into mrdoob:dev Mar 15, 2021
@mrdoob
Copy link
Owner

mrdoob commented Mar 15, 2021

Thanks!

@takahirox takahirox deleted the ImproveBufferAttributeToJSON branch March 15, 2021 23:22
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

Successfully merging this pull request may close these issues.

3 participants