Skip to content

Conversation

@donmccurdy
Copy link
Member

Fixes #1538

If we're using BufferGeometry instead of BoxBufferGeometry / PlaneBufferGeometry (not sure what the performance implications are on that switch), it would be helpful to preserve some of the metadata. For example, I use this to construct CANNON.Shape instances from the geometry.

if (!doBuffer) { return geometry; }

bufferGeometry = new THREE.BufferGeometry().fromGeometry(geometry);
bufferGeometry.oldMetadata = {type: geometry.type, parameters: geometry.parameters || {}};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about just metadata?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No preference – only precedent I could find for this was mesh.userData[*] but it would be a little more complicated to pass this metadata up to the Mesh probably

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was thinking we name it metadata since the data is still current, but just destroyed.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good / done!

@ngokevin ngokevin merged commit 4661050 into aframevr:master Jun 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants