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

Unified Diff: sky/framework/animation/curves.dart

Issue 1012463003: Make Sky's drawer match Material Design spec (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: nits Created 5 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | sky/framework/components/drawer.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/framework/animation/curves.dart
diff --git a/sky/framework/animation/curves.dart b/sky/framework/animation/curves.dart
index 367d4cd4069110baa5ccd00eeb84d6df03c0a6e2..b588457a331564071ca5ac9aee38ab86a3ff7061 100644
--- a/sky/framework/animation/curves.dart
+++ b/sky/framework/animation/curves.dart
@@ -21,6 +21,22 @@ class Linear implements Curve {
}
}
+class ParabolicFall implements Curve {
+ const ParabolicFall();
+
+ double transform(double t) {
+ return -t*t + 1;
+ }
+}
+
+class ParabolicRise implements Curve {
+ const ParabolicRise();
+
+ double transform(double t) {
+ return -(t-1)*(t-1) + 1;
+ }
+}
+
class Cubic implements Curve {
final double a;
final double b;
@@ -52,3 +68,5 @@ const Cubic ease = const Cubic(0.25, 0.1, 0.25, 1.0);
const Cubic easeIn = const Cubic(0.42, 0.0, 1.0, 1.0);
const Cubic easeOut = const Cubic(0.0, 0.0, 0.58, 1.0);
const Cubic easeInOut = const Cubic(0.42, 0.0, 0.58, 1.0);
+const Cubic parabolicRise = const ParabolicRise();
+const Cubic parabolicFall = const ParabolicFall();
« no previous file with comments | « no previous file | sky/framework/components/drawer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698