@babylonjs/loaders 5.7.0 → 5.8.0
Sign up to get free protection for your applications and to get access to all the features.
package/glTF/2.0/glTFLoader.d.ts
CHANGED
@@ -40,7 +40,7 @@ export declare class ArrayItem {
|
|
40
40
|
*/
|
41
41
|
export declare class GLTFLoader implements IGLTFLoader {
|
42
42
|
/** @hidden */
|
43
|
-
_completePromises: Promise<any>[];
|
43
|
+
readonly _completePromises: Promise<any>[];
|
44
44
|
/** @hidden */
|
45
45
|
_assetContainer: Nullable<AssetContainer>;
|
46
46
|
/** Storage */
|
@@ -58,7 +58,7 @@ export declare class GLTFLoader implements IGLTFLoader {
|
|
58
58
|
private _babylonScene;
|
59
59
|
private _rootBabylonMesh;
|
60
60
|
private _defaultBabylonMaterialData;
|
61
|
-
private _postSceneLoadActions;
|
61
|
+
private readonly _postSceneLoadActions;
|
62
62
|
private static _RegisteredExtensions;
|
63
63
|
/**
|
64
64
|
* The default glTF sampler.
|
package/glTF/2.0/glTFLoader.js
CHANGED
@@ -644,13 +644,6 @@ var GLTFLoader = /** @class */ (function () {
|
|
644
644
|
var mesh = ArrayItem.Get("".concat(context, "/mesh"), this._gltf.meshes, node.mesh);
|
645
645
|
promises.push(this._loadMeshAsync("/meshes/".concat(mesh.index), node, mesh, function (babylonTransformNode) {
|
646
646
|
var babylonTransformNodeForSkin = node._babylonTransformNodeForSkin;
|
647
|
-
// Add a reference to the skinned mesh from the transform node.
|
648
|
-
var gltf = babylonTransformNodeForSkin.metadata.gltf;
|
649
|
-
gltf.skinnedMesh = babylonTransformNode;
|
650
|
-
babylonTransformNode.onDisposeObservable.addOnce(function () {
|
651
|
-
// Delete the reference when the skinned mesh is disposed.
|
652
|
-
delete gltf.skinnedMesh;
|
653
|
-
});
|
654
647
|
var skin = ArrayItem.Get("".concat(context, "/skin"), _this._gltf.skins, node.skin);
|
655
648
|
promises.push(_this._loadSkinAsync("/skins/".concat(skin.index), node, skin, function (babylonSkeleton) {
|
656
649
|
_this._forEachPrimitive(node, function (babylonMesh) {
|
@@ -672,6 +665,7 @@ var GLTFLoader = /** @class */ (function () {
|
|
672
665
|
else {
|
673
666
|
babylonTransformNode.parent = _this._rootBabylonMesh;
|
674
667
|
}
|
668
|
+
_this._parent.onSkinLoadedObservable.notifyObservers({ node: babylonTransformNodeForSkin, skinnedNode: babylonTransformNode });
|
675
669
|
});
|
676
670
|
}));
|
677
671
|
}));
|
@@ -1386,6 +1380,7 @@ var GLTFLoader = /** @class */ (function () {
|
|
1386
1380
|
inTangent: key.inTangent ? key.inTangent[targetIndex] : undefined,
|
1387
1381
|
value: key.value[targetIndex],
|
1388
1382
|
outTangent: key.outTangent ? key.outTangent[targetIndex] : undefined,
|
1383
|
+
interpolation: key.interpolation,
|
1389
1384
|
}); }));
|
1390
1385
|
_this._forEachPrimitive(targetNode, function (babylonAbstractMesh) {
|
1391
1386
|
var babylonMesh = babylonAbstractMesh;
|