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

Issue 1211603003: Baby steps towards an odeon-like animation system. First victim: Drawer. (Closed)

Created:
5 years, 6 months ago by Matt Perry
Modified:
5 years, 5 months ago
Reviewers:
abarth-chromium, Hixie
CC:
gregsimon, jackson_old, mojo-reviews_chromium.org, qsr+mojo_chromium.org
Base URL:
git@github.com:/domokit/mojo.git@master
Target Ref:
refs/heads/master
Project:
mojo
Visibility:
Public.

Description

Baby steps towards an odeon-like animation system. First victim: Drawer. This introduces an AnimationPerformance class, which is intended to manage an animation (or its reverse), with the ability to manually control the timeline or to apply a force to advance the animation with a diminishing speed. I'm having trouble fitting the odeon model to Sky. Odeon has a lot of nice properties, but fundamentally operates on UINodes, which contain all the properties to be animated. Sky, on the other hand, has no such universal properties. Instead, each Widget assembles itself how it sees fit. So my current plan is to let AnimationPerformance own a generic set of AnimatedVariables. You pass it a bag of things, say position and opacity, as AnimatedVariables. It updates them based on the animation, and they each have a way to build a widget based on their current state. R=abarth@chromium.org Committed: https://chromium.googlesource.com/external/mojo/+/d3b7661cf2cc8257f4d95cada175c5a9e2119499

Patch Set 1 #

Patch Set 2 : ugly attempt at shadows #

Patch Set 3 : . #

Total comments: 14

Patch Set 4 : hixie #

Total comments: 2

Patch Set 5 : widget builder #

Total comments: 24

Patch Set 6 : better lerp #

Total comments: 22

Patch Set 7 : abarth and hixie #

Total comments: 8

Patch Set 8 : abarth #

Unified diffs Side-by-side diffs Delta from patch set Stats (+235 lines, -68 lines) Patch
M sky/engine/core/painting/Offset.dart View 1 2 3 4 5 6 1 chunk +4 lines, -0 lines 0 comments Download
M sky/sdk/BUILD.gn View 1 2 3 4 5 6 2 chunks +2 lines, -0 lines 0 comments Download
A sky/sdk/lib/animation/animation_performance.dart View 1 2 3 4 5 6 1 chunk +89 lines, -0 lines 0 comments Download
M sky/sdk/lib/animation/generators.dart View 1 chunk +1 line, -1 line 0 comments Download
A sky/sdk/lib/base/lerp.dart View 1 2 3 4 5 6 7 1 chunk +19 lines, -0 lines 0 comments Download
M sky/sdk/lib/painting/box_painter.dart View 1 2 3 4 5 6 7 2 chunks +8 lines, -0 lines 0 comments Download
M sky/sdk/lib/widgets/animated_component.dart View 1 2 3 4 5 6 7 2 chunks +23 lines, -0 lines 0 comments Download
M sky/sdk/lib/widgets/drawer.dart View 1 2 3 4 5 6 7 4 chunks +47 lines, -58 lines 0 comments Download
M sky/sdk/lib/widgets/material.dart View 1 2 3 4 5 6 7 1 chunk +42 lines, -9 lines 0 comments Download

Messages

