SheetRow class

One row of a SpriteSheet's grid, and how it plays.

// Define a sprite sheet.
final sheet = SpriteSheet('assets/slime.png', .all(56));

// Cut out regions any way you like.
final group = sheet.animations(
  fps: 16,
  rows: [
    .new(end: 14),
    .new(end: 30, fps: 24, loop: false),
    .skip(2),
    .timed([0.8, 0.06, 0.06, 0.06]),
  ],
);

Constructors

SheetRow({int? start, int? end, double? fps, bool? loop})
const
SheetRow.skip(int skip)
The next skip rows of the grid, passed over rather than played.
const
SheetRow.timed(List<double> durations, {int? start, bool? loop})
A row that holds each of its frames for its own number of seconds.

Properties

durations → List<double>?
How long each frame is held, in seconds, or null to play at fps.
final
end → int?
The column this row stops before, or null for the last one.
final
fps → double?
The frames per second this row plays at, or null for the rate the whole run was asked for.
final
hashCode → int
The hash code for this object.
no setterinherited
loop → bool?
Whether this row starts over after its last frame, or null for the answer the whole run was asked for.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
skip → int?
How many rows of the grid the sheet passes over here, or null to play this one.
final
start → int
The first column this row plays from. Defaults to 0.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited