Skip to content

Commit 17703aa

Browse files
committed
update to 1.3.0
1 parent d7702c0 commit 17703aa

16 files changed

Lines changed: 2534 additions & 1702 deletions

DefoldDocs/api/bitop.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---Bitwise operations API documentation
22
---Lua BitOp <http://bitop.luajit.org/api.html> is a C extension module for Lua 5.1/5.2 which adds bitwise operations on numbers.
3-
---Lua BitOp is Copyright © 2008-2012 Mike Pall.
3+
---Lua BitOp is Copyright © 2008-2012 Mike Pall.
44
---Lua BitOp is free software, released under the MIT license (same license as the Lua core).
55
---Lua BitOp is compatible with the built-in bitwise operations in LuaJIT 2.0 and is used
66
---on platforms where Defold runs without LuaJIT.

DefoldDocs/api/gui.lua

Lines changed: 13 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -225,10 +225,6 @@ function gui.cancel_animation(node, property) end
225225
---@param node node node cancel flipbook animation for
226226
function gui.cancel_flipbook(node) end
227227

228-
---cancel a spine animation
229-
---@param node node spine node that should cancel its animation
230-
function gui.cancel_spine(node) end
231-
232228
---Make a clone instance of a node.
233229
---This function does not clone the supplied node's children nodes.
234230
---Use gui.clone_tree for that purpose.
@@ -447,7 +443,7 @@ function gui.get_size(node) end
447443
---The size mode defines how the node will adjust itself in size. Automatic
448444
---size mode alters the node size based on the node's content. Automatic size
449445
---mode works for Box nodes and Pie nodes which will both adjust their size
450-
---to match the assigned image. Spine, Particle fx and Text nodes will ignore
446+
---to match the assigned image. Particle fx and Text nodes will ignore
451447
---any size mode setting.
452448
---@param node node node from which to get the size mode (node)
453449
---@return constant the current size mode
@@ -458,40 +454,6 @@ function gui.get_size_mode(node) end
458454
---@return vector4 configuration values
459455
function gui.get_slice9(node) end
460456

461-
---Gets the playing animation on a spine node
462-
---@param node node node to get spine skin from
463-
---@return hash spine animation id, 0 if no animation is playing
464-
function gui.get_spine_animation(node) end
465-
466-
---The returned node can be used for parenting and transform queries.
467-
---This function has complexity O(n), where n is the number of bones in the spine model skeleton.
468-
---@param node node spine node to query for bone node
469-
---@param bone_id string|hash id of the corresponding bone
470-
---@return node node corresponding to the spine bone
471-
function gui.get_spine_bone(node, bone_id) end
472-
473-
---This is only useful for spine nodes. Gets the normalized cursor of the animation on a spine node.
474-
---@param node node spine node to get the cursor for (node)
475-
---@return value number cursor value
476-
function gui.get_spine_cursor(node) end
477-
478-
---This is only useful for spine nodes. Gets the playback rate of the animation on a spine node.
479-
---@param node node spine node to set the cursor for
480-
---@return number playback rate
481-
function gui.get_spine_playback_rate(node) end
482-
483-
---Returns the spine scene id of the supplied node.
484-
---This is currently only useful for spine nodes.
485-
---The returned spine scene must be mapped to the gui scene in the gui editor.
486-
---@param node node node to get texture from
487-
---@return hash spine scene id
488-
function gui.get_spine_scene(node) end
489-
490-
---Gets the spine skin of a spine node
491-
---@param node node node to get spine skin from
492-
---@return hash spine skin id, 0 if no explicit skin is set
493-
function gui.get_spine_skin(node) end
494-
495457
---Returns the text value of a text node. This is only useful for text nodes.
496458
---@param node node node from which to get the text
497459
---@return string text value
@@ -565,12 +527,6 @@ function gui.new_particlefx_node(pos, particlefx) end
565527
---@return node new pie node
566528
function gui.new_pie_node(pos, size) end
567529

568-
---Dynamically create a new spine node.
569-
---@param pos vector3|vector4 node position
570-
---@param spine_scene string|hash spine scene id
571-
---@return node new spine node
572-
function gui.new_spine_node(pos, spine_scene) end
573-
574530
---Dynamically create a new text node.
575531
---@param pos vector3|vector4 node position
576532
---@param text string node text
@@ -610,14 +566,6 @@ function gui.play_flipbook(node, animation, complete_function, play_properties)
610566
---@param emitter_state_function function(self, node, emitter, state) optional callback function that will be called when an emitter attached to this particlefx changes state.
611567
function gui.play_particlefx(node, emitter_state_function) end
612568

