- From: Jake Archibald via GitHub <sysbot+gh@w3.org>
- Date: Tue, 20 Feb 2024 16:25:57 +0000
- To: public-css-archive@w3.org
@tomasdev I don't think your assessment is correct. [Check out this example](https://linear-easing-generator.netlify.app/?codeType=js&code=self.bounce+%3D+function%28pos%29+%7B%0A++const+n1+%3D+7.5625%3B%0A++const+d1+%3D+2.75%3B%0A%0A++if+%28pos+%3C+1+%2F+d1%29+%7B%0A++++return+n1+*+pos+*+pos%3B%0A++%7D+else+if+%28pos+%3C+2+%2F+d1%29+%7B%0A++++return+n1+*+%28pos+-%3D+1.5+%2F+d1%29+*+pos+%2B+0.75%3B%0A++%7D+else+if+%28pos+%3C+2.5+%2F+d1%29+%7B%0A++++return+n1+*+%28pos+-%3D+2.25+%2F+d1%29+*+pos+%2B+0.9375%3B%0A++%7D+else+%7B%0A++++return+n1+*+%28pos+-%3D+2.625+%2F+d1%29+*+pos+%2B+0.984375%3B%0A++%7D%0A%7D%0A%0Aself.duration+%3D+8000%3B&simplify=0.000397123923323514&round=3). According to your maths, this would need 480 points to be smooth, but 76 here seems more than enough. For a 1.5s animation, [35 points seems more than enough](https://linear-easing-generator.netlify.app/?codeType=js&code=self.bounce+%3D+function%28pos%29+%7B%0A++const+n1+%3D+7.5625%3B%0A++const+d1+%3D+2.75%3B%0A%0A++if+%28pos+%3C+1+%2F+d1%29+%7B%0A++++return+n1+*+pos+*+pos%3B%0A++%7D+else+if+%28pos+%3C+2+%2F+d1%29+%7B%0A++++return+n1+*+%28pos+-%3D+1.5+%2F+d1%29+*+pos+%2B+0.75%3B%0A++%7D+else+if+%28pos+%3C+2.5+%2F+d1%29+%7B%0A++++return+n1+*+%28pos+-%3D+2.25+%2F+d1%29+*+pos+%2B+0.9375%3B%0A++%7D+else+%7B%0A++++return+n1+*+%28pos+-%3D+2.625+%2F+d1%29+*+pos+%2B+0.984375%3B%0A++%7D%0A%7D%0A%0Aself.duration+%3D+1500%3B&simplify=0.00238246181820329&round=3). That said, as per my previous comment, I opened #7508 for exploring curves. -- GitHub Notification of comment by jakearchibald Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/229#issuecomment-1954584518 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Tuesday, 20 February 2024 16:25:58 UTC