diff --git a/CHANGELOG.md b/CHANGELOG.md index a53ca82..e2c9512 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -47,5 +47,6 @@ - creating icons to give the api a cooler look. - - Inspirations: - - https://github.com/godotengine/godot/blob/master/editor/icons/Tween.svg -- converted every function declaration in a more friendly way. +- geometry dash characters are not used anymore for the function debug list in favor of a less boring image of a ball and a prism, they also have borders! +- converted the syntax of every function in a more friendly way. diff --git a/resources/tween_icon.svg b/resources/icons/tween_icon.svg similarity index 92% rename from resources/tween_icon.svg rename to resources/icons/tween_icon.svg index 253d2c0..d3e578c 100644 --- a/resources/tween_icon.svg +++ b/resources/icons/tween_icon.svg @@ -16,7 +16,11 @@ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns="http://www.w3.org/2000/svg" - xmlns:svg="http://www.w3.org/2000/svg">Tween icons + inkscape:label="color" />Tween iconsGianptDev (_gianpy_) diff --git a/resources/screenshot.svg b/resources/screenshot.svg index de5d3c7..9f601f5 100644 --- a/resources/screenshot.svg +++ b/resources/screenshot.svg @@ -16,7 +16,11 @@ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns="http://www.w3.org/2000/svg" - xmlns:svg="http://www.w3.org/2000/svg">BeTween logoAPI + style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:42px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#0d6efd;stroke:none;stroke-width:1.43189;stroke-dasharray:none;fill-opacity:1">APIBeTween logoGianptDev (_gianpy_) diff --git a/resources/textures/between_ball.svg b/resources/textures/between_ball.svg new file mode 100644 index 0000000..8dcd630 --- /dev/null +++ b/resources/textures/between_ball.svg @@ -0,0 +1,98 @@ + + + + + Ball + + + + + + + + + + + + + + + Ball + + + GianptDev (_gianpy_) + + + + + + diff --git a/resources/textures/between_prism.svg b/resources/textures/between_prism.svg new file mode 100644 index 0000000..f46d820 --- /dev/null +++ b/resources/textures/between_prism.svg @@ -0,0 +1,96 @@ + + + + + Prism + + + + + + + + + + + + + + + Prism + + + GiantpDev (_gianpy_) + + + + + + diff --git a/src/debug.lua b/src/debug.lua index afd1e96..472c422 100644 --- a/src/debug.lua +++ b/src/debug.lua @@ -28,7 +28,7 @@ function BeTweenApi.debug.show_functions (_, player_name) local player = minetest.get_player_by_name(player_name) local index = 0 local start, finish = 32, 256 - local scale = { x = 2, y = 2} + local scale = { x = 1, y = 1} local visual = { tweens = {}, -- contain list of interpolation name and hud items used. @@ -41,7 +41,7 @@ function BeTweenApi.debug.show_functions (_, player_name) local start_icon = player:hud_add({ hud_elem_type = "image", - text = "^[resize:10x10^[colorize:#0000ff", + text = "between_ball.png^[multiply:#0000ff", scale = scale, offset = { x = start, y = y }, position = { x = 0, y = 0 }, @@ -50,7 +50,7 @@ function BeTweenApi.debug.show_functions (_, player_name) local stop_icon = player:hud_add({ hud_elem_type = "image", - text = "^[resize:10x10^[colorize:#0000ff", + text = "between_ball.png^[multiply:#0000ff", scale = scale, offset = { x = finish, y = y }, position = { x = 0, y = 0 }, @@ -59,7 +59,7 @@ function BeTweenApi.debug.show_functions (_, player_name) local icon = player:hud_add({ hud_elem_type = "image", - text = "^[resize:6x6^[colorize:#ff0000", + text = "between_prism.png^[multiply:#ff0000", scale = scale, offset = { x = 32, y = y }, position = { x = 0, y = 0 }, diff --git a/src/tween.lua b/src/tween.lua index 6beabe0..c74be5b 100644 --- a/src/tween.lua +++ b/src/tween.lua @@ -16,12 +16,13 @@ BeTweenApi.active_tweens = {} --- on_stop(tween) --- executed on tween stop. --- on_step(step, tween) --- executed on tween interpolation step. --- on_loop(tween) --- executed every loop the tween complete, only called if loop is used. +--- @class Tween --- @param method function --- @param movement table --- @param time number --- @param loop boolean | integer false --- @param callbacks table nil ---- @return table | nil +--- @return Tween | nil function BeTweenApi.tween (method, movement, time, loop, callbacks) -- movement require two values, the initial position and the final position. @@ -158,4 +159,3 @@ function BeTweenApi.tween (method, movement, time, loop, callbacks) minetest.log("action", string.format("New tween '%p' created.", tween)) return tween end - diff --git a/textures/between_ball.png b/textures/between_ball.png new file mode 100644 index 0000000..df81b2f Binary files /dev/null and b/textures/between_ball.png differ diff --git a/textures/between_prism.png b/textures/between_prism.png new file mode 100644 index 0000000..8d1a144 Binary files /dev/null and b/textures/between_prism.png differ