This repository was archived by the owner on Nov 12, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 55
[Feature] Support for transform PerspectiveΒ #231
Copy link
Copy link
Open
Labels
FeatureFeature requestFeature request
Description
Is your feature request related to a problem? Please describe.
Currently, when we use animation with transform variables, there is no possibility to specify the perspective at all. We should use pure transform string instead. Example - https://codepen.io/_nK/pen/ZEVPWRg
Describe the solution you'd like
Add support for perspective property here:
| const order = ["translate", "scale", "rotate", "skew"] |
To add possibility to call animation like so:
animate(
el,
{
perspective: 500,
rotateX: [50, -50],
rotateY: [-20, 20],
}
);
Describe alternatives you've considered
This call is working as expected:
animate(
el,
{
transform: [
'perspective(500px) rotateX(50deg) rotateY(-20deg)',
'perspective(500px) rotateX(-50deg) rotateY(20deg)'
]
}
);
Additional context
Example - https://codepen.io/_nK/pen/ZEVPWRg
khang-nd and SaulMoro
Metadata
Metadata
Assignees
Labels
FeatureFeature requestFeature request