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

@@ -1907,6 +1907,10 @@ let View = /** @class */ (() => {
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)
@@ -2661,6 +2665,52 @@ class RotationAnimation extends Animation {
return this.rotationChaneable.toValue;
}
}
class RotationXAnimation extends Animation {
constructor() {
super();
this.rotationChaneable = {
key: "rotationX",
fromValue: 1,
toValue: 1,
};
this.changeables.set("rotationX", this.rotationChaneable);
}
set fromRotation(v) {
this.rotationChaneable.fromValue = v;
}
get fromRotation() {
return this.rotationChaneable.fromValue;
}
set toRotation(v) {
this.rotationChaneable.toValue = v;
}
get toRotation() {
return this.rotationChaneable.toValue;
}
}
class RotationYAnimation extends Animation {
constructor() {
super();
this.rotationChaneable = {
key: "rotationY",
fromValue: 1,
toValue: 1,
};
this.changeables.set("rotationY", this.rotationChaneable);
}
set fromRotation(v) {
this.rotationChaneable.fromValue = v;
}
get fromRotation() {
return this.rotationChaneable.fromValue;
}
set toRotation(v) {
this.rotationChaneable.toValue = v;
}
get toRotation() {
return this.rotationChaneable.toValue;
}
}
class AnimationSet {
constructor() {
this.animations = [];
@@ -4219,6 +4269,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;

File diff suppressed because one or more lines are too long