module IconRenderer::Assets
Overview
Module handling game assets
Extended Modules
Defined in:
assets.crInstance Method Summary
-
#get_sprite(spritesheet : Spritesheet, img : Vips::Image, key : String)
Trims out a sprite from an image according to a .plist spritesheet.
-
#get_sprite(spritesheet : LoadedSpritesheet, key : String)
Trims out a sprite from an image according to a .plist spritesheet.
-
#load_animations(io : IO)
Load an animations plist file.
- #load_animations(path : Path | String)
-
#load_plist(path : String | Path)
Loads a .plist file and parses it.
-
#load_plist(io : IO)
Loads a .plist file and parses it.
-
#load_spritesheet(path : Path)
Loads the spritesheet and readies the associated image.
-
#load_spritesheet(path : String)
Loads the spritesheet and readies the associated image.
-
#parse_rect_vecs(str : String) : Tuple(Tuple(Int32, Int32), Tuple(Int32, Int32))
"{{1,2},{3,4}}"
->{{1, 2}, {3, 4}}
-
#parse_spritesheet(path : String | Path)
Loads a .plist file and parses it into a spritesheet.
-
#parse_spritesheet(io : IO)
Loads a .plist file and parses it into a spritesheet.
-
#parse_vec(str : String) : Tuple(Int32, Int32)
"{1,2}"
->{1, 2}
-
#parse_vec_f(str : String) : Tuple(Float32, Float32)
#parse_vec
, except for Float32s
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.
def get_sprite(spritesheet : LoadedSpritesheet, key : String)
#
Trims out a sprite from an image according to a .plist spritesheet.
def parse_rect_vecs(str : String) : Tuple(Tuple(Int32, Int32), Tuple(Int32, Int32))
#
"{{1,2},{3,4}}"
-> {{1, 2}, {3, 4}}