From 0a794a5522e509a4b32639dd6d5e67c78c96cfec Mon Sep 17 00:00:00 2001 From: alek13 Date: Thu, 6 Mar 2025 00:36:31 +0300 Subject: [PATCH] `ide-helper`: add notations for `TileAnimationDefinition`. --- definitions/TileAnimationDefinition.lua | 35 +++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 definitions/TileAnimationDefinition.lua diff --git a/definitions/TileAnimationDefinition.lua b/definitions/TileAnimationDefinition.lua new file mode 100644 index 0000000..50a4573 --- /dev/null +++ b/definitions/TileAnimationDefinition.lua @@ -0,0 +1,35 @@ +--- @class TileAnimationDefinition: table +local TileAnimationDefinition = { + --- @type string one of {"vertical_frames"|"sheet_2d"} + type = "", + + --- Width of a frame in pixels. + --- Only for `type == "vertical_frames"` + --- @type number + aspect_w = 16, + + --- Height of a frame in pixels + --- Only for `type == "vertical_frames"` + --- @type number + aspect_h = 16, + + --- Full loop length + --- Only for `type == "vertical_frames"` + --- @type number + length = 3.0, + + --- Width in number of frames + --- Only for `type == "sheet_2d"` + --- @type number + frames_w = 5, + + --- Height in number of frames + --- Only for `type == "sheet_2d"` + --- @type number + frames_h = 3, + + --- Length of a single frame + --- Only for `type == "sheet_2d"` + --- @type number + frame_length = 0.5, +}