diff --git a/init.lua b/init.lua index e811b15..d2b2e9d 100644 --- a/init.lua +++ b/init.lua @@ -1,5 +1 @@ -local _VERSION = '0.1.3' - -local lib = require ((...) .. '.spritesheet') -lib._VERSION = _VERSION -return lib +return require ((...) .. '.spritesheet') diff --git a/spritesheet.lua b/spritesheet.lua index 3178809..b4e1c4f 100644 --- a/spritesheet.lua +++ b/spritesheet.lua @@ -1,16 +1,17 @@ ---[[-- # Spritesheet +-- # Spritesheet +-- +-- Library for managing sprite sheets of textures and animations. +-- +-- Has support for both individual images in spritesheets and animations. This +-- can be specified from a lua file placed beside the spritesheet image file. +-- +-- ## Notes +-- +-- - When drawing an image or animation when a shader is defined the library may +-- send certain useful constants along, notably `spritesheet_inverse_width` and +-- `spritesheet_inverse_height`. -Library for managing sprite sheets of textures and animations. - -Has support for both individual images in spritesheets and animations. This -can be specified from a lua file placed beside the spritesheet image file. - -## Notes - -- When drawing an image or animation when a shader is defined the library may - send certain useful constants along, notably `spritesheet_inverse_width` and -`spritesheet_inverse_height`. ---]] +local _VERSION = '0.1.3' local error_original = error local error, error_internal do @@ -349,6 +350,7 @@ end local SpriteSheet = {} SpriteSheet.__index = SpriteSheet SpriteSheet.is_spritesheet = true + SpriteSheet._VERSION = _VERSION function SpriteSheet.new (filename) local quad_data = load_quad_data(filename)