module IconRenderer::Assets

Overview

Module handling game assets

Extended Modules

Defined in:

assets.cr

Instance Method Summary

Instance Method Detail

def get_sprite(spritesheet : Spritesheet, img : Vips::Image, key : String) #

Trims out a sprite from an image according to a .plist spritesheet.


[View source]
def get_sprite(spritesheet : LoadedSpritesheet, key : String) #

Trims out a sprite from an image according to a .plist spritesheet.


[View source]
def load_animations(io : IO) #

Load an animations plist file.


[View source]
def load_animations(path : Path | String) #

[View source]
def load_plist(path : String | Path) #

Loads a .plist file and parses it.


[View source]
def load_plist(io : IO) #

Loads a .plist file and parses it.


[View source]
def load_spritesheet(path : Path) #

Loads the spritesheet and readies the associated image.


[View source]
def load_spritesheet(path : String) #

Loads the spritesheet and readies the associated image.


[View source]
def parse_rect_vecs(str : String) : Tuple(Tuple(Int32, Int32), Tuple(Int32, Int32)) #

"{{1,2},{3,4}}" -> {{1, 2}, {3, 4}}


[View source]
def parse_spritesheet(path : String | Path) #

Loads a .plist file and parses it into a spritesheet.


[View source]
def parse_spritesheet(io : IO) #

Loads a .plist file and parses it into a spritesheet.


[View source]
def parse_vec(str : String) : Tuple(Int32, Int32) #

"{1,2}" -> {1, 2}


[View source]
def parse_vec_f(str : String) : Tuple(Float32, Float32) #

#parse_vec, except for Float32s


[View source]