Re: [css-transitions] Proposal and RFC: spring() timing function

On Fri, Jul 1, 2016 at 12:29 AM, Maciej Stachowiak <mjs@apple.com> wrote:
> On Jun 30, 2016, at 6:20 PM, Maciej Stachowiak <mjs@apple.com> wrote:
>> Would it make sense to also have an initial displacement? I'd guess an
>> animation for something snapping back after you pull it best modeled as a
>> critically damped spring with no initial velocity but a nonzero initial
>> displacement. At the very least it seems weird for this to be missing.
>
> I just realized that the difference between the start position and the end
> position must logically be the initial displacement.

Right, if you want to "snap back", you just put your starting position
at the "stretched out" location, and then animate to the point you
want to "snap back" to.  Exactly what's in the demo right now, except
with start/end swapped.

~TJ

Received on Friday, 1 July 2016 21:15:18 UTC