You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When creating a spring that interpolates transition properties of type translateX(), translateY(), and/or translateZ(), react-spring should automatically convert these properties to translate3d(tx, ty, tz) as this forces the browser to utilize hardware acceleration, which produces a noticeable impact on animation performance.
Motivation
CPU animation can be quite choppy at times. Hardware acceleration animation can provide a noticeable improvement, so why not make it the default behavior?
Example
// The spring:
const spring = useSpring({
from: { transform: "translateX(0px)" },
transform: "translateX(500px)"
});
// Current behavior:
<div style="transform: translateX(<!--animated values goes here-->)"></div>
// Desired behavior. Notice how translateX() was automatically converted to translate3d().
<div style="transform: translate3d(<!--animated values goes here-->)" /></div>
The text was updated successfully, but these errors were encountered:
🚀 Feature Proposal
When creating a spring that interpolates transition properties of type translateX(), translateY(), and/or translateZ(), react-spring should automatically convert these properties to translate3d(tx, ty, tz) as this forces the browser to utilize hardware acceleration, which produces a noticeable impact on animation performance.
Motivation
CPU animation can be quite choppy at times. Hardware acceleration animation can provide a noticeable improvement, so why not make it the default behavior?
Example
The text was updated successfully, but these errors were encountered: