Linocut.Strip (Linocut v0.1.3)

Copy Markdown View Source

An animation: frames shown in turn at a rate, looping.

strip = Linocut.Strip.new([frame_a, frame_b, frame_c], 12)
Linocut.Strip.frame_at(strip, elapsed_ms)

Summary

Functions

How many frames the strip has.

The frame showing ms milliseconds after the strip started, wrapping round.

A strip of frames at fps frames per second.

Types

t()

@type t() :: %Linocut.Strip{fps: number(), frames: tuple()}

Functions

count(strip)

@spec count(t()) :: pos_integer()

How many frames the strip has.

frame_at(strip, ms)

@spec frame_at(t(), non_neg_integer()) :: FrenchCurve.Raster.t()

The frame showing ms milliseconds after the strip started, wrapping round.

new(frames, fps)

@spec new([FrenchCurve.Raster.t()], number()) :: t()

A strip of frames at fps frames per second.