Total messages: 16 (2 generated)
Hixie
https://codereview.chromium.org/1211603003/diff/40001/sky/sdk/lib/widgets/material.dart File sky/sdk/lib/widgets/material.dart (right): https://codereview.chromium.org/1211603003/diff/40001/sky/sdk/lib/widgets/material.dart#newcode15 sky/sdk/lib/widgets/material.dart:15: // Ugly code to linearly interpolate 2 BoxShadows. This ...
5 years, 6 months ago (2015-06-25 21:00:59 UTC) #2
Matt Perry
https://codereview.chromium.org/1211603003/diff/40001/sky/sdk/lib/widgets/material.dart File sky/sdk/lib/widgets/material.dart (right): https://codereview.chromium.org/1211603003/diff/40001/sky/sdk/lib/widgets/material.dart#newcode35 sky/sdk/lib/widgets/material.dart:35: List<BoxShadow> getShadow(double t) { On 2015/06/25 21:00:59, Hixie wrote: ...
5 years, 6 months ago (2015-06-25 22:31:46 UTC) #3
Hixie
> https://codereview.chromium.org/1211603003/diff/40001/sky/sdk/lib/widgets/material.dart#newcode56 > sky/sdk/lib/widgets/material.dart:56: this.level = new AnimatedValue(level.toDouble()); > On 2015/06/25 21:00:59, Hixie wrote: > ...
5 years, 6 months ago (2015-06-25 22:42:16 UTC) #4
Hixie
https://codereview.chromium.org/1211603003/diff/60001/sky/sdk/lib/widgets/material.dart File sky/sdk/lib/widgets/material.dart (right): https://codereview.chromium.org/1211603003/diff/60001/sky/sdk/lib/widgets/material.dart#newcode38 sky/sdk/lib/widgets/material.dart:38: if (level < 1.0) // shadows[1] is the first ...
5 years, 6 months ago (2015-06-25 22:42:20 UTC) #5
Matt Perry
OK, I think this is ready for review. I added a way for AnimatedVariables to ...
5 years, 5 months ago (2015-06-30 22:09:11 UTC) #6
abarth-chromium
https://codereview.chromium.org/1211603003/diff/80001/sky/sdk/lib/animation/animation_performance.dart File sky/sdk/lib/animation/animation_performance.dart (right): https://codereview.chromium.org/1211603003/diff/80001/sky/sdk/lib/animation/animation_performance.dart#newcode11 sky/sdk/lib/animation/animation_performance.dart:11: void setPercentage(double t); Does t go from 0 to ...
5 years, 5 months ago (2015-06-30 22:26:09 UTC) #8
abarth-chromium
I like the direction this is going. The comments above are all pretty minor.
5 years, 5 months ago (2015-06-30 22:26:45 UTC) #9
Hixie
On 2015/06/30 at 22:09:11, mpcomplete wrote: > OK, I think this is ready for review. ...
5 years, 5 months ago (2015-06-30 22:52:26 UTC) #10
Hixie
I like the general approach, I think. I don't yet fully understand how it'll turn ...
5 years, 5 months ago (2015-06-30 23:11:57 UTC) #11
Matt Perry
https://codereview.chromium.org/1211603003/diff/80001/sky/sdk/lib/animation/animation_performance.dart File sky/sdk/lib/animation/animation_performance.dart (right): https://codereview.chromium.org/1211603003/diff/80001/sky/sdk/lib/animation/animation_performance.dart#newcode11 sky/sdk/lib/animation/animation_performance.dart:11: void setPercentage(double t); On 2015/06/30 22:26:09, abarth-chromium wrote: > ...
5 years, 5 months ago (2015-07-01 18:17:44 UTC) #12
abarth-chromium
On 2015/07/01 at 18:17:44, mpcomplete wrote: > https://codereview.chromium.org/1211603003/diff/80001/sky/sdk/lib/base/lerp.dart#newcode17 > sky/sdk/lib/base/lerp.dart:17: lerpNum(a.dy, b.dy, t)); > On ...
5 years, 5 months ago (2015-07-01 19:40:14 UTC) #13
abarth-chromium
lgtm https://codereview.chromium.org/1211603003/diff/120001/sky/sdk/lib/base/lerp.dart File sky/sdk/lib/base/lerp.dart (right): https://codereview.chromium.org/1211603003/diff/120001/sky/sdk/lib/base/lerp.dart#newcode13 sky/sdk/lib/base/lerp.dart:13: lerpNum(a.blue, b.blue, t).toInt()); We've been using { } ...
5 years, 5 months ago (2015-07-01 19:44:09 UTC) #14
Matt Perry
https://codereview.chromium.org/1211603003/diff/120001/sky/sdk/lib/base/lerp.dart File sky/sdk/lib/base/lerp.dart (right): https://codereview.chromium.org/1211603003/diff/120001/sky/sdk/lib/base/lerp.dart#newcode13 sky/sdk/lib/base/lerp.dart:13: lerpNum(a.blue, b.blue, t).toInt()); On 2015/07/01 19:44:08, abarth-chromium wrote: > ...
5 years, 5 months ago (2015-07-01 20:05:40 UTC) #15
Matt Perry
5 years, 5 months ago (2015-07-01 20:38:24 UTC) #16
Message was sent while issue was closed.
Committed patchset #8 (id:140001) manually as
d3b7661cf2cc8257f4d95cada175c5a9e2119499 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698