babylonjs-serializers 5.50.1 → 5.52.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.glTF2Serializer.js +15 -6
- package/babylon.glTF2Serializer.js.map +1 -1
- package/babylon.glTF2Serializer.min.js +1 -1
- package/babylon.glTF2Serializer.min.js.map +1 -1
- package/babylonjs.serializers.d.ts +9 -3
- package/babylonjs.serializers.js +15 -6
- package/babylonjs.serializers.js.map +1 -1
- package/babylonjs.serializers.min.js +1 -1
- package/babylonjs.serializers.min.js.map +1 -1
- package/babylonjs.serializers.module.d.ts +19 -6
- package/package.json +3 -3
|
@@ -1760,12 +1760,15 @@ var _GLTFAnimation = /** @class */ (function () {
|
|
|
1760
1760
|
* @param convertToRightHandedSystem
|
|
1761
1761
|
* @param animationSampleRate
|
|
1762
1762
|
*/
|
|
1763
|
-
_GLTFAnimation._CreateNodeAnimationFromNodeAnimations = function (babylonNode, runtimeGLTFAnimation, idleGLTFAnimations, nodeMap, nodes, binaryWriter, bufferViews, accessors, convertToRightHandedSystem, animationSampleRate) {
|
|
1763
|
+
_GLTFAnimation._CreateNodeAnimationFromNodeAnimations = function (babylonNode, runtimeGLTFAnimation, idleGLTFAnimations, nodeMap, nodes, binaryWriter, bufferViews, accessors, convertToRightHandedSystem, animationSampleRate, shouldExportAnimation) {
|
|
1764
1764
|
var glTFAnimation;
|
|
1765
1765
|
if (_GLTFAnimation._IsTransformable(babylonNode)) {
|
|
1766
1766
|
if (babylonNode.animations) {
|
|
1767
1767
|
for (var _i = 0, _a = babylonNode.animations; _i < _a.length; _i++) {
|
|
1768
1768
|
var animation = _a[_i];
|
|
1769
|
+
if (shouldExportAnimation && !shouldExportAnimation(animation)) {
|
|
1770
|
+
continue;
|
|
1771
|
+
}
|
|
1769
1772
|
var animationInfo = _GLTFAnimation._DeduceAnimationInfo(animation);
|
|
1770
1773
|
if (animationInfo) {
|
|
1771
1774
|
glTFAnimation = {
|
|
@@ -1796,7 +1799,7 @@ var _GLTFAnimation = /** @class */ (function () {
|
|
|
1796
1799
|
* @param convertToRightHandedSystem
|
|
1797
1800
|
* @param animationSampleRate
|
|
1798
1801
|
*/
|
|
1799
|
-
_GLTFAnimation._CreateMorphTargetAnimationFromMorphTargetAnimations = function (babylonNode, runtimeGLTFAnimation, idleGLTFAnimations, nodeMap, nodes, binaryWriter, bufferViews, accessors, convertToRightHandedSystem, animationSampleRate) {
|
|
1802
|
+
_GLTFAnimation._CreateMorphTargetAnimationFromMorphTargetAnimations = function (babylonNode, runtimeGLTFAnimation, idleGLTFAnimations, nodeMap, nodes, binaryWriter, bufferViews, accessors, convertToRightHandedSystem, animationSampleRate, shouldExportAnimation) {
|
|
1800
1803
|
var glTFAnimation;
|
|
1801
1804
|
if (babylonNode instanceof core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Mesh) {
|
|
1802
1805
|
var morphTargetManager = babylonNode.morphTargetManager;
|
|
@@ -1805,6 +1808,9 @@ var _GLTFAnimation = /** @class */ (function () {
|
|
|
1805
1808
|
var morphTarget = morphTargetManager.getTarget(i);
|
|
1806
1809
|
for (var _i = 0, _a = morphTarget.animations; _i < _a.length; _i++) {
|
|
1807
1810
|
var animation = _a[_i];
|
|
1811
|
+
if (shouldExportAnimation && !shouldExportAnimation(animation)) {
|
|
1812
|
+
continue;
|
|
1813
|
+
}
|
|
1808
1814
|
var combinedAnimation = new core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Animation("".concat(animation.name), "influence", animation.framePerSecond, animation.dataType, animation.loopMode, animation.enableBlending);
|
|
1809
1815
|
var combinedAnimationKeys = [];
|
|
1810
1816
|
var animationKeys = animation.getKeys();
|
|
@@ -1850,7 +1856,7 @@ var _GLTFAnimation = /** @class */ (function () {
|
|
|
1850
1856
|
* @param convertToRightHandedSystemMap
|
|
1851
1857
|
* @param animationSampleRate
|
|
1852
1858
|
*/
|
|
1853
|
-
_GLTFAnimation._CreateNodeAndMorphAnimationFromAnimationGroups = function (babylonScene, glTFAnimations, nodeMap, nodes, binaryWriter, bufferViews, accessors, convertToRightHandedSystemMap, animationSampleRate) {
|
|
1859
|
+
_GLTFAnimation._CreateNodeAndMorphAnimationFromAnimationGroups = function (babylonScene, glTFAnimations, nodeMap, nodes, binaryWriter, bufferViews, accessors, convertToRightHandedSystemMap, animationSampleRate, shouldExportAnimation) {
|
|
1854
1860
|
var _a;
|
|
1855
1861
|
var glTFAnimation;
|
|
1856
1862
|
if (babylonScene.animationGroups) {
|
|
@@ -1869,6 +1875,9 @@ var _GLTFAnimation = /** @class */ (function () {
|
|
|
1869
1875
|
var targetAnimation = animationGroup.targetedAnimations[i];
|
|
1870
1876
|
var target = targetAnimation.target;
|
|
1871
1877
|
var animation = targetAnimation.animation;
|
|
1878
|
+
if (shouldExportAnimation && !shouldExportAnimation(animation)) {
|
|
1879
|
+
return "continue";
|
|
1880
|
+
}
|
|
1872
1881
|
if (this_1._IsTransformable(target) || (target.length === 1 && this_1._IsTransformable(target[0]))) {
|
|
1873
1882
|
var animationInfo = _GLTFAnimation._DeduceAnimationInfo(targetAnimation.animation);
|
|
1874
1883
|
if (animationInfo) {
|
|
@@ -4220,9 +4229,9 @@ var _Exporter = /** @class */ (function () {
|
|
|
4220
4229
|
nodeIndex = _this._nodes.length - 1;
|
|
4221
4230
|
nodeMap[babylonNode.uniqueId] = nodeIndex;
|
|
4222
4231
|
if (!babylonScene.animationGroups.length) {
|
|
4223
|
-
_glTFAnimation__WEBPACK_IMPORTED_MODULE_5__._GLTFAnimation._CreateMorphTargetAnimationFromMorphTargetAnimations(babylonNode, runtimeGLTFAnimation, idleGLTFAnimations, nodeMap, _this._nodes, binaryWriter, _this._bufferViews, _this._accessors, convertToRightHandedSystem, _this._animationSampleRate);
|
|
4232
|
+
_glTFAnimation__WEBPACK_IMPORTED_MODULE_5__._GLTFAnimation._CreateMorphTargetAnimationFromMorphTargetAnimations(babylonNode, runtimeGLTFAnimation, idleGLTFAnimations, nodeMap, _this._nodes, binaryWriter, _this._bufferViews, _this._accessors, convertToRightHandedSystem, _this._animationSampleRate, _this._options.shouldExportAnimation);
|
|
4224
4233
|
if (babylonNode.animations.length) {
|
|
4225
|
-
_glTFAnimation__WEBPACK_IMPORTED_MODULE_5__._GLTFAnimation._CreateNodeAnimationFromNodeAnimations(babylonNode, runtimeGLTFAnimation, idleGLTFAnimations, nodeMap, _this._nodes, binaryWriter, _this._bufferViews, _this._accessors, convertToRightHandedSystem, _this._animationSampleRate);
|
|
4234
|
+
_glTFAnimation__WEBPACK_IMPORTED_MODULE_5__._GLTFAnimation._CreateNodeAnimationFromNodeAnimations(babylonNode, runtimeGLTFAnimation, idleGLTFAnimations, nodeMap, _this._nodes, binaryWriter, _this._bufferViews, _this._accessors, convertToRightHandedSystem, _this._animationSampleRate, _this._options.shouldExportAnimation);
|
|
4226
4235
|
}
|
|
4227
4236
|
}
|
|
4228
4237
|
});
|
|
@@ -4244,7 +4253,7 @@ var _Exporter = /** @class */ (function () {
|
|
|
4244
4253
|
}
|
|
4245
4254
|
});
|
|
4246
4255
|
if (babylonScene.animationGroups.length) {
|
|
4247
|
-
_glTFAnimation__WEBPACK_IMPORTED_MODULE_5__._GLTFAnimation._CreateNodeAndMorphAnimationFromAnimationGroups(babylonScene, _this._animations, nodeMap, _this._nodes, binaryWriter, _this._bufferViews, _this._accessors, _this._convertToRightHandedSystemMap, _this._animationSampleRate);
|
|
4256
|
+
_glTFAnimation__WEBPACK_IMPORTED_MODULE_5__._GLTFAnimation._CreateNodeAndMorphAnimationFromAnimationGroups(babylonScene, _this._animations, nodeMap, _this._nodes, binaryWriter, _this._bufferViews, _this._accessors, _this._convertToRightHandedSystemMap, _this._animationSampleRate, _this._options.shouldExportAnimation);
|
|
4248
4257
|
}
|
|
4249
4258
|
return nodeMap;
|
|
4250
4259
|
});
|