Home

Awesome

tween-clj

A Clojure library designed to tween a value between two points.

Inbetweening or tweening is the process of generating intermediate points between two points.

Build Status

Usage

Simply add tween-clj to your leiningen deps:

Clojars Project

The tweening interface defines two main concepts. Transition functions and easing functions.

The transition function defines how a value transitions between two states. There are several transition functions to choose from.

The easing function defines how the transition proceeds. You can ease into a transition (with ease-in) or out of a transition (with ease-out) or even both with east-in-out.

An example:

(map (partial ease-in transition-elastic) 
     [0 0.1 0.2 0.5 0.9 1])

Available transition types:

To see a GUI of these transitions in action see the example directory.

License

Distributed under the Eclipse Public License, the same as Clojure.