Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(279)

Issue 1008423002: Remove the "min velocity" hack from ParticleClimbingRamp (Closed)

Created:
5 years, 9 months ago by abarth-chromium
Modified:
5 years, 9 months ago
Reviewers:
eseidel
CC:
mojo-reviews_chromium.org, ojan, qsr+mojo_chromium.org, rafaelw
Base URL:
git@github.com:domokit/mojo.git@master
Target Ref:
refs/heads/master
Project:
mojo
Visibility:
Public.

Description

Remove 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -6 lines) Patch
M sky/framework/animation/mechanics.dart View 2 chunks +5 lines, -6 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
abarth-chromium
5 years, 9 months ago (2015-03-16 16:09:31 UTC) #1
eseidel
lgtm
5 years, 9 months ago (2015-03-16 16:14:47 UTC) #2
abarth-chromium
5 years, 9 months ago (2015-03-16 16:15:57 UTC) #3
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
9c64c68182e8c6e28d407196a21f0e541e0c180d (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698