-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Fixed issue in the .babylon serializer #16524
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
base: master
Are you sure you want to change the base?
Fixed issue in the .babylon serializer #16524
Conversation
Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s). |
Snapshot stored with reference name: Test environment: To test a playground add it to the URL, for example: https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/refs/pull/16524/merge/index.html#WGZLGJ#4600 Links to test babylon tools with this snapshot: https://playground.babylonjs.com/?snapshot=refs/pull/16524/merge To test the snapshot in the playground with a playground ID add it after the snapshot query string: https://playground.babylonjs.com/?snapshot=refs/pull/16524/merge#BCU1XR#0 |
Visualization tests for WebGPU |
WebGL2 visualization test reporter: |
Visualization tests for WebGPU |
WebGL2 visualization test reporter: |
@@ -1204,7 +1204,7 @@ export class Geometry implements IGetSetVerticesData { | |||
|
|||
if (this.isVerticesDataPresent(VertexBuffer.MatricesIndicesKind)) { | |||
serializationObject.matricesIndices = this._toNumberArray(this.getVerticesData(VertexBuffer.MatricesIndicesKind)); | |||
serializationObject.matricesIndices._isExpanded = true; | |||
serializationObject.matricesIndicesExpanded = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is not the only property that has this problem. We should maybe fix all of them? Search for _updatable
.
When serializing to .babylon file we are setting the _isExpanded property directly in the array object to flag if matrices indices are in compact or expanded form. However, JSON.stringify will remove those properties since it does not support properties in array objects. I'm moving those flags to the serializationObject itself to allows it to be properly exported. I'm also keeping the deserializer for it just in case someone has a file that somehow has that property in the array.
Releated to Exporters PR: BabylonJS/Exporters#1137