class Fluorite::SpriteSheet::DSL::SpriteSheetBuilder

Overview

Declarative builder for configuring and executing a SpriteSheet compression pipeline

Defined in:

fluorite/sprite_sheet/dsl/sprite_sheet_builder.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(config : Core::PipelineConfig = Core::PipelineConfig.new) #

Instance Method Detail

def animation(name : String, loop_anim : Bool = true) : self #

def background(color : String) : self #

def bayer_scale(scale : Int32) : self #

def clut4!(dither : Symbol | String | Core::DitherAlgorithm = Core::DitherAlgorithm::Sierra2_4a) : self #

def clut8!(dither : Symbol | String | Core::DitherAlgorithm = Core::DitherAlgorithm::Sierra2_4a) : self #

def columns(cols : Int32) : self #

def command : Fluorite::DSL::Command #

Builds the underlying Fluorite::DSL::Command


def compression_level(level : Int32) : self #

def config : Core::PipelineConfig #

def crop(w : Int32, h : Int32, x : Int32 = 0, y : Int32 = 0) : self #

def dither(algo : Symbol | String | Core::DitherAlgorithm) : self #

def duration(time : String | Time::Span) : self #

def format(fmt : Symbol | String | Core::CompressionFormat) : self #

def fps(rate : Float64 | Int32) : self #

def frame_count(count : Int32) : self #

def frame_height(height : Int32) : self #

def frame_size(width : Int32, height : Int32) : self #

def frame_width(width : Int32) : self #

def frames(count : Int32) : self #

def godot_import(path : String) : self #

def godot_import!(enable : Bool = true) : self #

def grid(cols : Int32, r : Int32) : self #

def horizontal_strip! : self #

def input(path : String) : self #

def layout(policy : Symbol | String | Core::LayoutPolicy) : self #

def margin(px : Int32) : self #

def max_colors(colors : Int32) : self #

def metadata(path : String) : self #

def output(path : String) : self #

def padding(px : Int32) : self #

def pixel_art! : self #

def plan : Core::AtlasPlan #

Computes and returns the Core::AtlasPlan


def power_of_two(enable : Bool = true) : self #

def power_of_two! : self #

def reserve_transparent(enable : Bool = true) : self #

def rgb565! : self #

def rgba32! : self #

def rows(r : Int32) : self #

def run(&progress_block : Runner::Progress -> Nil) : Tuple(Process::Status, Core::AtlasPlan) #

Runs the compression pipeline and writes any configured metadata sidecar files


def run : Tuple(Process::Status, Core::AtlasPlan) #

def scale_flags(flags : Symbol | String | Core::ScaleFlags) : self #

def seek(time : String | Time::Span) : self #

def to(path : String) : self #

def to_cmd_string : String #

def vertical_strip! : self #

def webp!(quality : Int32 = 90, lossless : Bool = true) : self #

def write_sidecars!(atlas_plan : Core::AtlasPlan | Nil = nil) : Core::AtlasPlan #

Writes metadata JSON/YAML and Godot .import sidecar files if configured