Chromium Code Reviews
DescriptionRemove the "min velocity" hack from ParticleClimbingRamp
Previously, we had a problem with this physics simulation not actually hitting
the edge of the box and causing the scrollable contents to fall back down. To
avoid that problem, we enforced a minimum velocity for the particle to ensure
that it always hit the edge of the box. However, when that min velocity kicked
in, the results were visually unappealing.
This CL fixes the underlying problem. The fix is to apply the impluse from
gravity after updating the particle's position. In that way, we slightly over
estimate the particle's position in every step of the simulation, ensuring that
we don't miss the edge of the box due to errors in our simulation. With this
change, we no longer need the min velocity hack.
R=eseidel@chromium.org
Committed: https://chromium.googlesource.com/external/mojo/+/9c64c68182e8c6e28d407196a21f0e541e0c180d
Patch Set 1 #
Messages
Total messages: 3 (0 generated)
|
|||||||||||||||||||