changes
|
@ -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.
|
||||
|
||||
|
|
|
@ -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"><sodipodi:namedview
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"><title
|
||||
id="title987">Tween icons</title><sodipodi:namedview
|
||||
id="namedview7"
|
||||
pagecolor="#505050"
|
||||
bordercolor="#eeeeee"
|
||||
|
@ -28,8 +32,8 @@
|
|||
inkscape:document-units="px"
|
||||
showgrid="true"
|
||||
inkscape:zoom="12.506951"
|
||||
inkscape:cx="15.711263"
|
||||
inkscape:cy="18.26984"
|
||||
inkscape:cx="6.5163764"
|
||||
inkscape:cy="18.269841"
|
||||
inkscape:window-width="1326"
|
||||
inkscape:window-height="737"
|
||||
inkscape:window-x="40"
|
||||
|
@ -177,4 +181,6 @@
|
|||
cx="-12"
|
||||
cy="7"
|
||||
r="1"
|
||||
inkscape:label="color" /></g></g></svg>
|
||||
inkscape:label="color" /></g></g><metadata
|
||||
id="metadata985"><rdf:RDF><cc:Work
|
||||
rdf:about=""><dc:title>Tween icons</dc:title><dc:creator><cc:Agent><dc:title>GianptDev (_gianpy_)</dc:title></cc:Agent></dc:creator></cc:Work></rdf:RDF></metadata></svg>
|
Before Width: | Height: | Size: 7.3 KiB After Width: | Height: | Size: 7.7 KiB |
|
@ -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"><sodipodi:namedview
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"><title
|
||||
id="title806">BeTween logo</title><sodipodi:namedview
|
||||
id="namedview7"
|
||||
pagecolor="#505050"
|
||||
bordercolor="#eeeeee"
|
||||
|
@ -28,8 +32,8 @@
|
|||
inkscape:document-units="px"
|
||||
showgrid="true"
|
||||
inkscape:zoom="1.84375"
|
||||
inkscape:cx="138.30509"
|
||||
inkscape:cy="109.83051"
|
||||
inkscape:cx="117.9661"
|
||||
inkscape:cy="83.79661"
|
||||
inkscape:window-width="1326"
|
||||
inkscape:window-height="737"
|
||||
inkscape:window-x="40"
|
||||
|
@ -69,4 +73,6 @@
|
|||
x="89.153168"
|
||||
y="140.51163"
|
||||
id="tspan188"
|
||||
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">API</tspan></text></g></svg>
|
||||
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">API</tspan></text></g><metadata
|
||||
id="metadata804"><rdf:RDF><cc:Work
|
||||
rdf:about=""><dc:title>BeTween logo</dc:title><dc:creator><cc:Agent><dc:title>GianptDev (_gianpy_)</dc:title></cc:Agent></dc:creator></cc:Work></rdf:RDF></metadata></svg>
|
||||
|
|
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 4.5 KiB |
|
@ -0,0 +1,98 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
width="16.0px"
|
||||
height="16.0px"
|
||||
viewBox="0 0 16.0 16.0"
|
||||
version="1.1"
|
||||
id="SVGRoot"
|
||||
sodipodi:docname="between_ball.svg"
|
||||
inkscape:version="1.2 (1:1.2.1+202207142221+cd75a1ee6d)"
|
||||
inkscape:export-filename="..\..\textures\between_ball.png"
|
||||
inkscape:export-xdpi="144"
|
||||
inkscape:export-ydpi="144"
|
||||
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"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/">
|
||||
<title
|
||||
id="title1907">Ball</title>
|
||||
<sodipodi:namedview
|
||||
id="namedview137"
|
||||
pagecolor="#505050"
|
||||
bordercolor="#eeeeee"
|
||||
borderopacity="1"
|
||||
inkscape:showpageshadow="0"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#505050"
|
||||
inkscape:document-units="px"
|
||||
showgrid="true"
|
||||
inkscape:zoom="19.02887"
|
||||
inkscape:cx="-3.2319313"
|
||||
inkscape:cy="10.221311"
|
||||
inkscape:window-width="1326"
|
||||
inkscape:window-height="737"
|
||||
inkscape:window-x="40"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="layer1"
|
||||
showguides="true">
|
||||
<inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid260"
|
||||
spacingx="2"
|
||||
spacingy="2" />
|
||||
<sodipodi:guide
|
||||
position="2,18"
|
||||
orientation="1,0"
|
||||
id="guide531"
|
||||
inkscape:locked="false" />
|
||||
<sodipodi:guide
|
||||
position="-2,14"
|
||||
orientation="0,-1"
|
||||
id="guide533"
|
||||
inkscape:locked="false" />
|
||||
<sodipodi:guide
|
||||
position="14,18"
|
||||
orientation="1,0"
|
||||
id="guide535"
|
||||
inkscape:locked="false" />
|
||||
<sodipodi:guide
|
||||
position="-2,2"
|
||||
orientation="0,-1"
|
||||
id="guide537"
|
||||
inkscape:locked="false" />
|
||||
</sodipodi:namedview>
|
||||
<defs
|
||||
id="defs132" />
|
||||
<g
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1">
|
||||
<circle
|
||||
style="fill:#ffffff;stroke-miterlimit:0;stroke:#000000"
|
||||
id="path539"
|
||||
cy="8"
|
||||
cx="8"
|
||||
r="6" />
|
||||
</g>
|
||||
<metadata
|
||||
id="metadata1905">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:title>Ball</dc:title>
|
||||
<dc:creator>
|
||||
<cc:Agent>
|
||||
<dc:title>GianptDev (_gianpy_)</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:creator>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
</svg>
|
After Width: | Height: | Size: 2.6 KiB |
|
@ -0,0 +1,96 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
width="16.0px"
|
||||
height="16.0px"
|
||||
viewBox="0 0 16.0 16.0"
|
||||
version="1.1"
|
||||
id="SVGRoot"
|
||||
sodipodi:docname="between_prism.svg"
|
||||
inkscape:version="1.2 (1:1.2.1+202207142221+cd75a1ee6d)"
|
||||
inkscape:export-filename="../../textures/between_prism.png"
|
||||
inkscape:export-xdpi="120"
|
||||
inkscape:export-ydpi="120"
|
||||
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"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/">
|
||||
<title
|
||||
id="title1170">Prism</title>
|
||||
<sodipodi:namedview
|
||||
id="namedview137"
|
||||
pagecolor="#505050"
|
||||
bordercolor="#eeeeee"
|
||||
borderopacity="1"
|
||||
inkscape:showpageshadow="0"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#505050"
|
||||
inkscape:document-units="px"
|
||||
showgrid="true"
|
||||
inkscape:zoom="19.02887"
|
||||
inkscape:cx="-6.2011039"
|
||||
inkscape:cy="8.5922075"
|
||||
inkscape:window-width="1326"
|
||||
inkscape:window-height="737"
|
||||
inkscape:window-x="40"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="layer1"
|
||||
showguides="true">
|
||||
<inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid260"
|
||||
spacingx="2"
|
||||
spacingy="2" />
|
||||
<sodipodi:guide
|
||||
position="2,18"
|
||||
orientation="1,0"
|
||||
id="guide531"
|
||||
inkscape:locked="false" />
|
||||
<sodipodi:guide
|
||||
position="-2,14"
|
||||
orientation="0,-1"
|
||||
id="guide533"
|
||||
inkscape:locked="false" />
|
||||
<sodipodi:guide
|
||||
position="14,18"
|
||||
orientation="1,0"
|
||||
id="guide535"
|
||||
inkscape:locked="false" />
|
||||
<sodipodi:guide
|
||||
position="-2,2"
|
||||
orientation="0,-1"
|
||||
id="guide537"
|
||||
inkscape:locked="false" />
|
||||
</sodipodi:namedview>
|
||||
<defs
|
||||
id="defs132" />
|
||||
<g
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1">
|
||||
<path
|
||||
style="fill:#ffffff;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1;fill-opacity:1"
|
||||
d="M 8,2 14,8 8,14 2,8 Z"
|
||||
id="path876" />
|
||||
</g>
|
||||
<metadata
|
||||
id="metadata1166">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:title>Prism</dc:title>
|
||||
<dc:creator>
|
||||
<cc:Agent>
|
||||
<dc:title>GiantpDev (_gianpy_)</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:creator>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
</svg>
|
After Width: | Height: | Size: 2.7 KiB |
|
@ -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 },
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
After Width: | Height: | Size: 744 B |
After Width: | Height: | Size: 472 B |