DynamicSpringSource better handles existing springs.

Authored by markwei on Thu, May 4, 6:14 PM.

Description

DynamicSpringSource better handles existing springs.

Summary:
The old implementation would throw away old springs and create new ones.
The issue was the initialVelocity would always be set on the spring, even when the old spring was active.

The new implementation reuses old springs.
Properties like initialVelocity are only set on the initial spring.
This way, you can update an inflight spring with a new destination without resetting its velocity.

Reviewers: O2 Material Motion, O6 Material Android platform reviewers, Material Motion, featherless

Reviewed By: O2 Material Motion, Material Motion, featherless

Tags: Material Motion

Differential Revision: http://codereview.cc/D3167

Details

Committed
markweiTue, May 9, 7:41 PM
Reviewer
O2: Material Motion
Differential Revision
D3167: DynamicSpringSource better handles existing springs.
Parents
rMDMSTREAMSANDROID5e05eeb1e7c2: Add Discord badge
Branches
Unknown
Tags
Unknown
References
tag: phabricator/base/11106