← back to roto on ba3a.dev

ModelSource

interface ModelSource

Where a model's frames come from: a folder of PNGs, an .ase file or an atlas. Each reader hands back the same normalised parts, so the importer never knows the format. A frame that is not canvas size fails with a ModelException naming both sizes; Roto never rescales a model.

Inheritors

Functions

Link copied to clipboard
abstract fun durations(row: ModelRow): List<Int>

Each frame's duration in ms, one per frame of row.

Link copied to clipboard
abstract fun frames(row: ModelRow): List<Raster>

The frames of row, in order, at canvas size.

Link copied to clipboard
abstract fun loop(row: ModelRow): Boolean

Whether row loops.

Link copied to clipboard
abstract fun rows(): List<ModelRow>

What the source holds, one row per animation, in a fixed order.