|
@@ -47863,8 +47863,11 @@ var BABYLON;
|
|
* Start all animations on given targets
|
|
* Start all animations on given targets
|
|
* @param loop defines if animations must loop
|
|
* @param loop defines if animations must loop
|
|
* @param speedRatio defines the ratio to apply to animation speed (1 by default)
|
|
* @param speedRatio defines the ratio to apply to animation speed (1 by default)
|
|
|
|
+ * @param from defines the from key (optional)
|
|
|
|
+ * @param from defines the to key (optional)
|
|
|
|
+ * @returns the current animation group
|
|
*/
|
|
*/
|
|
- AnimationGroup.prototype.start = function (loop, speedRatio) {
|
|
|
|
|
|
+ AnimationGroup.prototype.start = function (loop, speedRatio, from, to) {
|
|
var _this = this;
|
|
var _this = this;
|
|
if (loop === void 0) { loop = false; }
|
|
if (loop === void 0) { loop = false; }
|
|
if (speedRatio === void 0) { speedRatio = 1; }
|
|
if (speedRatio === void 0) { speedRatio = 1; }
|
|
@@ -47873,7 +47876,13 @@ var BABYLON;
|
|
}
|
|
}
|
|
var _loop_1 = function () {
|
|
var _loop_1 = function () {
|
|
var targetedAnimation = this_1._targetedAnimations[index];
|
|
var targetedAnimation = this_1._targetedAnimations[index];
|
|
- this_1._animatables.push(this_1._scene.beginDirectAnimation(targetedAnimation.target, [targetedAnimation.animation], this_1._from, this_1._to, loop, speedRatio, function () {
|
|
|
|
|
|
+ if (!targetedAnimation.target.animations) {
|
|
|
|
+ targetedAnimation.target.animations = [];
|
|
|
|
+ }
|
|
|
|
+ if (targetedAnimation.target.animations.indexOf(targetedAnimation.animation) === -1) {
|
|
|
|
+ targetedAnimation.target.animations.push(targetedAnimation.animation);
|
|
|
|
+ }
|
|
|
|
+ this_1._animatables.push(this_1._scene.beginDirectAnimation(targetedAnimation.target, [targetedAnimation.animation], from !== undefined ? from : this_1._from, to !== undefined ? to : this_1._to, loop, speedRatio, function () {
|
|
_this.onAnimationEndObservable.notifyObservers(targetedAnimation);
|
|
_this.onAnimationEndObservable.notifyObservers(targetedAnimation);
|
|
}));
|
|
}));
|
|
};
|
|
};
|