babylonjs-loaders 5.24.0 → 5.25.0
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.glTF1FileLoader.js +31 -64
- package/babylon.glTF1FileLoader.js.map +1 -1
- package/babylon.glTF1FileLoader.min.js.map +1 -1
- package/babylon.glTF2FileLoader.js +123 -308
- package/babylon.glTF2FileLoader.js.map +1 -1
- package/babylon.glTF2FileLoader.min.js.map +1 -1
- package/babylon.glTFFileLoader.js +137 -322
- package/babylon.glTFFileLoader.js.map +1 -1
- package/babylon.glTFFileLoader.min.js.map +1 -1
- package/babylon.stlFileLoader.js +4 -4
- package/babylon.stlFileLoader.js.map +1 -1
- package/babylon.stlFileLoader.min.js.map +1 -1
- package/babylonjs.loaders.d.ts +209 -394
- package/babylonjs.loaders.js +141 -326
- package/babylonjs.loaders.js.map +1 -1
- package/babylonjs.loaders.min.js.map +1 -1
- package/babylonjs.loaders.module.d.ts +418 -788
- package/package.json +3 -3
|
@@ -318,7 +318,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
318
318
|
|
|
319
319
|
var BinaryExtensionBufferName = "binary_glTF";
|
|
320
320
|
/**
|
|
321
|
-
* @
|
|
321
|
+
* @internal
|
|
322
322
|
* @deprecated
|
|
323
323
|
*/
|
|
324
324
|
var GLTFBinaryExtension = /** @class */ (function (_super) {
|
|
@@ -1478,7 +1478,7 @@ var importMaterials = function (gltfRuntime) {
|
|
|
1478
1478
|
};
|
|
1479
1479
|
/**
|
|
1480
1480
|
* Implementation of the base glTF spec
|
|
1481
|
-
* @
|
|
1481
|
+
* @internal
|
|
1482
1482
|
*/
|
|
1483
1483
|
var GLTFLoaderBase = /** @class */ (function () {
|
|
1484
1484
|
function GLTFLoaderBase() {
|
|
@@ -1817,7 +1817,7 @@ var GLTFLoaderBase = /** @class */ (function () {
|
|
|
1817
1817
|
|
|
1818
1818
|
/**
|
|
1819
1819
|
* glTF V1 Loader
|
|
1820
|
-
* @
|
|
1820
|
+
* @internal
|
|
1821
1821
|
* @deprecated
|
|
1822
1822
|
*/
|
|
1823
1823
|
var GLTFLoader = /** @class */ (function () {
|
|
@@ -2041,7 +2041,7 @@ var GLTFLoader = /** @class */ (function () {
|
|
|
2041
2041
|
return GLTFLoader;
|
|
2042
2042
|
}());
|
|
2043
2043
|
|
|
2044
|
-
/** @
|
|
2044
|
+
/** @internal */
|
|
2045
2045
|
var GLTFLoaderExtension = /** @class */ (function () {
|
|
2046
2046
|
function GLTFLoaderExtension(name) {
|
|
2047
2047
|
this._name = name;
|
|
@@ -2234,7 +2234,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2234
2234
|
/* harmony export */ });
|
|
2235
2235
|
/**
|
|
2236
2236
|
* Enums
|
|
2237
|
-
* @
|
|
2237
|
+
* @internal
|
|
2238
2238
|
*/
|
|
2239
2239
|
var EComponentType;
|
|
2240
2240
|
(function (EComponentType) {
|
|
@@ -2244,13 +2244,13 @@ var EComponentType;
|
|
|
2244
2244
|
EComponentType[EComponentType["UNSIGNED_SHORT"] = 5123] = "UNSIGNED_SHORT";
|
|
2245
2245
|
EComponentType[EComponentType["FLOAT"] = 5126] = "FLOAT";
|
|
2246
2246
|
})(EComponentType || (EComponentType = {}));
|
|
2247
|
-
/** @
|
|
2247
|
+
/** @internal */
|
|
2248
2248
|
var EShaderType;
|
|
2249
2249
|
(function (EShaderType) {
|
|
2250
2250
|
EShaderType[EShaderType["FRAGMENT"] = 35632] = "FRAGMENT";
|
|
2251
2251
|
EShaderType[EShaderType["VERTEX"] = 35633] = "VERTEX";
|
|
2252
2252
|
})(EShaderType || (EShaderType = {}));
|
|
2253
|
-
/** @
|
|
2253
|
+
/** @internal */
|
|
2254
2254
|
var EParameterType;
|
|
2255
2255
|
(function (EParameterType) {
|
|
2256
2256
|
EParameterType[EParameterType["BYTE"] = 5120] = "BYTE";
|
|
@@ -2275,14 +2275,14 @@ var EParameterType;
|
|
|
2275
2275
|
EParameterType[EParameterType["FLOAT_MAT4"] = 35676] = "FLOAT_MAT4";
|
|
2276
2276
|
EParameterType[EParameterType["SAMPLER_2D"] = 35678] = "SAMPLER_2D";
|
|
2277
2277
|
})(EParameterType || (EParameterType = {}));
|
|
2278
|
-
/** @
|
|
2278
|
+
/** @internal */
|
|
2279
2279
|
var ETextureWrapMode;
|
|
2280
2280
|
(function (ETextureWrapMode) {
|
|
2281
2281
|
ETextureWrapMode[ETextureWrapMode["CLAMP_TO_EDGE"] = 33071] = "CLAMP_TO_EDGE";
|
|
2282
2282
|
ETextureWrapMode[ETextureWrapMode["MIRRORED_REPEAT"] = 33648] = "MIRRORED_REPEAT";
|
|
2283
2283
|
ETextureWrapMode[ETextureWrapMode["REPEAT"] = 10497] = "REPEAT";
|
|
2284
2284
|
})(ETextureWrapMode || (ETextureWrapMode = {}));
|
|
2285
|
-
/** @
|
|
2285
|
+
/** @internal */
|
|
2286
2286
|
var ETextureFilterType;
|
|
2287
2287
|
(function (ETextureFilterType) {
|
|
2288
2288
|
ETextureFilterType[ETextureFilterType["NEAREST"] = 9728] = "NEAREST";
|
|
@@ -2292,7 +2292,7 @@ var ETextureFilterType;
|
|
|
2292
2292
|
ETextureFilterType[ETextureFilterType["NEAREST_MIPMAP_LINEAR"] = 9986] = "NEAREST_MIPMAP_LINEAR";
|
|
2293
2293
|
ETextureFilterType[ETextureFilterType["LINEAR_MIPMAP_LINEAR"] = 9987] = "LINEAR_MIPMAP_LINEAR";
|
|
2294
2294
|
})(ETextureFilterType || (ETextureFilterType = {}));
|
|
2295
|
-
/** @
|
|
2295
|
+
/** @internal */
|
|
2296
2296
|
var ETextureFormat;
|
|
2297
2297
|
(function (ETextureFormat) {
|
|
2298
2298
|
ETextureFormat[ETextureFormat["ALPHA"] = 6406] = "ALPHA";
|
|
@@ -2301,14 +2301,14 @@ var ETextureFormat;
|
|
|
2301
2301
|
ETextureFormat[ETextureFormat["LUMINANCE"] = 6409] = "LUMINANCE";
|
|
2302
2302
|
ETextureFormat[ETextureFormat["LUMINANCE_ALPHA"] = 6410] = "LUMINANCE_ALPHA";
|
|
2303
2303
|
})(ETextureFormat || (ETextureFormat = {}));
|
|
2304
|
-
/** @
|
|
2304
|
+
/** @internal */
|
|
2305
2305
|
var ECullingType;
|
|
2306
2306
|
(function (ECullingType) {
|
|
2307
2307
|
ECullingType[ECullingType["FRONT"] = 1028] = "FRONT";
|
|
2308
2308
|
ECullingType[ECullingType["BACK"] = 1029] = "BACK";
|
|
2309
2309
|
ECullingType[ECullingType["FRONT_AND_BACK"] = 1032] = "FRONT_AND_BACK";
|
|
2310
2310
|
})(ECullingType || (ECullingType = {}));
|
|
2311
|
-
/** @
|
|
2311
|
+
/** @internal */
|
|
2312
2312
|
var EBlendingFunction;
|
|
2313
2313
|
(function (EBlendingFunction) {
|
|
2314
2314
|
EBlendingFunction[EBlendingFunction["ZERO"] = 0] = "ZERO";
|
|
@@ -2352,7 +2352,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2352
2352
|
|
|
2353
2353
|
/**
|
|
2354
2354
|
* Utils functions for GLTF
|
|
2355
|
-
* @
|
|
2355
|
+
* @internal
|
|
2356
2356
|
* @deprecated
|
|
2357
2357
|
*/
|
|
2358
2358
|
var GLTFUtils = /** @class */ (function () {
|
|
@@ -2625,7 +2625,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2625
2625
|
|
|
2626
2626
|
|
|
2627
2627
|
/**
|
|
2628
|
-
* @
|
|
2628
|
+
* @internal
|
|
2629
2629
|
* @deprecated
|
|
2630
2630
|
*/
|
|
2631
2631
|
var GLTFMaterialsCommonExtension = /** @class */ (function (_super) {
|
|
@@ -3012,7 +3012,7 @@ var GLTFFileLoader = /** @class */ (function () {
|
|
|
3012
3012
|
* Name of the loader ("gltf")
|
|
3013
3013
|
*/
|
|
3014
3014
|
this.name = "gltf";
|
|
3015
|
-
/** @
|
|
3015
|
+
/** @internal */
|
|
3016
3016
|
this.extensions = {
|
|
3017
3017
|
".gltf": { isBinary: false },
|
|
3018
3018
|
".glb": { isBinary: true },
|
|
@@ -3023,12 +3023,12 @@ var GLTFFileLoader = /** @class */ (function () {
|
|
|
3023
3023
|
this.onLoaderStateChangedObservable = new core_Misc_observable__WEBPACK_IMPORTED_MODULE_0__.Observable();
|
|
3024
3024
|
this._logIndentLevel = 0;
|
|
3025
3025
|
this._loggingEnabled = false;
|
|
3026
|
-
/** @
|
|
3026
|
+
/** @internal */
|
|
3027
3027
|
this._log = this._logDisabled;
|
|
3028
3028
|
this._capturePerformanceCounters = false;
|
|
3029
|
-
/** @
|
|
3029
|
+
/** @internal */
|
|
3030
3030
|
this._startPerformanceCounter = this._startPerformanceCounterDisabled;
|
|
3031
|
-
/** @
|
|
3031
|
+
/** @internal */
|
|
3032
3032
|
this._endPerformanceCounter = this._endPerformanceCounterDisabled;
|
|
3033
3033
|
}
|
|
3034
3034
|
Object.defineProperty(GLTFFileLoader.prototype, "onParsed", {
|
|
@@ -3236,13 +3236,7 @@ var GLTFFileLoader = /** @class */ (function () {
|
|
|
3236
3236
|
this.onDisposeObservable.clear();
|
|
3237
3237
|
};
|
|
3238
3238
|
/**
|
|
3239
|
-
* @
|
|
3240
|
-
* @param fileOrUrl
|
|
3241
|
-
* @param onSuccess
|
|
3242
|
-
* @param onProgress
|
|
3243
|
-
* @param useArrayBuffer
|
|
3244
|
-
* @param onError
|
|
3245
|
-
* @hidden
|
|
3239
|
+
* @internal
|
|
3246
3240
|
*/
|
|
3247
3241
|
GLTFFileLoader.prototype.loadFile = function (scene, fileOrUrl, onSuccess, onProgress, useArrayBuffer, onError) {
|
|
3248
3242
|
var _this = this;
|
|
@@ -3294,13 +3288,7 @@ var GLTFFileLoader = /** @class */ (function () {
|
|
|
3294
3288
|
}, useArrayBuffer, onError);
|
|
3295
3289
|
};
|
|
3296
3290
|
/**
|
|
3297
|
-
* @
|
|
3298
|
-
* @param scene
|
|
3299
|
-
* @param data
|
|
3300
|
-
* @param rootUrl
|
|
3301
|
-
* @param onProgress
|
|
3302
|
-
* @param fileName
|
|
3303
|
-
* @hidden
|
|
3291
|
+
* @internal
|
|
3304
3292
|
*/
|
|
3305
3293
|
GLTFFileLoader.prototype.importMeshAsync = function (meshesNames, scene, data, rootUrl, onProgress, fileName) {
|
|
3306
3294
|
var _this = this;
|
|
@@ -3313,12 +3301,7 @@ var GLTFFileLoader = /** @class */ (function () {
|
|
|
3313
3301
|
});
|
|
3314
3302
|
};
|
|
3315
3303
|
/**
|
|
3316
|
-
* @
|
|
3317
|
-
* @param data
|
|
3318
|
-
* @param rootUrl
|
|
3319
|
-
* @param onProgress
|
|
3320
|
-
* @param fileName
|
|
3321
|
-
* @hidden
|
|
3304
|
+
* @internal
|
|
3322
3305
|
*/
|
|
3323
3306
|
GLTFFileLoader.prototype.loadAsync = function (scene, data, rootUrl, onProgress, fileName) {
|
|
3324
3307
|
var _this = this;
|
|
@@ -3331,12 +3314,7 @@ var GLTFFileLoader = /** @class */ (function () {
|
|
|
3331
3314
|
});
|
|
3332
3315
|
};
|
|
3333
3316
|
/**
|
|
3334
|
-
* @
|
|
3335
|
-
* @param data
|
|
3336
|
-
* @param rootUrl
|
|
3337
|
-
* @param onProgress
|
|
3338
|
-
* @param fileName
|
|
3339
|
-
* @hidden
|
|
3317
|
+
* @internal
|
|
3340
3318
|
*/
|
|
3341
3319
|
GLTFFileLoader.prototype.loadAssetContainerAsync = function (scene, data, rootUrl, onProgress, fileName) {
|
|
3342
3320
|
var _this = this;
|
|
@@ -3376,8 +3354,7 @@ var GLTFFileLoader = /** @class */ (function () {
|
|
|
3376
3354
|
});
|
|
3377
3355
|
};
|
|
3378
3356
|
/**
|
|
3379
|
-
* @
|
|
3380
|
-
* @hidden
|
|
3357
|
+
* @internal
|
|
3381
3358
|
*/
|
|
3382
3359
|
GLTFFileLoader.prototype.canDirectLoad = function (data) {
|
|
3383
3360
|
return ((data.indexOf("asset") !== -1 && data.indexOf("version") !== -1) ||
|
|
@@ -3387,9 +3364,7 @@ var GLTFFileLoader = /** @class */ (function () {
|
|
|
3387
3364
|
data.startsWith("data:model/gltf-binary;base64," + GLTFFileLoader._MagicBase64Encoded));
|
|
3388
3365
|
};
|
|
3389
3366
|
/**
|
|
3390
|
-
* @
|
|
3391
|
-
* @param data
|
|
3392
|
-
* @hidden
|
|
3367
|
+
* @internal
|
|
3393
3368
|
*/
|
|
3394
3369
|
GLTFFileLoader.prototype.directLoad = function (scene, data) {
|
|
3395
3370
|
if (data.startsWith("base64," + GLTFFileLoader._MagicBase64Encoded) || // this is technically incorrect, but will continue to support for backcompat.
|
|
@@ -3406,7 +3381,7 @@ var GLTFFileLoader = /** @class */ (function () {
|
|
|
3406
3381
|
this._validate(scene, data);
|
|
3407
3382
|
return Promise.resolve({ json: this._parseJson(data) });
|
|
3408
3383
|
};
|
|
3409
|
-
/** @
|
|
3384
|
+
/** @internal */
|
|
3410
3385
|
GLTFFileLoader.prototype.createPlugin = function () {
|
|
3411
3386
|
return new GLTFFileLoader();
|
|
3412
3387
|
};
|
|
@@ -3436,8 +3411,7 @@ var GLTFFileLoader = /** @class */ (function () {
|
|
|
3436
3411
|
});
|
|
3437
3412
|
};
|
|
3438
3413
|
/**
|
|
3439
|
-
* @
|
|
3440
|
-
* @hidden
|
|
3414
|
+
* @internal
|
|
3441
3415
|
*/
|
|
3442
3416
|
GLTFFileLoader.prototype._setState = function (state) {
|
|
3443
3417
|
if (this._state === state) {
|
|
@@ -3448,13 +3422,7 @@ var GLTFFileLoader = /** @class */ (function () {
|
|
|
3448
3422
|
this._log(GLTFLoaderState[this._state]);
|
|
3449
3423
|
};
|
|
3450
3424
|
/**
|
|
3451
|
-
* @
|
|
3452
|
-
* @param fileOrUrl
|
|
3453
|
-
* @param onSuccess
|
|
3454
|
-
* @param useArrayBuffer
|
|
3455
|
-
* @param onError
|
|
3456
|
-
* @param onOpened
|
|
3457
|
-
* @hidden
|
|
3425
|
+
* @internal
|
|
3458
3426
|
*/
|
|
3459
3427
|
GLTFFileLoader.prototype._loadFile = function (scene, fileOrUrl, onSuccess, useArrayBuffer, onError, onOpened) {
|
|
3460
3428
|
var _this = this;
|
|
@@ -3688,14 +3656,13 @@ var GLTFFileLoader = /** @class */ (function () {
|
|
|
3688
3656
|
return 0;
|
|
3689
3657
|
};
|
|
3690
3658
|
/**
|
|
3691
|
-
* @
|
|
3692
|
-
* @hidden
|
|
3659
|
+
* @internal
|
|
3693
3660
|
*/
|
|
3694
3661
|
GLTFFileLoader.prototype._logOpen = function (message) {
|
|
3695
3662
|
this._log(message);
|
|
3696
3663
|
this._logIndentLevel++;
|
|
3697
3664
|
};
|
|
3698
|
-
/** @
|
|
3665
|
+
/** @internal */
|
|
3699
3666
|
GLTFFileLoader.prototype._logClose = function () {
|
|
3700
3667
|
--this._logIndentLevel;
|
|
3701
3668
|
};
|
|
@@ -3719,13 +3686,13 @@ var GLTFFileLoader = /** @class */ (function () {
|
|
|
3719
3686
|
* Set this property to false to disable incremental loading which delays the loader from calling the success callback until after loading the meshes and shaders.
|
|
3720
3687
|
* Textures always loads asynchronously. For example, the success callback can compute the bounding information of the loaded meshes when incremental loading is disabled.
|
|
3721
3688
|
* Defaults to true.
|
|
3722
|
-
* @
|
|
3689
|
+
* @internal
|
|
3723
3690
|
*/
|
|
3724
3691
|
GLTFFileLoader.IncrementalLoading = true;
|
|
3725
3692
|
/**
|
|
3726
3693
|
* Set this property to true in order to work with homogeneous coordinates, available with some converters and exporters.
|
|
3727
3694
|
* Defaults to false. See https://en.wikipedia.org/wiki/Homogeneous_coordinates.
|
|
3728
|
-
* @
|
|
3695
|
+
* @internal
|
|
3729
3696
|
*/
|
|
3730
3697
|
GLTFFileLoader.HomogeneousCoordinates = false;
|
|
3731
3698
|
GLTFFileLoader._MagicBase64Encoded = "Z2xURg"; // "glTF" base64 encoded (without the quotes!)
|