Module ITimed

module ITimed: sig .. end

Timeline


Timeline types

type time = int 
type ('a, 'b) animated = 
| From of time * 'a (*

From (t, v) after time t is reach (and before next timeline chunk) the returned value will be v

*)
| Evol of time * time * (time -> 'b -> 'a) * 'b (*

Evol (t1, t2, f, d) when t is between t1 and t2 the value is the result of f t d

*)

The type 'a is the output.

The type 'b is a parameter for the function f that make the evolution over the input time.

type ('a, 'b) timed = 
| Static of 'a (*

with Static v the returned value will always be v

*)
| Animated of ('a, 'b) animated list (*

Animated anim_chunks the animation chunks have to be correctly sorted

*)

Timeline functions

val val_at : time -> ('a, 'b) animated list -> 'a
val get_val : time -> ('a, 'b) timed -> 'a
val finished : time -> ('a, 'b) animated list -> bool

Labeled functions

module Labels: sig .. end