diff --git a/README.md b/README.md index 30d0f56..d181d17 100644 --- a/README.md +++ b/README.md @@ -114,6 +114,7 @@ To run all unit tests, run the following commands: ## Guides 1. [How to animate a property with a Tween plan](#how-to-animate-a-property-with-a-tween-plan) +1. [How to animate a property with a keyframe Tween plan](#how-to-animate-a-property-with-a-keyframe-tween-plan) ### How to animate a property with a Tween plan @@ -122,6 +123,17 @@ Tween tween = new Tween<>(property, duration, from, to); runtime.addPlan(tween, view); ``` +### How to animate a property with a keyframe Tween plan + +```java +float[] values = new float[] {0f, .5f, 1f}; +float[] offsets = new float[] {0f, .25f, 1f}; + +Tween tween = new Tween<>(property, duration, values); +tween.offsets = offsets; +runtime.addPlan(tween, view); +``` + ## Contributing We welcome contributions!