babylonjs-serializers 5.43.0 → 5.43.1
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
|
@@ -4384,11 +4384,10 @@ var _BinaryWriter = /** @class */ (function () {
|
|
|
4384
4384
|
*/
|
|
4385
4385
|
_BinaryWriter.prototype._resizeBuffer = function (byteLength) {
|
|
4386
4386
|
var newBuffer = new ArrayBuffer(byteLength);
|
|
4387
|
-
var
|
|
4387
|
+
var copyOldBufferSize = Math.min(this._arrayBuffer.byteLength, byteLength);
|
|
4388
|
+
var oldUint8Array = new Uint8Array(this._arrayBuffer, 0, copyOldBufferSize);
|
|
4388
4389
|
var newUint8Array = new Uint8Array(newBuffer);
|
|
4389
|
-
|
|
4390
|
-
newUint8Array[i] = oldUint8Array[i];
|
|
4391
|
-
}
|
|
4390
|
+
newUint8Array.set(oldUint8Array, 0);
|
|
4392
4391
|
this._arrayBuffer = newBuffer;
|
|
4393
4392
|
this._dataView = new DataView(this._arrayBuffer);
|
|
4394
4393
|
return newBuffer;
|