Skip to content

Commit b5bab58

Browse files
committed
update to 1.3.3
1 parent 64606ed commit b5bab58

24 files changed

Lines changed: 1206 additions & 779 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/game_object.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,10 @@ go.PLAYBACK_ONCE_PINGPONG = nil
124124
---@param complete_function function(self, url, property) optional function to call when the animation has completed
125125
function go.animate(url, property, playback, to, easing, duration, delay, complete_function) end
126126

127-
---By calling this function, all stored animations of the given property will be canceled.
127+
---By calling this function, all or specified stored property animations of the game object or component will be canceled.
128128
---See the properties guide <> for which properties can be animated and the animation guide <> for how to animate them.
129-
---@param url string|hash|url url of the game object or component having the property
130-
---@param property string|hash id of the property to cancel
129+
---@param url string|hash|url url of the game object or component
130+
---@param property string|hash optional id of the property to cancel
131131
function go.cancel_animations(url, property) end
132132

133133
---Delete one or more game objects identified by id. Deletion is asynchronous meaning that

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: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---Rendering API documentation
22
---Rendering functions, messages and constants. The "render" namespace is
33
---accessible only from render scripts.
4-
---The rendering API is built on top of OpenGL ES 2.0, is a subset of the
4+
---The rendering API was originally built on top of OpenGL ES 2.0, and it uses a subset of the
55
---OpenGL computer graphics rendering API for rendering 2D and 3D computer
6-
---graphics. OpenGL ES 2.0 is supported on all our target platforms.
6+
---graphics. Our current target is OpenGLES 3.0 with fallbacks to 2.0 on some platforms.
77
--- It is possible to create materials and write shaders that
88
---require features not in OpenGL ES 2.0, but those will not work cross platform.
99
---@class render
@@ -41,12 +41,24 @@ render.FILTER_LINEAR = nil
4141
render.FILTER_NEAREST = nil
4242
render.FORMAT_DEPTH = nil
4343
render.FORMAT_LUMINANCE = nil
44+
---May be nil if the format isn't supported
45+
render.FORMAT_R16F = nil
46+
---May be nil if the format isn't supported
47+
render.FORMAT_R32F = nil
48+
---May be nil if the format isn't supported
49+
render.FORMAT_RG16F = nil
50+
---May be nil if the format isn't supported
51+
render.FORMAT_RG32F = nil
4452
render.FORMAT_RGB = nil
53+
---May be nil if the format isn't supported
54+
render.FORMAT_RGB16F = nil
55+
---May be nil if the format isn't supported
56+
render.FORMAT_RGB32F = nil
4557
render.FORMAT_RGBA = nil
46-
render.FORMAT_RGBA_DXT1 = nil
47-
render.FORMAT_RGBA_DXT3 = nil
48-
render.FORMAT_RGBA_DXT5 = nil
49-
render.FORMAT_RGB_DXT1 = nil
58+
---May be nil if the format isn't supported
59+
render.FORMAT_RGBA16F = nil
60+
---May be nil if the format isn't supported
61+
render.FORMAT_RGBA32F = nil
5062
render.FORMAT_STENCIL = nil
5163
render.RENDER_TARGET_DEFAULT = nil
5264
render.STATE_BLEND = nil
@@ -96,11 +108,12 @@ function render.disable_texture(unit) end
96108
---system constants buffer is used containing constants as defined in materials and set through
97109
---go.set <> (or particlefx.set_constant <>) on visual components.
98110
---@param predicate predicate predicate to draw for
99-
---@param constants constant_buffer optional constants to use while rendering
100-
function render.draw(predicate, constants) end
111+
---@param options table optional table with properties:
112+
function render.draw(predicate, options) end
101113

102114
---Draws all 3d debug graphics such as lines drawn with "draw_line" messages and physics visualization.
103-
function render.draw_debug3d() end
115+
---@param options table optional table with properties:
116+
function render.draw_debug3d(options) end
104117

105118
---If another material was already enabled, it will be automatically disabled
106119
---and the specified material is used instead.
@@ -173,7 +186,7 @@ function render.predicate(tags) end
173186
---of parameters. The following parameter keys are available:
174187
---
175188
---Key Values
176-
---format render.FORMAT_LUMINANCErender.FORMAT_RGBrender.FORMAT_RGBA render.FORMAT_RGB_DXT1render.FORMAT_RGBA_DXT1render.FORMAT_RGBA_DXT3 render.FORMAT_RGBA_DXT5render.FORMAT_DEPTHrender.FORMAT_STENCIL
189+
---format render.FORMAT_LUMINANCErender.FORMAT_RGBrender.FORMAT_RGBArender.FORMAT_DEPTHrender.FORMAT_STENCILrender.FORMAT_RGBA32Frender.FORMAT_RGBA16F
177190
---width number
178191
---height number
179192
---min_filter render.FILTER_LINEARrender.FILTER_NEAREST
@@ -292,7 +305,7 @@ function render.set_depth_mask(depth) end
292305
---offset for each polygon. The initial value is 0.
293306
---units is multiplied by an implementation-specific value to create a
294307
---constant depth offset. The initial value is 0.
295-
---The value of the offset is computed as factor ? DZ + r ? units
308+
---The value of the offset is computed as factor × DZ + r × units
296309
---DZ is a measurement of the depth slope of the polygon which is the change in z (depth)
297310
---values divided by the change in either x or y coordinates, as you traverse a polygon.
298311
---The depth values are in window coordinates, clamped to the range [0, 1].

DefoldDocs/api/resource.lua

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,11 +121,15 @@ function resource.set_sound(path, buffer) end
121121
---@param buffer buffer The buffer of precreated pixel data Currently, only 1 mipmap is generated.
122122
function resource.set_texture(path, table, buffer) end
123123

124-
---Stores a zip file and uses it for live update content.
125-
---The path is renamed and stored in the (internal) live update location
124+
---Stores a zip file and uses it for live update content. The contents of the
125+
---zip file will be verified against the manifest to ensure file integrity.
126+
---It is possible to opt out of the resource verification using an option passed
127+
---to this function.
128+
---The path is stored in the (internal) live update location.
126129
---@param path string the path to the original file on disc
127130
---@param callback function(self, status) the callback function executed after the storage has completed
128-
function resource.store_archive(path, callback) end
131+
---@param options table optional table with extra parameters. Supported entries:
132+
function resource.store_archive(path, callback, options) end
129133

130134
---Create a new manifest from a buffer. The created manifest is verified
131135
---by ensuring that the manifest was signed using the bundled public/private

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)