funkia / hareactive

Purely functional reactive programming library
MIT License
339 stars 29 forks source link

Animation tools #26

Open limemloh opened 7 years ago

limemloh commented 7 years ago

I would be nice to have some tools to help with describing transitions with behaviors. I imagine an API like this:

const config = {
  duration: 5,
  timingFunction: linear,
  delay: 0
}
const t = transitionBehavior(config, numberStream, initialValue);

numberStream is telling which values the resulting behavior should make transitions to.

This together with a collection of timing functions would be a good start.

paldepind commented 7 years ago

What is the initial value of the behavior returned by transitionBehavior?

limemloh commented 7 years ago

In my example, it is the 3rd argument, which has to be a number