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.
Sourceget_sprite(spritesheet : LoadedSpritesheet, key : String)
Trims out a sprite from an image according to a .plist spritesheet.
Sourceload_animations(io : IO)
Load an animations plist file.
Sourceload_animations(path : Path | String)
Sourceload_plist(path : String | Path)
Loads a .plist file and parses it.
Sourceload_plist(io : IO)
Loads a .plist file and parses it.
Sourceload_spritesheet(path : Path)
Loads the spritesheet and readies the associated image.
Sourceload_spritesheet(path : String)
Loads the spritesheet and readies the associated image.
Sourceparse_rect_vecs(str : String) : Tuple(Tuple(Int32, Int32), Tuple(Int32, Int32))
"{{1,2},{3,4}}" -> {{1, 2}, {3, 4}}
Sourceparse_spritesheet(path : String | Path)
Loads a .plist file and parses it into a spritesheet.
Sourceparse_spritesheet(io : IO)
Loads a .plist file and parses it into a spritesheet.
Sourceparse_vec(str : String) : Tuple(Int32, Int32)
Sourceparse_vec_f(str : String) : Tuple(Float32, Float32)
parse_vec, except for Float32s
Source