add perspective for rotattionX and rotationY

This commit is contained in:
pengfei.zhou
2020-06-03 14:53:32 +08:00
committed by osborn
parent c14ec1954e
commit 9b181830fc
17 changed files with 449 additions and 26 deletions

View File

@@ -473,6 +473,10 @@ var View = /** @class */ (function () {
Property,
__metadata("design:type", Number)
], View.prototype, "rotationY", void 0);
__decorate([
Property,
__metadata("design:type", Number)
], View.prototype, "perspective", void 0);
__decorate([
Property,
__metadata("design:type", Object)
@@ -1533,6 +1537,74 @@ var RotationAnimation = /** @class */ (function (_super) {
});
return RotationAnimation;
}(Animation));
var RotationXAnimation = /** @class */ (function (_super) {
__extends$2(RotationXAnimation, _super);
function RotationXAnimation() {
var _this = _super.call(this) || this;
_this.rotationChaneable = {
key: "rotationX",
fromValue: 1,
toValue: 1,
};
_this.changeables.set("rotationX", _this.rotationChaneable);
return _this;
}
Object.defineProperty(RotationXAnimation.prototype, "fromRotation", {
get: function () {
return this.rotationChaneable.fromValue;
},
set: function (v) {
this.rotationChaneable.fromValue = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(RotationXAnimation.prototype, "toRotation", {
get: function () {
return this.rotationChaneable.toValue;
},
set: function (v) {
this.rotationChaneable.toValue = v;
},
enumerable: false,
configurable: true
});
return RotationXAnimation;
}(Animation));
var RotationYAnimation = /** @class */ (function (_super) {
__extends$2(RotationYAnimation, _super);
function RotationYAnimation() {
var _this = _super.call(this) || this;
_this.rotationChaneable = {
key: "rotationY",
fromValue: 1,
toValue: 1,
};
_this.changeables.set("rotationY", _this.rotationChaneable);
return _this;
}
Object.defineProperty(RotationYAnimation.prototype, "fromRotation", {
get: function () {
return this.rotationChaneable.fromValue;
},
set: function (v) {
this.rotationChaneable.fromValue = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(RotationYAnimation.prototype, "toRotation", {
get: function () {
return this.rotationChaneable.toValue;
},
set: function (v) {
this.rotationChaneable.toValue = v;
},
enumerable: false,
configurable: true
});
return RotationYAnimation;
}(Animation));
var AnimationSet = /** @class */ (function () {
function AnimationSet() {
this.animations = [];
@@ -3423,6 +3495,8 @@ exports.RIGHT = RIGHT;
exports.Refreshable = Refreshable;
exports.Root = Root;
exports.RotationAnimation = RotationAnimation;
exports.RotationXAnimation = RotationXAnimation;
exports.RotationYAnimation = RotationYAnimation;
exports.ScaleAnimation = ScaleAnimation;
exports.Scroller = Scroller;
exports.SlideItem = SlideItem;