middle ease animation for sbv2

This commit is contained in:
yugecin
2016-12-25 16:22:09 +01:00
parent 66b174523b
commit 2b5ee7d8b8
2 changed files with 13 additions and 6 deletions

View File

@@ -294,6 +294,13 @@ public enum AnimationEquation {
return -0.5f * ((float) Math.pow(2, 10 * t) * (float) Math.sin((t - period / 4) * (Math.PI * 2) / period));
return (float) Math.pow(2, -10 * t) * (float) Math.sin((t - period / 4) * (Math.PI * 2) / period) * 0.5f + 1;
}
},
IN_OUT_EASE_MIDDLE {
@Override
public float calc(float t) {
float ct = 1f - t;
return 3f * ct * ct * t * 0.6f + 3 * ct * t * t * 0.4f + t * t * t * 1f;
}
};
/** Overshoot constant for "back" easings. */