module Fluorite::SpriteSheet::Core::Planner

Overview

Pure Core Engine planner & command generator for Sprite Sheet Compression

Defined in:

fluorite/sprite_sheet/core/pipeline.cr

Class Method Summary

Class Method Detail

def self.build_command(config : PipelineConfig, plan : AtlasPlan | Nil = nil) : Fluorite::DSL::Command #

Builds the executable Fluorite::DSL::Command for the configured sprite sheet pipeline


def self.build_filter_expression(config : PipelineConfig, plan : AtlasPlan | Nil = nil) : String #

Synthesizes the FFmpeg filtergraph expression for sprite sheet packing & palette quantization


def self.compute_grid(frame_count : Int32, policy : LayoutPolicy = LayoutPolicy::Grid, fixed_cols : Int32 | Nil = nil, fixed_rows : Int32 | Nil = nil, frame_width : Int32 = 64, frame_height : Int32 = 64, padding : Int32 = 0, margin : Int32 = 0, power_of_two : Bool = false) : Tuple(Int32, Int32) #

Computes optimal {columns, rows} grid dimensions for a given frame count and policy


def self.create_plan(config : PipelineConfig) : AtlasPlan #

Builds the complete AtlasPlan including frame rects, normalized UVs, and VRAM metrics


def self.next_power_of_two(value : Int32) : Int32 #

Computes next power of two >= value (minimum 1)


def self.power_of_two?(value : Int32) : Bool #

Checks if an integer is an exact power of two