← back to roto on ba3a.dev

ArtFrames

object ArtFrames

Reads what gets published from a handoff: the art layer of every frame, as RGBA at the sprite's size, with the frame's duration as the file holds it. The reference, the draft and any other layer are the artist's working material and stay in the handoff.

A pixel takes its palette colour, transparent where the index is the sprite's transparent one; a cel at reduced opacity scales its pixels' alpha to match. A frame with no art yet stops the publish rather than ship a blank frame.

Functions

Link copied to clipboard
fun paintedCount(sprite: AseSprite, clip: String): Int

How many of sprite's frames hold art.

Link copied to clipboard
fun read(sprite: AseSprite, clip: String): List<ArtFrame>

The painted frames of sprite, the handoff of clip; fails on a frame with no art.

Link copied to clipboard
fun readPartial(sprite: AseSprite, clip: String): List<Raster?>

The art of every frame of sprite, the handoff of clip, or null where the frame holds none yet. Unlike read it accepts a part-painted handoff.