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

Side by Side Diff: sky/specs/animation.md

Issue 888453002: Specs: Some notes on combining simultaneous animations of the same property (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 Animation API 1 Animation API
2 ============= 2 =============
3 3
4 (This is very incomplete, because it's all expected to be in the
5 framework, not the platform.)
6
4 ```javascript 7 ```javascript
5 8
6 dictionary EasingFunctionSettings { 9 dictionary EasingFunctionSettings {
7 Float duration; // required 10 Float duration; // required
8 Callback? completionCallback = null; 11 Callback? completionCallback = null;
9 } 12 }
10 13
11 abstract class EasingFunction { 14 abstract class EasingFunction {
12 abstract constructor (EasingFunctionSettings settings); 15 abstract constructor (EasingFunctionSettings settings);
13 abstract Float getFactor(Float time); 16 abstract Float getFactor(Float time);
14 // calls completionCallback if time >= duration 17 // calls completionCallback if time >= duration
15 // then returns a number ostensibly in the range 0.0 to 1.0 18 // then returns a number ostensibly in the range 0.0 to 1.0
16 // (but it could in practice go outside this range, e.g. for 19 // (but it could in practice go outside this range, e.g. for
17 // animation styles that overreach then come back) 20 // animation styles that overreach then come back)
18 } 21 }
22 ```
19 23
20 24
21 ``` 25 If you want to have two animations simultaneously, e.g. two
26 transforms, then you can add to the RenderNode's overrideStyles a
27 StyleValue that combines other StyleValues, e.g. a
28 "TransformStyleValueCombinerStyleValue", and then add to it the
29 regular animated StyleValues, e.g. multiple
30 "AnimatedTransformStyleValue" objects. A framework API could make
31 setting all that up easy, given the right underlying StyleValue
32 classes.
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698