babylonjs-serializers 5.43.0 → 5.43.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/babylon.glTF2Serializer.js +3 -4
- package/babylon.glTF2Serializer.js.map +1 -1
- package/babylon.glTF2Serializer.min.js +1 -1
- package/babylon.glTF2Serializer.min.js.map +1 -1
- package/babylonjs.serializers.js +3 -4
- package/babylonjs.serializers.js.map +1 -1
- package/babylonjs.serializers.min.js +1 -1
- package/babylonjs.serializers.min.js.map +1 -1
- package/package.json +3 -3
package/babylonjs.serializers.js
CHANGED
|
@@ -4590,11 +4590,10 @@ var _BinaryWriter = /** @class */ (function () {
|
|
|
4590
4590
|
*/
|
|
4591
4591
|
_BinaryWriter.prototype._resizeBuffer = function (byteLength) {
|
|
4592
4592
|
var newBuffer = new ArrayBuffer(byteLength);
|
|
4593
|
-
var
|
|
4593
|
+
var copyOldBufferSize = Math.min(this._arrayBuffer.byteLength, byteLength);
|
|
4594
|
+
var oldUint8Array = new Uint8Array(this._arrayBuffer, 0, copyOldBufferSize);
|
|
4594
4595
|
var newUint8Array = new Uint8Array(newBuffer);
|
|
4595
|
-
|
|
4596
|
-
newUint8Array[i] = oldUint8Array[i];
|
|
4597
|
-
}
|
|
4596
|
+
newUint8Array.set(oldUint8Array, 0);
|
|
4598
4597
|
this._arrayBuffer = newBuffer;
|
|
4599
4598
|
this._dataView = new DataView(this._arrayBuffer);
|
|
4600
4599
|
return newBuffer;
|