babylonjs-loaders 6.23.0 → 6.23.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.glTF2FileLoader.js +3 -10
- package/babylon.glTF2FileLoader.js.map +1 -1
- package/babylon.glTF2FileLoader.min.js +1 -1
- package/babylon.glTF2FileLoader.min.js.map +1 -1
- package/babylon.glTFFileLoader.js +3 -10
- package/babylon.glTFFileLoader.js.map +1 -1
- package/babylon.glTFFileLoader.min.js +1 -1
- package/babylon.glTFFileLoader.min.js.map +1 -1
- package/babylonjs.loaders.js +3 -10
- package/babylonjs.loaders.js.map +1 -1
- package/babylonjs.loaders.min.js +1 -1
- package/babylonjs.loaders.min.js.map +1 -1
- package/package.json +3 -3
|
@@ -7751,14 +7751,7 @@ var GLTFLoader = /** @class */ (function () {
|
|
|
7751
7751
|
accessor._babylonVertexBuffer = {};
|
|
7752
7752
|
}
|
|
7753
7753
|
var engine = this._babylonScene.getEngine();
|
|
7754
|
-
if (accessor.sparse) {
|
|
7755
|
-
accessor._babylonVertexBuffer[kind] = this._loadFloatAccessorAsync(context, accessor).then(function (data) {
|
|
7756
|
-
return new babylonjs_Misc_deferred__WEBPACK_IMPORTED_MODULE_0__.VertexBuffer(engine, data, kind, false);
|
|
7757
|
-
});
|
|
7758
|
-
}
|
|
7759
|
-
// Load joint indices as a float array since the shaders expect float data but glTF uses unsigned byte/short.
|
|
7760
|
-
// This prevents certain platforms (e.g. D3D) from having to convert the data to float on the fly.
|
|
7761
|
-
else if (kind === babylonjs_Misc_deferred__WEBPACK_IMPORTED_MODULE_0__.VertexBuffer.MatricesIndicesKind || kind === babylonjs_Misc_deferred__WEBPACK_IMPORTED_MODULE_0__.VertexBuffer.MatricesIndicesExtraKind) {
|
|
7754
|
+
if (accessor.sparse || accessor.bufferView == undefined) {
|
|
7762
7755
|
accessor._babylonVertexBuffer[kind] = this._loadFloatAccessorAsync(context, accessor).then(function (data) {
|
|
7763
7756
|
return new babylonjs_Misc_deferred__WEBPACK_IMPORTED_MODULE_0__.VertexBuffer(engine, data, kind, false);
|
|
7764
7757
|
});
|
|
@@ -7766,8 +7759,8 @@ var GLTFLoader = /** @class */ (function () {
|
|
|
7766
7759
|
else {
|
|
7767
7760
|
var bufferView_2 = ArrayItem.Get("".concat(context, "/bufferView"), this._gltf.bufferViews, accessor.bufferView);
|
|
7768
7761
|
accessor._babylonVertexBuffer[kind] = this._loadVertexBufferViewAsync(bufferView_2).then(function (babylonBuffer) {
|
|
7769
|
-
var
|
|
7770
|
-
return new babylonjs_Misc_deferred__WEBPACK_IMPORTED_MODULE_0__.VertexBuffer(engine, babylonBuffer, kind, false,
|
|
7762
|
+
var numComponents = GLTFLoader._GetNumComponents(context, accessor.type);
|
|
7763
|
+
return new babylonjs_Misc_deferred__WEBPACK_IMPORTED_MODULE_0__.VertexBuffer(engine, babylonBuffer, kind, false, undefined, bufferView_2.byteStride, undefined, accessor.byteOffset, numComponents, accessor.componentType, accessor.normalized, true, undefined, true);
|
|
7771
7764
|
});
|
|
7772
7765
|
}
|
|
7773
7766
|
return accessor._babylonVertexBuffer[kind];
|