module

IconRenderer::Assets

Module handling game assets

Instance methods

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

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

Source
get_sprite(spritesheet : LoadedSpritesheet, key : String)

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

Source
load_animations(io : IO)

Load an animations plist file.

Source
load_animations(path : Path | String)
Source
load_plist(path : String | Path)

Loads a .plist file and parses it.

Source
load_plist(io : IO)

Loads a .plist file and parses it.

Source
load_spritesheet(path : Path)

Loads the spritesheet and readies the associated image.

Source
load_spritesheet(path : String)

Loads the spritesheet and readies the associated image.

Source
parse_rect_vecs(str : String) : Tuple(Tuple(Int32, Int32), Tuple(Int32, Int32))

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

Source
parse_spritesheet(path : String | Path)

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

Source
parse_spritesheet(io : IO)

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

Source
parse_vec(str : String) : Tuple(Int32, Int32)

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

Source
parse_vec_f(str : String) : Tuple(Float32, Float32)

parse_vec, except for Float32s

Source

Nested types