613-
---Starts a spine animation.
614-
---@param node node spine node that should play the animation
615-
---@param animation_id string|hash id of the animation to play
616-
---@param playback constant playback mode
617-
---@param play_properties table optional table with properties
618-
---@param complete_function function(self, node) function to call when the animation has completed
619-
function gui.play_spine_anim(node, animation_id, playback, play_properties, complete_function) end
620-
621569
---Resets the input context of keyboard. This will clear marked text.
622570
function gui.reset_keyboard() end
623571

@@ -626,6 +574,12 @@ function gui.reset_keyboard() end
626574
---Nodes that are created dynamically from script are not affected.
627575
function gui.reset_nodes() end
628576

577+
---Convert the screen position to the local position of supplied node
578+
---@param node node node used for getting local transformation matrix
579+
---@param screen_position vector3 screen position
580+
---@return vector3 local position
581+
function gui.screen_to_local(node, screen_position) end
582+
629583
---Sets the adjust mode on a node.
630584
---The adjust mode defines how the node will adjust itself to screen
631585
---resolutions that differs from the one in the project settings.
@@ -792,6 +746,11 @@ function gui.set_rotation(node, rotation) end
792746
---@param scale vector3|vector4 new scale
793747
function gui.set_scale(node, scale) end
794748

749+
---Set the screen position to the supplied node
750+
---@param node node node to set the screen position to
751+
---@param screen_position vector3 screen position
752+
function gui.set_screen_position(node, screen_position) end
753+
795754
---Sets the shadow color of the supplied node.
796755
---See gui.set_color <> for info how vectors encode color values.
797756
---@param node node node to set the shadow color for
@@ -808,7 +767,7 @@ function gui.set_size(node, size) end
808767
---The size mode defines how the node will adjust itself in size. Automatic
809768
---size mode alters the node size based on the node's content. Automatic size
810769
---mode works for Box nodes and Pie nodes which will both adjust their size
811-
---to match the assigned image. Spine, Particle fx and Text nodes will ignore
770+
---to match the assigned image. Particle fx and Text nodes will ignore
812771
---any size mode setting.
813772
---@param node node node to set size mode for
814773
---@param size_mode constant size mode to set
@@ -819,27 +778,6 @@ function gui.set_size_mode(node, size_mode) end
819778
---@param values vector4 new values
820779
function gui.set_slice9(node, values) end
821780

822-
---This is only useful for spine nodes. The cursor is normalized.
823-
---@param node node spine node to set the cursor for
824-
---@param cursor number cursor value
825-
function gui.set_spine_cursor(node, cursor) end
826-
827-
---This is only useful for spine nodes. Sets the playback rate of the animation on a spine node. Must be positive.
828-
---@param node node spine node to set the cursor for
829-
---@param playback_rate number playback rate
830-
function gui.set_spine_playback_rate(node, playback_rate) end
831-
832-
---Set the spine scene on a spine node. The spine scene must be mapped to the gui scene in the gui editor.
833-
---@param node node node to set spine scene for
834-
---@param spine_scene string|hash spine scene id
835-
function gui.set_spine_scene(node, spine_scene) end
836-
837-
---Sets the spine skin on a spine node.
838-
---@param node node node to set the spine skin on
839-
---@param spine_skin string|hash spine skin id
840-
---@param spine_slot string|hash optional slot id to only change a specific slot
841-
function gui.set_spine_skin(node, spine_skin, spine_slot) end
842-
843781
---Set the text value of a text node. This is only useful for text nodes.
844782
---@param node node node to set text for
845783
---@param text string text to set

DefoldDocs/api/io.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
---Documentation for the Lua io standard library.
33
---From Lua 5.1 Reference Manual <https://www.lua.org/manual/5.1/>
44
---by Roberto Ierusalimschy, Luiz Henrique de Figueiredo, Waldemar Celes.
5-
---Copyright © 2006-2012 Lua.org, PUC-Rio.
5+
---Copyright © 2006-2012 Lua.org, PUC-Rio.
66
---Freely available under the terms of the Lua license <https://www.lua.org/license.html>.
77
---@class io
88
io = {}

