← back to roto on ba3a.dev

Package-level declarations

Types

Link copied to clipboard
object ArtLint

Runs the lint rules over a clip's art.

Link copied to clipboard
object Flicker : LintRule

A one-frame twinkle: a pixel that changes colour from frame i to i + 1 and back at i + 2, while all its neighbours in frame i + 1 equal those in frame i. The finding is on frame i + 1. Indexes wrap, so the loop's seam counts. Needs at least 3 frames. Every transparent pixel counts as one colour.

Link copied to clipboard
class Flipbook(val frames: List<FlipbookFrame>, val loop: Boolean)

A clip's frames as the player shows them: per frame the art where painted, else the draft, else the reference. Cel opacity is ignored, so a reference shows at full strength.

Link copied to clipboard

Which frame shows at a time. Integer arithmetic only; the app feeds elapsed time in, so no wall clock is read here.

Link copied to clipboard
class FlipbookFrame(val image: Raster, val durationMs: Int, val source: FlipbookSource)

One frame as the player shows it.

Link copied to clipboard

Which layer of the handoff a FlipbookFrame shows.

Link copied to clipboard

A frame whose lowest opaque row differs from the clip's median lowest row by more than LintSettings.groundDriftPx. The median is an integer: the lower middle for an even count. A frame with no opaque pixel is left out of the median and never reported. Skipped for a clip that follows depth.

Link copied to clipboard
class LintContext(val palette: Palette, val ramps: RampSet, val outline: Boolean, val depth: DepthSettings, val loop: Boolean = false, val model: ModelReference? = null, val clipDurationsMs: List<Int> = emptyList(), val settings: LintSettings = LintSettings())

What a rule may need besides the frames.

Link copied to clipboard

Builds the LintContext of a clip; the one place the CLI and the app both get it from.

Link copied to clipboard
data class LintFinding(val rule: String, val frame: Int, val pixel: LintFinding.Pixel?, val message: String)

One mistake a rule found.

Link copied to clipboard
class LintReport(val findings: List<LintFinding>, val counts: Map<String, Int>, val skipped: List<Int>)

What a lint run found, in a fixed order: frame, then rule order, then y, then x.

Link copied to clipboard
interface LintRule

One check on the painted frames of a clip. A rule only reads: lint never changes the art.

Link copied to clipboard
@Serializable
data class LintSettings(val groundDriftPx: Int = 1, val seamPercent: Int = 5)

The thresholds the art lint rules use. Not stored per profile: lint is advice, so a default is enough.

Link copied to clipboard
object LoopSeam

Compares a loop's last frame with its first.

Link copied to clipboard

Where a clip's painted figure differs from its model: body height, feet row, root x, frame count and duration total. The clip is measured as the model is, so the numbers compare. One finding per differing quantity, on the first frame, naming the clip's number and then the model's. The root x is the lower median of the frames' roots. Nothing is found for a clip with no model, and a quantity a clip cannot measure (no figure, or no durations given) is left out.

Link copied to clipboard
class ModelReference(val measurement: ModelMeasurement, val durationsMs: List<Int>)

What a rule compares a clip with.

Link copied to clipboard

An opaque pixel whose colour is not in the project palette.

Link copied to clipboard
object OnionSkin

One raster from the current, previous and next frame: the previous frame tinted PREVIOUS_TINT and the next tinted NEXT_TINT, each at 30 % opacity, behind the current frame. Integer arithmetic only, so the result is the same on every machine.

Link copied to clipboard

A silhouette-edge pixel (opaque, with a transparent 4-neighbour inside the image) that is not an outline colour: the project's outline colour, else the darkest step of any ramp. Does nothing when the clip's outline is off.

Link copied to clipboard
class SeamDiff(val mask: Mask, val count: Int)

The diff across a loop's seam: the pixels that change when playback jumps from the last frame to the first.

Link copied to clipboard

A looping clip whose last frame differs from its first in more pixels than LintSettings.seamPercent percent of the first frame's opaque pixels, by LoopSeam.diff. A count equal to the limit passes. A clip that does not loop has no seam, so it is never reported. The rule is named LoopSeam, like the diff it uses.

Link copied to clipboard

An opaque pixel that matches none of its 8 neighbours, by the test the draft's orphan cleanup uses. Every transparent pixel counts as one colour, whatever its channels.