moonbit-aseflow

    A MoonBit pipeline for Aseprite JSON sprite animation assets.

    aseprite
    sprite
    animation
    atlas
    gamedev
    Download zip
    Author
    Version
    0.3.1
    License
    Apache-2.0
    Last updated
    2 months ago
    Downloads
    41

    No dependencies

    #moonbit-aseflow

    moonbit-aseflow is a typed asset pipeline for Aseprite JSON sprite-sheet exports. It turns animation frames, tags, slices, nine-patch metadata, and collision boxes into deterministic data that MoonBit games and tools can consume.

    #Project positioning

    The library is the format-stable middle layer between an Aseprite export and a runtime importer. It intentionally does not encode PNG pixels; instead it produces a validated atlas layout and runtime manifests for Godot, Phaser, MoonBit, or a generic consumer.

    #Core capabilities

    • Normalize Aseprite JSON-array and JSON-hash exports with stable ordering.
    • Build forward, reverse, and ping-pong animation clips and state machines.
    • Extract animated slices, nine-patch centers, pivots, collision, hitbox, and hurtbox boxes.
    • Pack source frames with row, compact-row, or power-of-two atlas strategies.
    • Detect invalid geometry, invalid tags, duplicate names, and bad slice data.
    • Produce quality reports, reproducible benchmark summaries, and deterministic runtime manifests.
    • Select from validated engine, quality, atlas, and runtime profiles for repeatable builds.

    #Quick start

    moon check --target all --deny-warn moon test --target wasm moon run cmd/main

    Library callers can parse and export a sheet directly:

    ///|
    test {
    let json =
    #|{"frames": [{"filename": "hero_0", "frame": {"x": 0, "y": 0, "w": 16, "h": 16}, "rotated": false, "trimmed": false, "spriteSourceSize": {"x": 0, "y": 0, "w": 16, "h": 16}, "sourceSize": {"w": 16, "h": 16}, "duration": 100}], "meta": {"image": "hero.png", "size": {"w": 16, "h": 16}, "frameTags": [], "slices": []}}
    let sheet = parse_aseprite_json(json)
    let report = quality_report(sheet)
    inspect(report.passed, content="true")
    }

    #CLI

    moon run cmd/main executes a deterministic preview conversion using the checked-in sample. It prints the same export bundle shape returned by export_bundle_json. Applications that already read files or stdin can pass their text to convert_aseprite_json and select a runtime manifest with export_runtime_bundle.

    #Architecture

    LayerResponsibility
    ParserDecode array/hash Aseprite JSON and normalize optional fields
    ModelTyped rectangles, frames, tags, slices, clips, and state machines
    AtlasRow, compact-row, checked, and power-of-two packing plans
    ValidationGeometry, timeline, naming, slice, and collision diagnostics
    ExportGeneric bundle, quality report, Godot, Phaser, and MoonBit manifests
    CLIRunnable preview and a stable integration smoke test

    #Benchmarks

    The checked-in fixtures under examples/benchmarks cover public Aseprite array/hash shapes and a representative multi-key animation. Run benchmark_report on each fixture to reproduce frame counts, duration, packing size, occupancy, and diagnostic totals. Provenance and expected workloads are recorded in docs/BENCHMARKS.md.

    #Tests and CI

    The repository contains 1,023 executable MoonBit tests, including a boundary matrix for rectangle and atlas invariants. CI installs the current MoonBit stable toolchain, updates the registry, checks every backend with warnings denied, runs wasm/wasm-gc/JS tests, verifies formatting and generated interfaces, and executes the CLI smoke test.

    Run the local CI-equivalent checks:

    moon check --target all --deny-warn moon test --target wasm moon test --target wasm-gc moon test --target js moon fmt --check moon info moon run cmd/main

    #License

    Apache-2.0. See LICENSE.

    AnimationError

    pub suberror AnimationError {
    TagOutOfRange(String)
    EmptyTagName
    } derive(Eq, ToJson,
    Debug
    ,
    FromJson
    )

    AtlasError

    pub suberror AtlasError {
    InvalidMaxWidth(Int)
    InvalidPadding(Int)
    FrameTooWide(String, Int, Int)
    } derive(Eq, ToJson,
    Debug
    ,
    FromJson
    )

    AnimationClip

    pub struct AnimationClip {
    name : String
    frames : Array[String]
    durations : Array[Int]
    direction : Direction
    loop_mode : LoopMode
    } derive(Eq, ToJson,
    Debug
    ,
    FromJson
    )

    AnimationClip::average_duration

    fn AnimationClip::average_duration(self : AnimationClip) -> Double

    AnimationClip::contains_frame

    fn AnimationClip::contains_frame(self : AnimationClip, name : String) -> Bool

    AnimationClip::duration_at

    fn AnimationClip::duration_at(self : AnimationClip, index : Int) -> Int?

    AnimationClip::duration_at_or

    fn AnimationClip::duration_at_or(self : AnimationClip, index : Int, fallback : Int) -> Int

    AnimationClip::duration_sum

    fn AnimationClip::duration_sum(self : AnimationClip) -> Int

    AnimationClip::durations_copy

    fn AnimationClip::durations_copy(self : AnimationClip) -> Array[Int]

    AnimationClip::first_frame

    fn AnimationClip::first_frame(self : AnimationClip) -> String?

    AnimationClip::frame_at

    fn AnimationClip::frame_at(self : AnimationClip, index : Int) -> String?

    AnimationClip::frame_at_or

    fn AnimationClip::frame_at_or(self : AnimationClip, index : Int, fallback : String) -> String

    AnimationClip::frame_count

    fn AnimationClip::frame_count(self : AnimationClip) -> Int

    AnimationClip::frame_index

    fn AnimationClip::frame_index(self : AnimationClip, name : String) -> Int?

    AnimationClip::frame_names

    fn AnimationClip::frame_names(self : AnimationClip) -> Array[String]

    AnimationClip::has_duration

    fn AnimationClip::has_duration(self : AnimationClip, minimum : Int) -> Bool

    AnimationClip::has_repeated_frame

    fn AnimationClip::has_repeated_frame(self : AnimationClip) -> Bool

    AnimationClip::is_empty

    fn AnimationClip::is_empty(self : AnimationClip) -> Bool

    AnimationClip::is_forward

    fn AnimationClip::is_forward(self : AnimationClip) -> Bool

    AnimationClip::is_pingpong

    fn AnimationClip::is_pingpong(self : AnimationClip) -> Bool

    AnimationClip::is_reverse

    fn AnimationClip::is_reverse(self : AnimationClip) -> Bool

    AnimationClip::is_single_frame

    fn AnimationClip::is_single_frame(self : AnimationClip) -> Bool

    AnimationClip::last_frame

    fn AnimationClip::last_frame(self : AnimationClip) -> String?

    AnimationClip::loop_count_for

    fn AnimationClip::loop_count_for(self : AnimationClip, total : Int) -> Int

    AnimationClip::max_duration

    fn AnimationClip::max_duration(self : AnimationClip) -> Int

    AnimationClip::min_duration

    fn AnimationClip::min_duration(self : AnimationClip) -> Int

    AnimationClip::total_duration

    fn AnimationClip::total_duration(self : AnimationClip) -> Int

    AnimationClip::unique_frame_count

    fn AnimationClip::unique_frame_count(self : AnimationClip) -> Int

    AnimationMachine

    pub struct AnimationMachine {
    initial : String
    clips : Array[AnimationClip]
    transitions : Array[StateTransition]
    } derive(Eq, ToJson,
    Debug
    ,
    FromJson
    )

    AnimationMachine::clip_named

    fn AnimationMachine::clip_named(self : AnimationMachine, name : String) -> AnimationClip?

    AnimationMachine::to_json_string

    fn AnimationMachine::to_json_string(self : AnimationMachine, indent? : Int) -> String

    AnimationMachine::transition_target

    fn AnimationMachine::transition_target(self : AnimationMachine, from~ : String, event~ : String) -> String?

    AnimationMachine::with_transition

    fn AnimationMachine::with_transition(self : AnimationMachine, from~ : String, event~ : String, to~ : String) -> AnimationMachine

    AnimationMetrics

    pub struct AnimationMetrics {
    name : String
    frame_count : Int
    total_duration : Int
    unique_frame_count : Int
    looped : Bool
    } derive(Eq, ToJson,
    Debug
    ,
    FromJson
    )

    ArtifactKind

    pub enum ArtifactKind {
    Atlas
    Animation
    Runtime
    Diagnostics
    } derive(Eq, ToJson,
    Debug
    ,
    FromJson
    )

    AssetCatalog

    AssetCatalog::add

    fn AssetCatalog::add(self : AssetCatalog, key : String, sheet : SpriteSheet) -> AssetCatalog

    AssetCatalog::average_frames

    fn AssetCatalog::average_frames(self : AssetCatalog) -> Double

    AssetCatalog::duplicate_keys

    fn AssetCatalog::duplicate_keys(self : AssetCatalog) -> Array[String]

    AssetCatalog::empty

    fn AssetCatalog::empty() -> AssetCatalog

    AssetCatalog::entry_count

    fn AssetCatalog::entry_count(self : AssetCatalog) -> Int

    AssetCatalog::filter_invalid

    fn AssetCatalog::filter_invalid(self : AssetCatalog) -> AssetCatalog

    AssetCatalog::filter_prefix

    fn AssetCatalog::filter_prefix(self : AssetCatalog, prefix : String) -> AssetCatalog

    AssetCatalog::filter_valid

    fn AssetCatalog::filter_valid(self : AssetCatalog) -> AssetCatalog

    AssetCatalog::find

    fn AssetCatalog::find(self : AssetCatalog, key : String) -> CatalogEntry?

    AssetCatalog::has_invalid

    fn AssetCatalog::has_invalid(self : AssetCatalog) -> Bool

    AssetCatalog::has_key

    fn AssetCatalog::has_key(self : AssetCatalog, key : String) -> Bool

    AssetCatalog::images

    fn AssetCatalog::images(self : AssetCatalog) -> Array[String]

    AssetCatalog::invalid_count

    fn AssetCatalog::invalid_count(self : AssetCatalog) -> Int

    AssetCatalog::is_unique

    fn AssetCatalog::is_unique(self : AssetCatalog) -> Bool

    AssetCatalog::keys

    fn AssetCatalog::keys(self : AssetCatalog) -> Array[String]

    AssetCatalog::largest_entry

    fn AssetCatalog::largest_entry(self : AssetCatalog) -> CatalogEntry?

    AssetCatalog::merge

    fn AssetCatalog::merge(self : AssetCatalog, other : AssetCatalog) -> AssetCatalog

    AssetCatalog::remove

    fn AssetCatalog::remove(self : AssetCatalog, key : String) -> AssetCatalog

    AssetCatalog::sort_by_frames

    fn AssetCatalog::sort_by_frames(self : AssetCatalog) -> AssetCatalog

    AssetCatalog::sort_by_key

    fn AssetCatalog::sort_by_key(self : AssetCatalog) -> AssetCatalog

    AssetCatalog::summary

    fn AssetCatalog::summary(self : AssetCatalog) -> String

    AssetCatalog::to_json_string

    fn AssetCatalog::to_json_string(self : AssetCatalog, indent? : Int) -> String

    AssetCatalog::total_animations

    fn AssetCatalog::total_animations(self : AssetCatalog) -> Int

    AssetCatalog::total_duration

    fn AssetCatalog::total_duration(self : AssetCatalog) -> Int

    AssetCatalog::total_frames

    fn AssetCatalog::total_frames(self : AssetCatalog) -> Int

    AssetCatalog::valid_count

    fn AssetCatalog::valid_count(self : AssetCatalog) -> Int

    AtlasCandidate

    pub struct AtlasCandidate {
    strategy : AtlasStrategy
    size : Size
    occupancy : Double
    packed_area : Int
    score : Double
    valid : Bool
    } derive(Eq, ToJson,
    Debug
    ,
    FromJson
    )

    AtlasCandidate::area

    fn AtlasCandidate::area(self : AtlasCandidate) -> Int

    AtlasCandidate::aspect_ratio

    fn AtlasCandidate::aspect_ratio(self : AtlasCandidate) -> Double

    AtlasCandidate::is_square

    fn AtlasCandidate::is_square(self : AtlasCandidate) -> Bool

    AtlasCandidate::score_line

    fn AtlasCandidate::score_line(self : AtlasCandidate) -> String

    AtlasMetrics

    pub struct AtlasMetrics {
    width : Int
    height : Int
    frame_count : Int
    packed_area : Int
    occupancy : Double
    padding_gaps : Int
    } derive(Eq, ToJson,
    Debug
    ,
    FromJson
    )

    AtlasObjective

    pub enum AtlasObjective {
    MinimizeArea
    MinimizeWidth
    MinimizeHeight
    MaximizeOccupancy
    Balanced
    } derive(Eq, ToJson,
    Debug
    ,
    FromJson
    )

    AtlasOptions

    pub struct AtlasOptions {
    max_width : Int
    padding : Int
    } derive(Eq, ToJson,
    Debug
    ,
    FromJson
    )

    AtlasOptions::default

    fn AtlasOptions::default() -> AtlasOptions

    AtlasPlan

    pub struct AtlasPlan {
    image : String
    size : Size
    frames : Array[PackedFrame]
    occupancy : Double
    } derive(Eq, ToJson,
    Debug
    ,
    FromJson
    )

    AtlasPlan::area

    fn AtlasPlan::area(self : AtlasPlan) -> Int

    AtlasPlan::contains_all_frames

    fn AtlasPlan::contains_all_frames(self : AtlasPlan, sheet : SpriteSheet) -> Bool

    AtlasPlan::duration_sum

    fn AtlasPlan::duration_sum(self : AtlasPlan) -> Int

    AtlasPlan::first_frame

    fn AtlasPlan::first_frame(self : AtlasPlan) -> PackedFrame?

    AtlasPlan::fits

    fn AtlasPlan::fits(self : AtlasPlan, bounds : Size) -> Bool

    AtlasPlan::fits_size

    fn AtlasPlan::fits_size(self : AtlasPlan, size : Size) -> Bool

    AtlasPlan::frame_count

    fn AtlasPlan::frame_count(self : AtlasPlan) -> Int

    AtlasPlan::frame_index

    fn AtlasPlan::frame_index(self : AtlasPlan, name : String) -> Int?

    AtlasPlan::frame_named

    fn AtlasPlan::frame_named(self : AtlasPlan, name : String) -> PackedFrame?

    AtlasPlan::frame_names

    fn AtlasPlan::frame_names(self : AtlasPlan) -> Array[String]

    AtlasPlan::has_frame

    fn AtlasPlan::has_frame(self : AtlasPlan, name : String) -> Bool

    AtlasPlan::height

    fn AtlasPlan::height(self : AtlasPlan) -> Int

    AtlasPlan::is_empty

    fn AtlasPlan::is_empty(self : AtlasPlan) -> Bool

    AtlasPlan::last_frame

    fn AtlasPlan::last_frame(self : AtlasPlan) -> PackedFrame?

    AtlasPlan::max_frame_height

    fn AtlasPlan::max_frame_height(self : AtlasPlan) -> Int

    AtlasPlan::max_frame_width

    fn AtlasPlan::max_frame_width(self : AtlasPlan) -> Int

    AtlasPlan::max_height

    fn AtlasPlan::max_height(self : AtlasPlan) -> Int

    AtlasPlan::max_width

    fn AtlasPlan::max_width(self : AtlasPlan) -> Int

    AtlasPlan::occupancy_percent

    fn AtlasPlan::occupancy_percent(self : AtlasPlan) -> Double

    AtlasPlan::packed_area

    fn AtlasPlan::packed_area(self : AtlasPlan) -> Int

    AtlasPlan::padding_gaps

    fn AtlasPlan::padding_gaps(self : AtlasPlan) -> Int

    AtlasPlan::source_area

    fn AtlasPlan::source_area(self : AtlasPlan) -> Int

    AtlasPlan::to_json_string

    fn AtlasPlan::to_json_string(self : AtlasPlan, indent? : Int) -> String

    AtlasPlan::waste_area

    fn AtlasPlan::waste_area(self : AtlasPlan) -> Int

    AtlasPlan::waste_ratio

    fn AtlasPlan::waste_ratio(self : AtlasPlan) -> Double

    AtlasPlan::width

    fn AtlasPlan::width(self : AtlasPlan) -> Int

    AtlasProfile

    pub struct AtlasProfile {
    name : String
    max_width : Int
    padding : Int
    strategy : AtlasStrategy
    objective : AtlasObjective
    mobile : Bool
    } derive(Eq, ToJson,
    Debug
    ,
    FromJson
    )

    AtlasProfile::fits

    fn AtlasProfile::fits(self : AtlasProfile, sheet : SpriteSheet) -> Bool

    AtlasProfile::options

    fn AtlasProfile::options(self : AtlasProfile) -> AtlasOptions

    AtlasProfile::recommend

    fn AtlasProfile::recommend(self : AtlasProfile, sheet : SpriteSheet) -> AtlasCandidate

    AtlasProfile::to_json_string

    fn AtlasProfile::to_json_string(self : AtlasProfile, indent? : Int) -> String

    AtlasRecommendation

    AtlasRecommendation::candidate_named

    fn AtlasRecommendation::candidate_named(self : AtlasRecommendation, strategy : AtlasStrategy) -> AtlasCandidate?

    AtlasRecommendation::occupancy_gain

    fn AtlasRecommendation::occupancy_gain(self : AtlasRecommendation) -> Double

    AtlasRecommendation::to_json_string

    fn AtlasRecommendation::to_json_string(self : AtlasRecommendation, indent? : Int) -> String

    AtlasRecommendation::valid_candidates

    AtlasStrategy

    pub enum AtlasStrategy {
    Rows
    CompactRows
    PowerOfTwo
    } derive(Eq, ToJson,
    Debug
    ,
    FromJson
    )

    BenchmarkReport

    pub struct BenchmarkReport {
    name : String
    frames : Int
    tags : Int
    slices : Int
    total_duration : Int
    atlas_size : Size
    packed_area : Int
    occupancy : Double
    errors : Int
    warnings : Int
    } derive(Eq, ToJson,
    Debug
    ,
    FromJson
    )

    BenchmarkReport::to_json_string

    fn BenchmarkReport::to_json_string(self : BenchmarkReport, indent? : Int) -> String

    CatalogEntry

    pub struct CatalogEntry {
    key : String
    image : String
    frame_count : Int
    animation_count : Int
    slice_count : Int
    duration : Int
    valid : Bool
    } derive(Eq, ToJson,
    Debug
    ,
    FromJson
    )

    CatalogInput

    pub struct CatalogInput {
    key : String
    sheet : SpriteSheet
    } derive(Eq, ToJson,
    Debug
    ,
    FromJson
    )

    CollisionBox

    pub struct CollisionBox {
    name : String
    rect : Rect
    } derive(Eq, ToJson,
    Debug
    ,
    FromJson
    )

    DeliveryProfiles

    DeliveryProfiles::names

    fn DeliveryProfiles::names(self : DeliveryProfiles) -> Array[String]

    DeliveryProfiles::runtime_options

    fn DeliveryProfiles::runtime_options(self : DeliveryProfiles) -> RuntimeOptions

    DeliveryProfiles::workflow_options

    fn DeliveryProfiles::workflow_options(self : DeliveryProfiles, name : String) -> WorkflowOptions

    Diagnostic

    pub struct Diagnostic {
    severity : Severity
    code : String
    message : String
    } derive(Eq, ToJson,
    Debug
    ,
    FromJson
    )

    DiagnosticSummary

    pub struct DiagnosticSummary {
    errors : Int
    warnings : Int
    } derive(Eq, ToJson,
    Debug
    ,
    FromJson
    )

    Direction

    pub enum Direction {
    Forward
    Reverse
    PingPong
    } derive(Eq, ToJson,
    Debug
    ,
    FromJson
    )

    Direction::from_string

    fn Direction::from_string(text : String) -> Direction

    EngineProfile

    pub struct EngineProfile {
    name : String
    target : RuntimeTarget
    max_texture : Int
    max_frames : Int
    padding : Int
    scale : Int
    power_of_two : Bool
    } derive(Eq, ToJson,
    Debug
    ,
    FromJson
    )

    EngineProfile::adapter

    EngineProfile::options

    EngineProfile::to_json_string

    fn EngineProfile::to_json_string(self : EngineProfile, indent? : Int) -> String

    EngineProfile::usable_for

    fn EngineProfile::usable_for(self : EngineProfile, sheet : SpriteSheet) -> Bool

    ExportBundle

    pub struct ExportBundle {
    sheet : SpriteSheet
    atlas : AtlasPlan
    machine : AnimationMachine
    nine_patches : Array[NinePatch]
    diagnostics : Array[Diagnostic]
    } derive(Eq, ToJson,
    Debug
    ,
    FromJson
    )

    FrameMetrics

    pub struct FrameMetrics {
    filename : String
    frame_area : Int
    source_area : Int
    duration : Int
    trimmed : Bool
    rotated : Bool
    collision_boxes : Int
    } derive(Eq, ToJson,
    Debug
    ,
    FromJson
    )

    FrameTag

    pub struct FrameTag {
    name : String
    from : Int
    to : Int
    direction : Direction
    } derive(Eq, ToJson,
    Debug
    ,
    FromJson
    )

    NinePatch

    pub struct NinePatch {
    name : String
    outer : Rect
    center : Rect
    left : Int
    right : Int
    top : Int
    bottom : Int
    } derive(Eq, ToJson,
    Debug
    ,
    FromJson
    )

    PackedFrame

    pub struct PackedFrame {
    filename : String
    source : Rect
    packed : Rect
    duration : Int
    } derive(Eq, ToJson,
    Debug
    ,
    FromJson
    )

    QualityProfile

    pub struct QualityProfile {
    name : String
    max_errors : Int
    max_warnings : Int
    min_occupancy : Double
    max_duration : Int
    require_tags : Bool
    } derive(Eq, ToJson,
    Debug
    ,
    FromJson
    )

    QualityProfile::accepts

    fn QualityProfile::accepts(self : QualityProfile, report : QualityReport) -> Bool

    QualityProfile::to_json_string

    fn QualityProfile::to_json_string(self : QualityProfile, indent? : Int) -> String

    QualityReport

    pub struct QualityReport {
    frame_count : Int
    animation_count : Int
    slice_count : Int
    collision_box_count : Int
    total_duration : Int
    atlas_width : Int
    atlas_height : Int
    occupancy : Double
    errors : Int
    warnings : Int
    passed : Bool
    } derive(Eq, ToJson,
    Debug
    ,
    FromJson
    )

    QualityReport::duration_per_frame

    fn QualityReport::duration_per_frame(self : QualityReport) -> Double

    QualityReport::frame_density

    fn QualityReport::frame_density(self : QualityReport) -> Double

    QualityReport::has_warnings

    fn QualityReport::has_warnings(self : QualityReport) -> Bool

    QualityReport::summary_line

    fn QualityReport::summary_line(self : QualityReport) -> String

    QualityReport::to_json_string

    fn QualityReport::to_json_string(self : QualityReport, indent? : Int) -> String

    RawObjectAsepriteSheet

    Rect

    pub struct Rect {
    x : Int
    y : Int
    w : Int
    h : Int
    } derive(Eq, ToJson,
    Debug
    ,
    FromJson
    )

    Rect::area

    fn Rect::area(self : Rect) -> Int

    Rect::area_with_padding

    fn Rect::area_with_padding(self : Rect, padding : Int) -> Int

    Rect::aspect_ratio

    fn Rect::aspect_ratio(self : Rect) -> Double

    Rect::bottom

    fn Rect::bottom(self : Rect) -> Int

    Rect::bottom_edge

    fn Rect::bottom_edge(self : Rect) -> Int

    Rect::center

    fn Rect::center(self : Rect) -> Point

    Rect::center_x

    fn Rect::center_x(self : Rect) -> Int

    Rect::center_y

    fn Rect::center_y(self : Rect) -> Int

    Rect::clamp_to

    fn Rect::clamp_to(self : Rect, bounds : Rect) -> Rect

    Rect::contains_rect

    fn Rect::contains_rect(self : Rect, other : Rect) -> Bool

    Rect::distance_to

    fn Rect::distance_to(self : Rect, other : Rect) -> Int

    Rect::expand

    fn Rect::expand(self : Rect, amount : Int) -> Rect

    Rect::expanded_area

    fn Rect::expanded_area(self : Rect, amount : Int) -> Int

    Rect::fits_inside

    fn Rect::fits_inside(self : Rect, bounds : Rect) -> Bool

    Rect::grow_height

    fn Rect::grow_height(self : Rect, amount : Int) -> Rect

    Rect::grow_width

    fn Rect::grow_width(self : Rect, amount : Int) -> Rect

    Rect::inset

    fn Rect::inset(self : Rect, amount : Int) -> Rect

    Rect::intersection

    fn Rect::intersection(self : Rect, other : Rect) -> Rect?

    Rect::is_empty

    fn Rect::is_empty(self : Rect) -> Bool

    Rect::is_inside

    fn Rect::is_inside(self : Rect, bounds : Rect) -> Bool

    Rect::is_square

    fn Rect::is_square(self : Rect) -> Bool

    Rect::longest_edge

    fn Rect::longest_edge(self : Rect) -> Int

    Rect::move_to

    fn Rect::move_to(self : Rect, x : Int, y : Int) -> Rect

    Rect::overlaps

    fn Rect::overlaps(self : Rect, other : Rect) -> Bool

    Rect::perimeter

    fn Rect::perimeter(self : Rect) -> Int

    Rect::right

    fn Rect::right(self : Rect) -> Int

    Rect::right_edge

    fn Rect::right_edge(self : Rect) -> Int

    Rect::shortest_edge

    fn Rect::shortest_edge(self : Rect) -> Int

    Rect::shrink_height

    fn Rect::shrink_height(self : Rect, amount : Int) -> Rect

    Rect::shrink_width

    fn Rect::shrink_width(self : Rect, amount : Int) -> Rect

    Rect::touches

    fn Rect::touches(self : Rect, other : Rect) -> Bool

    Rect::translate

    fn Rect::translate(self : Rect, dx : Int, dy : Int) -> Rect

    Rect::translated_area

    fn Rect::translated_area(self : Rect, dx : Int, dy : Int) -> Int

    Rect::union

    fn Rect::union(self : Rect, other : Rect) -> Rect

    Rect::with_origin

    fn Rect::with_origin(self : Rect, x : Int, y : Int) -> Rect

    Rect::with_size

    fn Rect::with_size(self : Rect, w : Int, h : Int) -> Rect

    RuleFinding

    RuntimeAdapter

    pub struct RuntimeAdapter {
    target : RuntimeTarget
    extension_name : String
    format_name : String
    supports_nine_patch : Bool
    supports_collisions : Bool
    } derive(Eq, ToJson,
    Debug
    ,
    FromJson
    )

    RuntimeAdapter::can_export

    fn RuntimeAdapter::can_export(self : RuntimeAdapter, bundle : ExportBundle) -> Bool

    RuntimeAdapter::emit

    fn RuntimeAdapter::emit(self : RuntimeAdapter, bundle : ExportBundle) -> String

    RuntimeAdapter::emit_compact

    fn RuntimeAdapter::emit_compact(self : RuntimeAdapter, bundle : ExportBundle) -> String

    RuntimeAdapter::extension

    fn RuntimeAdapter::extension(self : RuntimeAdapter) -> String

    RuntimeAdapter::for_target

    fn RuntimeAdapter::for_target(target : RuntimeTarget) -> RuntimeAdapter

    RuntimeAdapter::format

    fn RuntimeAdapter::format(self : RuntimeAdapter) -> String

    RuntimeAdapter::manifest_name

    fn RuntimeAdapter::manifest_name(self : RuntimeAdapter, base : String) -> String

    RuntimeAdapter::target_name

    fn RuntimeAdapter::target_name(self : RuntimeAdapter) -> String

    RuntimeAdapter::to_json_string

    fn RuntimeAdapter::to_json_string(self : RuntimeAdapter, indent? : Int) -> String

    RuntimeAdapter::validate_bundle

    fn RuntimeAdapter::validate_bundle(self : RuntimeAdapter, bundle : ExportBundle) -> Array[Diagnostic]

    RuntimeManifest

    pub struct RuntimeManifest {
    target : RuntimeTarget
    name : String
    extension : String
    payload : String
    diagnostics : Array[Diagnostic]
    } derive(Eq, ToJson,
    Debug
    ,
    FromJson
    )

    RuntimeManifest::to_json_string

    fn RuntimeManifest::to_json_string(self : RuntimeManifest, indent? : Int) -> String

    RuntimeManifest::valid

    fn RuntimeManifest::valid(self : RuntimeManifest) -> Bool

    RuntimeOptions

    pub struct RuntimeOptions {
    target : RuntimeTarget
    indent : Int
    include_diagnostics : Bool
    include_slices : Bool
    } derive(Eq, ToJson,
    Debug
    ,
    FromJson
    )

    RuntimeOptions::default

    fn RuntimeOptions::default(target~ : RuntimeTarget) -> RuntimeOptions

    RuntimePreset

    pub struct RuntimePreset {
    name : String
    target : RuntimeTarget
    extension : String
    indent : Int
    include_diagnostics : Bool
    include_slices : Bool
    } derive(Eq, ToJson,
    Debug
    ,
    FromJson
    )

    RuntimePreset::adapter

    RuntimePreset::options

    RuntimePreset::to_json_string

    fn RuntimePreset::to_json_string(self : RuntimePreset, indent? : Int) -> String

    RuntimeTarget

    pub enum RuntimeTarget {
    Generic
    Godot
    Phaser
    MoonBit
    } derive(Eq, ToJson,
    Debug
    ,
    FromJson
    )

    Severity

    SheetMetrics

    pub struct SheetMetrics {
    image : String
    frame_count : Int
    tag_count : Int
    slice_count : Int
    total_frame_area : Int
    total_source_area : Int
    total_duration : Int
    trimmed_frames : Int
    rotated_frames : Int
    collision_boxes : Int
    } derive(Eq, ToJson,
    Debug
    ,
    FromJson
    )

    Size

    Size::area

    fn Size::area(self : Size) -> Int

    Size::max

    fn Size::max(self : Size, other : Size) -> Size

    Size::scale

    fn Size::scale(self : Size, factor : Int) -> Size

    Slice

    pub struct Slice {
    name : String
    color : String?
    bounds : Rect
    center : Rect?
    pivot : Point?
    keys : Array[SliceKey]
    } derive(Eq, ToJson,
    Debug
    ,
    FromJson
    )

    Slice::key_at

    fn Slice::key_at(self : Slice, frame : Int) -> SliceKey?

    Slice::to_nine_patch

    fn Slice::to_nine_patch(self : Slice) -> NinePatch?

    Slice::to_nine_patch_at

    fn Slice::to_nine_patch_at(self : Slice, frame : Int) -> NinePatch?

    SliceKey

    pub struct SliceKey {
    frame : Int
    bounds : Rect
    center : Rect?
    pivot : Point?
    } derive(Eq, ToJson,
    Debug
    ,
    FromJson
    )

    SourceFrame

    pub struct SourceFrame {
    filename : String
    frame : Rect
    rotated : Bool
    trimmed : Bool
    sprite_source_size : Rect
    source_size : Size
    duration : Int
    boxes : Array[CollisionBox]
    } derive(Eq, ToJson,
    Debug
    ,
    FromJson
    )

    SourceFrame::box_area

    fn SourceFrame::box_area(self : SourceFrame) -> Int

    SourceFrame::box_count

    fn SourceFrame::box_count(self : SourceFrame) -> Int

    SourceFrame::box_named

    fn SourceFrame::box_named(self : SourceFrame, name : String) -> CollisionBox?

    SourceFrame::box_names

    fn SourceFrame::box_names(self : SourceFrame) -> Array[String]

    SourceFrame::display_height

    fn SourceFrame::display_height(self : SourceFrame) -> Int

    SourceFrame::display_width

    fn SourceFrame::display_width(self : SourceFrame) -> Int

    SourceFrame::duration_or

    fn SourceFrame::duration_or(self : SourceFrame, fallback : Int) -> Int

    SourceFrame::duration_seconds

    fn SourceFrame::duration_seconds(self : SourceFrame) -> Double

    SourceFrame::frame_area

    fn SourceFrame::frame_area(self : SourceFrame) -> Int

    SourceFrame::frame_center

    fn SourceFrame::frame_center(self : SourceFrame) -> Point

    SourceFrame::has_box_named

    fn SourceFrame::has_box_named(self : SourceFrame, name : String) -> Bool

    SourceFrame::has_boxes

    fn SourceFrame::has_boxes(self : SourceFrame) -> Bool

    SourceFrame::has_collision

    fn SourceFrame::has_collision(self : SourceFrame) -> Bool

    SourceFrame::is_landscape

    fn SourceFrame::is_landscape(self : SourceFrame) -> Bool

    SourceFrame::is_portrait

    fn SourceFrame::is_portrait(self : SourceFrame) -> Bool

    SourceFrame::is_square

    fn SourceFrame::is_square(self : SourceFrame) -> Bool

    SourceFrame::is_untrimmed

    fn SourceFrame::is_untrimmed(self : SourceFrame) -> Bool

    SourceFrame::max_box_area

    fn SourceFrame::max_box_area(self : SourceFrame) -> Int

    SourceFrame::min_box_area

    fn SourceFrame::min_box_area(self : SourceFrame) -> Int

    SourceFrame::occupancy

    fn SourceFrame::occupancy(self : SourceFrame) -> Double

    SourceFrame::source_area

    fn SourceFrame::source_area(self : SourceFrame) -> Int

    SourceFrame::source_center

    fn SourceFrame::source_center(self : SourceFrame) -> Point

    SourceFrame::source_rect

    fn SourceFrame::source_rect(self : SourceFrame) -> Rect

    SourceFrame::trim_bottom

    fn SourceFrame::trim_bottom(self : SourceFrame) -> Int

    SourceFrame::trim_left

    fn SourceFrame::trim_left(self : SourceFrame) -> Int

    SourceFrame::trim_ratio

    fn SourceFrame::trim_ratio(self : SourceFrame) -> Double

    SourceFrame::trim_right

    fn SourceFrame::trim_right(self : SourceFrame) -> Int

    SourceFrame::trim_top

    fn SourceFrame::trim_top(self : SourceFrame) -> Int

    SourceFrame::trimmed_height

    fn SourceFrame::trimmed_height(self : SourceFrame) -> Int

    SourceFrame::trimmed_rect

    fn SourceFrame::trimmed_rect(self : SourceFrame) -> Rect

    SourceFrame::trimmed_width

    fn SourceFrame::trimmed_width(self : SourceFrame) -> Int

    SourceFrame::with_box

    fn SourceFrame::with_box(self : SourceFrame, name~ : String, rect~ : Rect) -> SourceFrame

    SpriteSheet

    pub struct SpriteSheet {
    image : String
    size : Size
    frames : Array[SourceFrame]
    tags : Array[FrameTag]
    slices : Array[Slice]
    } derive(Eq, ToJson,
    Debug
    ,
    FromJson
    )

    SpriteSheet::animation_duration

    fn SpriteSheet::animation_duration(self : SpriteSheet) -> Int

    SpriteSheet::average_duration

    fn SpriteSheet::average_duration(self : SpriteSheet) -> Double

    SpriteSheet::contains_image

    fn SpriteSheet::contains_image(self : SpriteSheet, image : String) -> Bool

    SpriteSheet::empty_frame_count

    fn SpriteSheet::empty_frame_count(self : SpriteSheet) -> Int

    SpriteSheet::find_frame

    fn SpriteSheet::find_frame(self : SpriteSheet, filename : String) -> SourceFrame?

    SpriteSheet::first_frame

    fn SpriteSheet::first_frame(self : SpriteSheet) -> SourceFrame?

    SpriteSheet::frame_at

    fn SpriteSheet::frame_at(self : SpriteSheet, index : Int) -> SourceFrame?

    SpriteSheet::frame_at_or_first

    fn SpriteSheet::frame_at_or_first(self : SpriteSheet, index : Int) -> SourceFrame?

    SpriteSheet::frame_count

    fn SpriteSheet::frame_count(self : SpriteSheet) -> Int

    SpriteSheet::frame_index_or

    fn SpriteSheet::frame_index_or(self : SpriteSheet, name : String, fallback : Int) -> Int

    SpriteSheet::frame_names_with_prefix

    fn SpriteSheet::frame_names_with_prefix(self : SpriteSheet, prefix : String) -> Array[String]

    SpriteSheet::has_animation

    fn SpriteSheet::has_animation(self : SpriteSheet) -> Bool

    SpriteSheet::has_nine_patch

    fn SpriteSheet::has_nine_patch(self : SpriteSheet) -> Bool

    SpriteSheet::has_rotated_frames

    fn SpriteSheet::has_rotated_frames(self : SpriteSheet) -> Bool

    SpriteSheet::has_slice

    fn SpriteSheet::has_slice(self : SpriteSheet, name : String) -> Bool

    SpriteSheet::has_tag

    fn SpriteSheet::has_tag(self : SpriteSheet, name : String) -> Bool

    SpriteSheet::has_trimmed_frames

    fn SpriteSheet::has_trimmed_frames(self : SpriteSheet) -> Bool

    SpriteSheet::image_name

    fn SpriteSheet::image_name(self : SpriteSheet) -> String

    SpriteSheet::last_frame

    fn SpriteSheet::last_frame(self : SpriteSheet) -> SourceFrame?

    SpriteSheet::sheet_area

    fn SpriteSheet::sheet_area(self : SpriteSheet) -> Int

    SpriteSheet::slice_count

    fn SpriteSheet::slice_count(self : SpriteSheet) -> Int

    SpriteSheet::tag_count

    fn SpriteSheet::tag_count(self : SpriteSheet) -> Int

    SpriteSheet::tag_names_sorted

    fn SpriteSheet::tag_names_sorted(self : SpriteSheet) -> Array[String]

    SpriteSheet::total_box_count

    fn SpriteSheet::total_box_count(self : SpriteSheet) -> Int

    SpriteSheet::total_frame_area

    fn SpriteSheet::total_frame_area(self : SpriteSheet) -> Int

    SpriteSheet::total_source_area

    fn SpriteSheet::total_source_area(self : SpriteSheet) -> Int

    SpriteSheet::valid_frame_count

    fn SpriteSheet::valid_frame_count(self : SpriteSheet) -> Int

    SpriteSheet::with_box

    fn SpriteSheet::with_box(self : SpriteSheet, filename~ : String, name~ : String, rect~ : Rect) -> SpriteSheet

    StateTransition

    pub struct StateTransition {
    from : String
    event : String
    to : String
    } derive(Eq, ToJson,
    Debug
    ,
    FromJson
    )

    TransformOptions

    pub struct TransformOptions {
    offset : Point
    scale : Int
    duration_scale : Int
    rename_prefix : String
    clamp_to_sheet : Bool
    preserve_boxes : Bool
    } derive(Eq, ToJson,
    Debug
    ,
    FromJson
    )

    TransformOptions::default

    TransformOptions::with_duration_scale

    fn TransformOptions::with_duration_scale(self : TransformOptions, percent : Int) -> TransformOptions

    TransformOptions::with_offset

    fn TransformOptions::with_offset(self : TransformOptions, offset : Point) -> TransformOptions

    TransformOptions::with_prefix

    fn TransformOptions::with_prefix(self : TransformOptions, prefix : String) -> TransformOptions

    TransformOptions::with_scale

    fn TransformOptions::with_scale(self : TransformOptions, scale : Int) -> TransformOptions

    ValidationResult

    pub struct ValidationResult {
    findings : Array[RuleFinding]
    errors : Int
    warnings : Int
    passed : Bool
    } derive(Eq, ToJson,
    Debug
    ,
    FromJson
    )

    ValidationResult::diagnostics

    ValidationResult::findings_for

    ValidationResult::has_code

    fn ValidationResult::has_code(self : ValidationResult, code : String) -> Bool

    ValidationResult::to_json_string

    fn ValidationResult::to_json_string(self : ValidationResult, indent? : Int) -> String

    ValidationRule

    pub enum ValidationRule {
    SheetGeometry
    FrameNames
    Durations
    AnimationTags
    SliceKeyframes
    CollisionBoxes
    AtlasConstraints
    } derive(Eq, ToJson,
    Debug
    ,
    FromJson
    )

    WorkflowArtifact

    pub struct WorkflowArtifact {
    name : String
    kind : ArtifactKind
    payload : String
    bytes : Int
    } derive(Eq, ToJson,
    Debug
    ,
    FromJson
    )

    WorkflowMode

    pub enum WorkflowMode {
    Development
    Validation
    Release
    } derive(Eq, ToJson,
    Debug
    ,
    FromJson
    )

    WorkflowOptions

    pub struct WorkflowOptions {
    name : String
    mode : WorkflowMode
    atlas_strategy : AtlasStrategy
    max_width : Int
    padding : Int
    runtime : RuntimeTarget
    include_diagnostics : Bool
    } derive(Eq, ToJson,
    Debug
    ,
    FromJson
    )

    WorkflowOptions::development

    fn WorkflowOptions::development(name : String) -> WorkflowOptions

    WorkflowOptions::release

    fn WorkflowOptions::release(name : String) -> WorkflowOptions

    WorkflowOptions::validation

    fn WorkflowOptions::validation(name : String) -> WorkflowOptions

    WorkflowOptions::with_atlas

    fn WorkflowOptions::with_atlas(self : WorkflowOptions, strategy : AtlasStrategy, max_width : Int, padding : Int) -> WorkflowOptions

    WorkflowOptions::with_diagnostics

    fn WorkflowOptions::with_diagnostics(self : WorkflowOptions, enabled : Bool) -> WorkflowOptions

    WorkflowOptions::with_runtime

    fn WorkflowOptions::with_runtime(self : WorkflowOptions, runtime : RuntimeTarget) -> WorkflowOptions

    WorkflowReport

    pub struct WorkflowReport {
    name : String
    mode : WorkflowMode
    artifacts : Array[WorkflowArtifact]
    errors : Int
    warnings : Int
    frame_count : Int
    animation_count : Int
    passed : Bool
    } derive(Eq, ToJson,
    Debug
    ,
    FromJson
    )

    WorkflowReport::artifact_named

    fn WorkflowReport::artifact_named(self : WorkflowReport, name : String) -> WorkflowArtifact?

    WorkflowReport::has_kind

    fn WorkflowReport::has_kind(self : WorkflowReport, kind : ArtifactKind) -> Bool

    WorkflowReport::to_json_string

    fn WorkflowReport::to_json_string(self : WorkflowReport, indent? : Int) -> String

    WorkflowReport::total_bytes

    fn WorkflowReport::total_bytes(self : WorkflowReport) -> Int

    all_animation_metrics

    fn all_animation_metrics(machine : AnimationMachine) -> Array[AnimationMetrics]

    all_frame_metrics

    fn all_frame_metrics(sheet : SpriteSheet) -> Array[FrameMetrics]

    animation_contains

    fn animation_contains(clip : AnimationClip, filename : String) -> Bool

    animation_metrics

    fn animation_metrics(clip : AnimationClip) -> AnimationMetrics

    atlas_candidates_for_widths

    fn atlas_candidates_for_widths(sheet : SpriteSheet, widths : Array[Int], padding : Int) -> Array[AtlasCandidate]

    atlas_frame_names

    fn atlas_frame_names(atlas : AtlasPlan) -> Array[String]

    atlas_has_overlap

    fn atlas_has_overlap(atlas : AtlasPlan) -> Bool

    atlas_is_deterministic

    fn atlas_is_deterministic(left : AtlasPlan, right : AtlasPlan) -> Bool

    atlas_is_power_of_two

    fn atlas_is_power_of_two(size : Size) -> Bool

    atlas_metrics

    fn atlas_metrics(atlas : AtlasPlan) -> AtlasMetrics

    atlas_profile_count

    fn atlas_profile_count() -> Int

    atlas_profile_named

    fn atlas_profile_named(name : String) -> AtlasProfile?

    atlas_profile_names

    fn atlas_profile_names() -> Array[String]

    atlas_profiles

    fn atlas_profiles() -> Array[AtlasProfile]

    atlas_recommendation_summary

    fn atlas_recommendation_summary(recommendation : AtlasRecommendation) -> String

    atlas_source_bounds

    fn atlas_source_bounds(atlas : AtlasPlan) -> Rect?

    atlas_strategy_name

    fn atlas_strategy_name(strategy : AtlasStrategy) -> String

    atlas_waste

    fn atlas_waste(candidate : AtlasCandidate) -> Int

    atlas_waste_ratio

    fn atlas_waste_ratio(candidate : AtlasCandidate) -> Double

    attach_collision_slices

    fn attach_collision_slices(sheet : SpriteSheet) -> SpriteSheet

    average_frame_duration

    fn average_frame_duration(sheet : SpriteSheet) -> Double

    benchmark_report

    fn benchmark_report(name : String, text : String, atlas? : AtlasOptions) -> BenchmarkReport raise

    best_atlas_profile

    fn best_atlas_profile(sheet : SpriteSheet, mobile : Bool) -> AtlasProfile?

    best_engine_profile

    fn best_engine_profile(sheet : SpriteSheet, target : RuntimeTarget) -> EngineProfile?

    best_width_for_area

    fn best_width_for_area(sheet : SpriteSheet, widths : Array[Int], padding : Int) -> AtlasCandidate?

    best_width_for_occupancy

    fn best_width_for_occupancy(sheet : SpriteSheet, widths : Array[Int], padding : Int) -> AtlasCandidate?

    build_delivery_workflow

    fn build_delivery_workflow(sheet : SpriteSheet, name : String, target~ : RuntimeTarget, mobile~ : Bool, quality~ : String) -> WorkflowReport?

    build_export_bundle

    fn build_export_bundle(sheet : SpriteSheet, atlas? : AtlasOptions) -> ExportBundle

    build_machine

    fn build_machine(sheet : SpriteSheet, initial? : String) -> AnimationMachine

    build_machine_checked

    fn build_machine_checked(sheet : SpriteSheet, initial? : String) -> AnimationMachine raise

    build_workflow

    fn build_workflow(sheet : SpriteSheet, options : WorkflowOptions) -> WorkflowReport

    canonicalize_sheet

    fn canonicalize_sheet(sheet : SpriteSheet) -> SpriteSheet

    catalog_entry

    fn catalog_entry(key : String, sheet : SpriteSheet) -> CatalogEntry

    catalog_from_sheets

    fn catalog_from_sheets(inputs : Array[CatalogInput]) -> AssetCatalog

    catalog_json

    fn catalog_json(inputs : Array[CatalogInput], indent? : Int) -> String

    catalog_validate

    fn catalog_validate(catalog : AssetCatalog) -> Bool

    collect_nine_patches

    fn collect_nine_patches(sheet : SpriteSheet) -> Array[NinePatch]

    collect_nine_patches_at

    fn collect_nine_patches_at(sheet : SpriteSheet, frame : Int) -> Array[NinePatch]

    compare_quality

    fn compare_quality(left : QualityReport, right : QualityReport) -> Int

    compatible_delivery_targets

    fn compatible_delivery_targets(sheet : SpriteSheet, mobile~ : Bool) -> Array[RuntimeTarget]

    convert_aseprite_json

    fn convert_aseprite_json(text : String, indent? : Int) -> String raise

    development_workflow

    fn development_workflow(sheet : SpriteSheet, name : String) -> WorkflowReport

    diagnostics_error_count

    fn diagnostics_error_count(sheet : SpriteSheet) -> Int

    diagnostics_to_json

    fn diagnostics_to_json(diagnostics : Array[Diagnostic], indent? : Int) -> String

    diagnostics_warning_count

    fn diagnostics_warning_count(sheet : SpriteSheet) -> Int

    engine_profile_count

    fn engine_profile_count() -> Int

    engine_profile_json

    fn engine_profile_json(indent? : Int) -> String

    engine_profile_named

    fn engine_profile_named(name : String) -> EngineProfile?

    engine_profile_names

    fn engine_profile_names() -> Array[String]

    engine_profiles

    fn engine_profiles() -> Array[EngineProfile]

    engine_profiles_for

    fn engine_profiles_for(target : RuntimeTarget) -> Array[EngineProfile]

    engine_profiles_supporting

    fn engine_profiles_supporting(sheet : SpriteSheet) -> Array[EngineProfile]

    export_bundle_json

    fn export_bundle_json(sheet : SpriteSheet, atlas? : AtlasOptions, indent? : Int) -> String

    export_runtime_bundle

    fn export_runtime_bundle(bundle : ExportBundle, target~ : RuntimeTarget, indent? : Int) -> String

    export_runtime_bundle_with_options

    fn export_runtime_bundle_with_options(bundle : ExportBundle, options : RuntimeOptions) -> String

    frame_area_ratio

    fn frame_area_ratio(frame : SourceFrame) -> Double

    frame_metrics

    fn frame_metrics(frame : SourceFrame) -> FrameMetrics

    has_errors

    fn has_errors(diagnostics : ArrayView[Diagnostic]) -> Bool

    machine_contains_clip

    fn machine_contains_clip(machine : AnimationMachine, name : String) -> Bool

    machine_duration

    fn machine_duration(machine : AnimationMachine) -> Int

    machine_transition_count

    fn machine_transition_count(machine : AnimationMachine) -> Int

    machine_unique_frame_names

    fn machine_unique_frame_names(machine : AnimationMachine) -> Array[String]

    mobile_atlas_profiles

    fn mobile_atlas_profiles() -> Array[AtlasProfile]

    normalize_frame_positions

    fn normalize_frame_positions(sheet : SpriteSheet) -> SpriteSheet

    normalize_rect

    fn normalize_rect(rect : Rect) -> Rect

    offset_sheet

    fn offset_sheet(sheet : SpriteSheet, offset : Point) -> SpriteSheet

    optimize_atlas

    fn optimize_atlas(sheet : SpriteSheet, objective : AtlasObjective) -> AtlasRecommendation

    optimize_for_mobile

    fn optimize_for_mobile(sheet : SpriteSheet) -> AtlasRecommendation

    optimize_for_ui

    fn optimize_for_ui(sheet : SpriteSheet) -> AtlasRecommendation

    optimize_for_web

    fn optimize_for_web(sheet : SpriteSheet) -> AtlasRecommendation

    pack_rows

    fn pack_rows(sheet : SpriteSheet, options? : AtlasOptions) -> AtlasPlan

    pack_rows_checked

    fn pack_rows_checked(sheet : SpriteSheet, options? : AtlasOptions) -> AtlasPlan raise

    pack_strategy

    fn pack_strategy(sheet : SpriteSheet, strategy~ : AtlasStrategy, options? : AtlasOptions) -> AtlasPlan

    pack_strategy_checked

    fn pack_strategy_checked(sheet : SpriteSheet, strategy~ : AtlasStrategy, options? : AtlasOptions) -> AtlasPlan raise

    parse_aseprite_json

    fn parse_aseprite_json(text : String) -> SpriteSheet raise

    parse_sheet

    fn parse_sheet(text : String) -> SpriteSheet raise

    passing_quality_profiles

    fn passing_quality_profiles(report : QualityReport) -> Array[QualityProfile]

    profile_selection_is_compatible

    fn profile_selection_is_compatible(selection : DeliveryProfiles) -> Bool

    profile_selection_summary

    fn profile_selection_summary(selection : DeliveryProfiles) -> String

    quality_gate

    fn quality_gate(sheet : SpriteSheet, atlas? : AtlasOptions) -> Bool

    quality_profile_count

    fn quality_profile_count() -> Int

    quality_profile_named

    fn quality_profile_named(name : String) -> QualityProfile?

    quality_profiles

    fn quality_profiles() -> Array[QualityProfile]

    quality_report

    fn quality_report(sheet : SpriteSheet, atlas? : AtlasOptions) -> QualityReport

    recommend_atlas

    fn recommend_atlas(sheet : SpriteSheet, max_width~ : Int, padding~ : Int, objective? : AtlasObjective) -> AtlasRecommendation

    rect_area_sum

    fn rect_area_sum(rects : ArrayView[Rect]) -> Int

    rect_bounds

    fn rect_bounds(rects : ArrayView[Rect]) -> Rect?

    rects_overlap_any

    fn rects_overlap_any(rects : ArrayView[Rect]) -> Bool

    release_workflow

    fn release_workflow(sheet : SpriteSheet, name : String) -> WorkflowReport

    rename_sheet_frames

    fn rename_sheet_frames(sheet : SpriteSheet, prefix : String) -> SpriteSheet

    retime_sheet

    fn retime_sheet(sheet : SpriteSheet, percent : Int) -> SpriteSheet

    run_validation_rules

    fn run_validation_rules(sheet : SpriteSheet) -> ValidationResult

    runtime_all_valid

    fn runtime_all_valid(manifests : Array[RuntimeManifest]) -> Bool

    runtime_manifest

    fn runtime_manifest(bundle : ExportBundle, name : String, target : RuntimeTarget) -> RuntimeManifest

    runtime_manifest_named

    fn runtime_manifest_named(bundle : ExportBundle, name : String, target_name : String) -> RuntimeManifest

    runtime_manifest_summary

    fn runtime_manifest_summary(manifest : RuntimeManifest) -> String

    runtime_manifests

    fn runtime_manifests(bundle : ExportBundle, name : String) -> Array[RuntimeManifest]

    runtime_payload_size

    fn runtime_payload_size(manifest : RuntimeManifest) -> Int

    runtime_preset_count

    fn runtime_preset_count() -> Int

    runtime_preset_named

    fn runtime_preset_named(name : String) -> RuntimePreset?

    runtime_presets

    fn runtime_presets() -> Array[RuntimePreset]

    runtime_presets_for

    fn runtime_presets_for(target : RuntimeTarget) -> Array[RuntimePreset]

    runtime_target_extension

    fn runtime_target_extension(target : RuntimeTarget) -> String

    runtime_target_format

    fn runtime_target_format(target : RuntimeTarget) -> String

    runtime_target_from_string

    fn runtime_target_from_string(text : String) -> RuntimeTarget

    runtime_target_names

    fn runtime_target_names() -> Array[String]

    runtime_target_supports_collisions

    fn runtime_target_supports_collisions(target : RuntimeTarget) -> Bool

    runtime_target_supports_slices

    fn runtime_target_supports_slices(target : RuntimeTarget) -> Bool

    runtime_targets

    fn runtime_targets() -> Array[RuntimeTarget]

    scale_sheet

    fn scale_sheet(sheet : SpriteSheet, scale : Int) -> SpriteSheet

    select_delivery_profiles

    fn select_delivery_profiles(sheet : SpriteSheet, target~ : RuntimeTarget, mobile~ : Bool, quality~ : String) -> DeliveryProfiles?

    select_frames

    fn select_frames(sheet : SpriteSheet, names : Array[String]) -> SpriteSheet

    select_frames_prefix

    fn select_frames_prefix(sheet : SpriteSheet, prefix : String) -> SpriteSheet

    select_slices_prefix

    fn select_slices_prefix(sheet : SpriteSheet, prefix : String) -> SpriteSheet

    sheet_find_frames

    fn sheet_find_frames(sheet : SpriteSheet, prefix : String) -> Array[SourceFrame]

    sheet_frame_index

    fn sheet_frame_index(sheet : SpriteSheet, filename : String) -> Int?

    sheet_frame_names

    fn sheet_frame_names(sheet : SpriteSheet) -> Array[String]

    sheet_frames_with_boxes

    fn sheet_frames_with_boxes(sheet : SpriteSheet) -> Array[SourceFrame]

    sheet_frames_with_duration

    fn sheet_frames_with_duration(sheet : SpriteSheet, minimum : Int) -> Array[SourceFrame]

    sheet_is_valid

    fn sheet_is_valid(sheet : SpriteSheet) -> Bool

    sheet_largest_frame

    fn sheet_largest_frame(sheet : SpriteSheet) -> SourceFrame?

    sheet_longest_frame

    fn sheet_longest_frame(sheet : SpriteSheet) -> SourceFrame?

    sheet_metrics

    fn sheet_metrics(sheet : SpriteSheet) -> SheetMetrics

    sheet_slice_index

    fn sheet_slice_index(sheet : SpriteSheet, name : String) -> Int?

    sheet_slice_names

    fn sheet_slice_names(sheet : SpriteSheet) -> Array[String]

    sheet_source_occupancy

    fn sheet_source_occupancy(sheet : SpriteSheet) -> Double

    sheet_summary

    fn sheet_summary(sheet : SpriteSheet) -> String

    sheet_tag_index

    fn sheet_tag_index(sheet : SpriteSheet, name : String) -> Int?

    sheet_tag_names

    fn sheet_tag_names(sheet : SpriteSheet) -> Array[String]

    sheet_to_json

    fn sheet_to_json(sheet : SpriteSheet, indent? : Int) -> String

    sheet_trim_ratio

    fn sheet_trim_ratio(sheet : SpriteSheet) -> Double

    snap_rect

    fn snap_rect(rect : Rect, grid : Int) -> Rect

    sort_frames_by_filename

    fn sort_frames_by_filename(sheet : SpriteSheet) -> SpriteSheet

    sort_slices_by_name

    fn sort_slices_by_name(sheet : SpriteSheet) -> SpriteSheet

    strip_collision_boxes

    fn strip_collision_boxes(sheet : SpriteSheet) -> SpriteSheet

    strip_slices

    fn strip_slices(sheet : SpriteSheet) -> SpriteSheet

    strip_tags

    fn strip_tags(sheet : SpriteSheet) -> SpriteSheet

    summarize_diagnostics

    fn summarize_diagnostics(diagnostics : ArrayView[Diagnostic]) -> DiagnosticSummary

    total_duration

    fn total_duration(sheet : SpriteSheet) -> Int

    transform_area_delta

    fn transform_area_delta(before : SpriteSheet, after : SpriteSheet) -> Int

    transform_duration_delta

    fn transform_duration_delta(before : SpriteSheet, after : SpriteSheet) -> Int

    transform_frame

    fn transform_frame(frame : SourceFrame, options : TransformOptions) -> SourceFrame

    transform_frame_count_delta

    fn transform_frame_count_delta(before : SpriteSheet, after : SpriteSheet) -> Int

    transform_frame_duration

    fn transform_frame_duration(frame : SourceFrame, percent : Int) -> SourceFrame

    transform_frame_name

    fn transform_frame_name(frame : SourceFrame, prefix : String) -> SourceFrame

    transform_frame_offset

    fn transform_frame_offset(frame : SourceFrame, offset : Point) -> SourceFrame

    transform_frame_scale

    fn transform_frame_scale(frame : SourceFrame, scale : Int) -> SourceFrame

    transform_frames

    fn transform_frames(frames : Array[SourceFrame], options : TransformOptions) -> Array[SourceFrame]

    transform_is_deterministic

    fn transform_is_deterministic(sheet : SpriteSheet, options : TransformOptions) -> Bool

    transform_preserves_frame_count

    fn transform_preserves_frame_count(before : SpriteSheet, after : SpriteSheet) -> Bool

    transform_preserves_slice_count

    fn transform_preserves_slice_count(before : SpriteSheet, after : SpriteSheet) -> Bool

    transform_preserves_tag_count

    fn transform_preserves_tag_count(before : SpriteSheet, after : SpriteSheet) -> Bool

    transform_sheet

    fn transform_sheet(sheet : SpriteSheet, options : TransformOptions) -> SpriteSheet

    transform_slice

    fn transform_slice(slice : Slice, options : TransformOptions) -> Slice

    transform_slice_key

    fn transform_slice_key(key : SliceKey, options : TransformOptions) -> SliceKey

    transform_slices

    fn transform_slices(slices : Array[Slice], options : TransformOptions) -> Array[Slice]

    trim_empty_collision_boxes

    fn trim_empty_collision_boxes(sheet : SpriteSheet) -> SpriteSheet

    validate_sheet

    fn validate_sheet(sheet : SpriteSheet) -> Array[Diagnostic]

    validate_with_rules

    fn validate_with_rules(sheet : SpriteSheet, rules : Array[ValidationRule]) -> ValidationResult

    validate_workflow

    fn validate_workflow(sheet : SpriteSheet, options : WorkflowOptions) -> WorkflowReport

    validation_codes

    fn validation_codes(result : ValidationResult) -> Array[String]

    validation_error_codes

    fn validation_error_codes(result : ValidationResult) -> Array[String]

    validation_is_clean

    fn validation_is_clean(result : ValidationResult) -> Bool

    validation_result_summary

    fn validation_result_summary(result : ValidationResult) -> String

    validation_rule_names

    fn validation_rule_names() -> Array[String]

    validation_warning_codes

    fn validation_warning_codes(result : ValidationResult) -> Array[String]

    workflow_artifact_kinds

    fn workflow_artifact_kinds(report : WorkflowReport) -> Array[ArtifactKind]

    workflow_artifact_names

    fn workflow_artifact_names(report : WorkflowReport) -> Array[String]

    workflow_diagnostics

    fn workflow_diagnostics(report : WorkflowReport) -> DiagnosticSummary

    workflow_for_ci

    fn workflow_for_ci(name : String) -> WorkflowOptions

    workflow_for_editor

    fn workflow_for_editor(name : String) -> WorkflowOptions

    workflow_for_shipping

    fn workflow_for_shipping(name : String) -> WorkflowOptions

    workflow_is_releasable

    fn workflow_is_releasable(report : WorkflowReport) -> Bool

    workflow_rebuild_is_deterministic

    fn workflow_rebuild_is_deterministic(sheet : SpriteSheet, options : WorkflowOptions) -> Bool

    workflow_status

    fn workflow_status(report : WorkflowReport) -> String

    workflow_target_options

    fn workflow_target_options(name : String, target : RuntimeTarget) -> WorkflowOptions

    Powered by MoonBit

    Site sourceReport issueModulesSkillsBuild queueStatistics

    © 2026 mooncakes.io