DefoldDocs/api/luasocket.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
---
1111
---
1212
---
13-
---LuaSocket is Copyright © 2004-2007 Diego Nehab. All rights reserved.
13+
---LuaSocket is Copyright © 2004-2007 Diego Nehab. All rights reserved.
1414
---LuaSocket is free software, released under the MIT license (same license as the Lua core).
1515
---@class socket
1616
socket = {}

DefoldDocs/api/math.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
---Documentation for the Lua math standard library.
33
---From Lua 5.1 Reference Manual <https://www.lua.org/manual/5.1/>
44
---by Roberto Ierusalimschy, Luiz Henrique de Figueiredo, Waldemar Celes.
5-
---Copyright © 2006-2012 Lua.org, PUC-Rio.
5+
---Copyright © 2006-2012 Lua.org, PUC-Rio.
66
---Freely available under the terms of the Lua license <https://www.lua.org/license.html>.
77
---@class math
88
math = {}

DefoldDocs/api/os.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
---Documentation for the Lua os standard library.
33
---From Lua 5.1 Reference Manual <https://www.lua.org/manual/5.1/>
44
---by Roberto Ierusalimschy, Luiz Henrique de Figueiredo, Waldemar Celes.
5-
---Copyright © 2006-2012 Lua.org, PUC-Rio.
5+
---Copyright © 2006-2012 Lua.org, PUC-Rio.
66
---Freely available under the terms of the Lua license <https://www.lua.org/license.html>.
77
---@class os
88
os = {}

DefoldDocs/api/render.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ function render.set_depth_mask(depth) end
292292
---offset for each polygon. The initial value is 0.
293293
---units is multiplied by an implementation-specific value to create a
294294
---constant depth offset. The initial value is 0.
295-
---The value of the offset is computed as factor × DZ + r × units
295+
---The value of the offset is computed as factor ? DZ + r ? units
296296
---DZ is a measurement of the depth slope of the polygon which is the change in z (depth)
297297
---values divided by the change in either x or y coordinates, as you traverse a polygon.
298298
---The depth values are in window coordinates, clamped to the range [0, 1].

DefoldDocs/api/sound.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ function sound.get_peak(group, window) end
4040
---square root of the mean (average) value of the squared function of
4141
---the instantaneous values.
4242
---For instance: for a sinewave signal with a peak gain of -1.94 dB (0.8 linear),
43-
---the RMS is 0.8 × 1/sqrt(2) which is about 0.566.
43+
---the RMS is 0.8 ? 1/sqrt(2) which is about 0.566.
4444
--- Note the returned value might be an approximation and in particular
4545
---the effective window might be larger than specified.
4646
---@param group string|hash group name

DefoldDocs/api/vector_math.lua

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ vmath = {}
3838
function vmath.conj(q1) end
3939

4040
---Given two linearly independent vectors P and Q, the cross product,
41-
---P × Q, is a vector that is perpendicular to both P and Q and
41+
---P ? Q, is a vector that is perpendicular to both P and Q and
4242
---therefore normal to the plane containing them.
4343
---If the two vectors have the same direction (or have the exact
4444
---opposite direction from one another, i.e. are not linearly independent)
@@ -49,8 +49,8 @@ function vmath.conj(q1) end
4949
function vmath.cross(v1, v2) end
5050

5151
---The returned value is a scalar defined as:
52-
---P Q = |P| |Q| cos θ
53-
---where θ is the angle between the vectors P and Q.
52+
---P ? Q = |P| |Q| cos ?
53+
---where ? is the angle between the vectors P and Q.
5454
---
5555
---
5656
--- * If the dot product is positive then the angle between the vectors is below 90 degrees.
@@ -232,8 +232,8 @@ function vmath.ortho_inv(m1) end
232232

233233
---Calculates the extent the projection of the first vector onto the second.
234234
---The returned value is a scalar p defined as:
235-
---p = |P| cos θ / |Q|
236-
---where θ is the angle between the vectors P and Q.
235+
---p = |P| cos ? / |Q|
236+
---where ? is the angle between the vectors P and Q.
237237
---@param v1 vector3 vector to be projected on the second
238238
---@param v2 vector3 vector onto which the first will be projected, must not have zero length
239239
---@return number the projected extent of the first vector onto the second

0 commit comments

Comments
 (0)