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
|
@@ -5264,14 +5264,7 @@ var GLTFLoader = /** @class */ (function () {
|
|
|
5264
5264
|
accessor._babylonVertexBuffer = {};
|
|
5265
5265
|
}
|
|
5266
5266
|
var engine = this._babylonScene.getEngine();
|
|
5267
|
-
if (accessor.sparse) {
|
|
5268
|
-
accessor._babylonVertexBuffer[kind] = this._loadFloatAccessorAsync(context, accessor).then(function (data) {
|
|
5269
|
-
return new babylonjs_Misc_deferred__WEBPACK_IMPORTED_MODULE_0__.VertexBuffer(engine, data, kind, false);
|
|
5270
|
-
});
|
|
5271
|
-
}
|
|
5272
|
-
// Load joint indices as a float array since the shaders expect float data but glTF uses unsigned byte/short.
|
|
5273
|
-
// This prevents certain platforms (e.g. D3D) from having to convert the data to float on the fly.
|
|
5274
|
-
else if (kind === babylonjs_Misc_deferred__WEBPACK_IMPORTED_MODULE_0__.VertexBuffer.MatricesIndicesKind || kind === babylonjs_Misc_deferred__WEBPACK_IMPORTED_MODULE_0__.VertexBuffer.MatricesIndicesExtraKind) {
|
|
5267
|
+
if (accessor.sparse || accessor.bufferView == undefined) {
|
|
5275
5268
|
accessor._babylonVertexBuffer[kind] = this._loadFloatAccessorAsync(context, accessor).then(function (data) {
|
|
5276
5269
|
return new babylonjs_Misc_deferred__WEBPACK_IMPORTED_MODULE_0__.VertexBuffer(engine, data, kind, false);
|
|
5277
5270
|
});
|
|
@@ -5279,8 +5272,8 @@ var GLTFLoader = /** @class */ (function () {
|
|
|
5279
5272
|
else {
|
|
5280
5273
|
var bufferView_2 = ArrayItem.Get("".concat(context, "/bufferView"), this._gltf.bufferViews, accessor.bufferView);
|
|
5281
5274
|
accessor._babylonVertexBuffer[kind] = this._loadVertexBufferViewAsync(bufferView_2).then(function (babylonBuffer) {
|
|
5282
|
-
var
|
|
5283
|
-
return new babylonjs_Misc_deferred__WEBPACK_IMPORTED_MODULE_0__.VertexBuffer(engine, babylonBuffer, kind, false,
|
|
5275
|
+
var numComponents = GLTFLoader._GetNumComponents(context, accessor.type);
|
|
5276
|
+
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);
|
|
5284
5277
|
});
|
|
5285
5278
|
}
|
|
5286
5279
|
return accessor._babylonVertexBuffer[kind];
|