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
package/babylonjs.loaders.js
CHANGED
|
@@ -9361,14 +9361,7 @@ var GLTFLoader = /** @class */ (function () {
|
|
|
9361
9361
|
accessor._babylonVertexBuffer = {};
|
|
9362
9362
|
}
|
|
9363
9363
|
var engine = this._babylonScene.getEngine();
|
|
9364
|
-
if (accessor.sparse) {
|
|
9365
|
-
accessor._babylonVertexBuffer[kind] = this._loadFloatAccessorAsync(context, accessor).then(function (data) {
|
|
9366
|
-
return new babylonjs_Misc_deferred__WEBPACK_IMPORTED_MODULE_0__.VertexBuffer(engine, data, kind, false);
|
|
9367
|
-
});
|
|
9368
|
-
}
|
|
9369
|
-
// Load joint indices as a float array since the shaders expect float data but glTF uses unsigned byte/short.
|
|
9370
|
-
// This prevents certain platforms (e.g. D3D) from having to convert the data to float on the fly.
|
|
9371
|
-
else if (kind === babylonjs_Misc_deferred__WEBPACK_IMPORTED_MODULE_0__.VertexBuffer.MatricesIndicesKind || kind === babylonjs_Misc_deferred__WEBPACK_IMPORTED_MODULE_0__.VertexBuffer.MatricesIndicesExtraKind) {
|
|
9364
|
+
if (accessor.sparse || accessor.bufferView == undefined) {
|
|
9372
9365
|
accessor._babylonVertexBuffer[kind] = this._loadFloatAccessorAsync(context, accessor).then(function (data) {
|
|
9373
9366
|
return new babylonjs_Misc_deferred__WEBPACK_IMPORTED_MODULE_0__.VertexBuffer(engine, data, kind, false);
|
|
9374
9367
|
});
|
|
@@ -9376,8 +9369,8 @@ var GLTFLoader = /** @class */ (function () {
|
|
|
9376
9369
|
else {
|
|
9377
9370
|
var bufferView_2 = ArrayItem.Get("".concat(context, "/bufferView"), this._gltf.bufferViews, accessor.bufferView);
|
|
9378
9371
|
accessor._babylonVertexBuffer[kind] = this._loadVertexBufferViewAsync(bufferView_2).then(function (babylonBuffer) {
|
|
9379
|
-
var
|
|
9380
|
-
return new babylonjs_Misc_deferred__WEBPACK_IMPORTED_MODULE_0__.VertexBuffer(engine, babylonBuffer, kind, false,
|
|
9372
|
+
var numComponents = GLTFLoader._GetNumComponents(context, accessor.type);
|
|
9373
|
+
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);
|
|
9381
9374
|
});
|
|
9382
9375
|
}
|
|
9383
9376
|
return accessor._babylonVertexBuffer[kind];
|