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:
- from_image (image)
-
Create sprite from image.
Parameters:
- image Image
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:
- filename string
Returns:
-
menori.Sprite
object
- find_sprite_sheet (name)
-
Find aseprite spritesheet in cache list.
Parameters:
- name string
Returns:
-
menori.Sprite
object