Animation add keyFrame

This commit is contained in:
pengfei.zhou
2021-09-07 20:10:44 +08:00
committed by osborn
parent d7d19b17d0
commit 41e610e424
12 changed files with 443 additions and 69 deletions

View File

@@ -1668,6 +1668,7 @@ var Animation = /** @class */ (function () {
key: e.key,
fromValue: e.fromValue,
toValue: e.toValue,
keyFrames: e.keyFrames,
});
}
}
@@ -1710,6 +1711,20 @@ var ScaleAnimation = /** @class */ (function (_super) {
_this.changeables.set("scaleY", _this.scaleYChangeable);
return _this;
}
Object.defineProperty(ScaleAnimation.prototype, "xKeyFrames", {
set: function (keyFrames) {
this.scaleXChangeable.keyFrames = keyFrames;
},
enumerable: false,
configurable: true
});
Object.defineProperty(ScaleAnimation.prototype, "yKeyFrames", {
set: function (keyFrames) {
this.scaleYChangeable.keyFrames = keyFrames;
},
enumerable: false,
configurable: true
});
Object.defineProperty(ScaleAnimation.prototype, "fromScaleX", {
get: function () {
return this.scaleXChangeable.fromValue;
@@ -1770,6 +1785,20 @@ var TranslationAnimation = /** @class */ (function (_super) {
_this.changeables.set("translationY", _this.translationYChangeable);
return _this;
}
Object.defineProperty(TranslationAnimation.prototype, "xKeyFrames", {
set: function (keyFrames) {
this.translationXChangeable.keyFrames = keyFrames;
},
enumerable: false,
configurable: true
});
Object.defineProperty(TranslationAnimation.prototype, "yKeyFrames", {
set: function (keyFrames) {
this.translationYChangeable.keyFrames = keyFrames;
},
enumerable: false,
configurable: true
});
Object.defineProperty(TranslationAnimation.prototype, "fromTranslationX", {
get: function () {
return this.translationXChangeable.fromValue;
@@ -1847,6 +1876,13 @@ var RotationAnimation = /** @class */ (function (_super) {
enumerable: false,
configurable: true
});
Object.defineProperty(RotationAnimation.prototype, "keyFrames", {
set: function (keyFrames) {
this.rotationChaneable.keyFrames = keyFrames;
},
enumerable: false,
configurable: true
});
return RotationAnimation;
}(Animation));
/**
@@ -1884,6 +1920,13 @@ var RotationXAnimation = /** @class */ (function (_super) {
enumerable: false,
configurable: true
});
Object.defineProperty(RotationXAnimation.prototype, "keyFrames", {
set: function (keyFrames) {
this.rotationChaneable.keyFrames = keyFrames;
},
enumerable: false,
configurable: true
});
return RotationXAnimation;
}(Animation));
/**
@@ -1921,6 +1964,13 @@ var RotationYAnimation = /** @class */ (function (_super) {
enumerable: false,
configurable: true
});
Object.defineProperty(RotationYAnimation.prototype, "keyFrames", {
set: function (keyFrames) {
this.rotationChaneable.keyFrames = keyFrames;
},
enumerable: false,
configurable: true
});
return RotationYAnimation;
}(Animation));
var BackgroundColorAnimation = /** @class */ (function (_super) {
@@ -1955,6 +2005,13 @@ var BackgroundColorAnimation = /** @class */ (function (_super) {
enumerable: false,
configurable: true
});
Object.defineProperty(BackgroundColorAnimation.prototype, "keyFrames", {
set: function (keyFrames) {
this.backgroundColorChangeable.keyFrames = keyFrames.map(function (e) { return { percent: e.percent, value: e.value.toModel() }; });
},
enumerable: false,
configurable: true
});
return BackgroundColorAnimation;
}(Animation));
/**
@@ -1992,6 +2049,13 @@ var AlphaAnimation = /** @class */ (function (_super) {
enumerable: false,
configurable: true
});
Object.defineProperty(AlphaAnimation.prototype, "keyFrames", {
set: function (keyFrames) {
this.opacityChangeable.keyFrames = keyFrames;
},
enumerable: false,
configurable: true
});
return AlphaAnimation;
}(Animation));
var AnimationSet = /** @class */ (function () {