Module SpriteLoader

Helper class for loading aseprite spritesheet animations.

Also it contains other useful functions.

Functions

create_tileset_from_image (image, offsetx, offsety, w, h) Create a tileset from an image.
from_image (image) Create sprite from image.
from_tileset_image (image, offsetx, offsety, w, h) Create sprite from tileset image.
from_aseprite_sprite_sheet (filename) Load sprite from aseprite spritesheet using sprite cache list.
find_sprite_sheet (name) Find aseprite spritesheet in cache list.


Functions

create_tileset_from_image (image, offsetx, offsety, w, h)
Create a tileset from an image.

Parameters:

  • image Image
  • offsetx number Offset from beginnig of image by x.
  • offsety number Offset from beginnig of image by y.
  • w number Tile width.
  • h number Tile height.

Returns:

    table Array of Quad objects
from_image (image)
Create sprite from image.

Parameters:

Returns:

    menori.Sprite object
from_tileset_image (image, offsetx, offsety, w, h)
Create sprite from tileset image.

Parameters:

  • image Image
  • offsetx number
  • offsety number
  • w number
  • h number

Returns:

    menori.Sprite object
from_aseprite_sprite_sheet (filename)
Load sprite from aseprite spritesheet using sprite cache list.

Parameters:

Returns:

    menori.Sprite object
find_sprite_sheet (name)
Find aseprite spritesheet in cache list.

Parameters:

Returns:

    menori.Sprite object
generated by LDoc 1.4.6 Last updated 2023-03-21 17:41:24