toJSON method
Implementation
Map<String, dynamic> toJSON(data) {
data.arrayBuffers ??= {};
// generate UUID for array buffer if necessary
// if ( this.array.buffer._uuid == null ) {
// this.array.buffer._uuid = MathUtils.generateUUID();
// }
// if ( data.arrayBuffers[ this.array.buffer._uuid ] == null ) {
// data.arrayBuffers[ this.array.buffer._uuid ] = Array.prototype.slice.call( new Uint32Array( this.array.buffer ) );
// }
//
return {
"uuid": uuid,
// "buffer": this.array.buffer._uuid,
// "type": this.array.constructor.name,
"buffer": array,
"type": "List",
"stride": stride
};
}