Skip to content

Commit

Permalink
update to 1.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
d954mas committed Sep 25, 2023
1 parent b069a8f commit 6edf97a
Show file tree
Hide file tree
Showing 52 changed files with 2,693 additions and 1,975 deletions.
Binary file modified .gradle/buildOutputCleanup/buildOutputCleanup.lock
Binary file not shown.
4 changes: 2 additions & 2 deletions .gradle/buildOutputCleanup/cache.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#Tue Apr 03 21:08:31 MSK 2018
gradle.version=4.4
#Mon Sep 25 16:49:14 MSK 2023
gradle.version=4.8
Binary file modified .gradle/buildOutputCleanup/outputFiles.bin
Binary file not shown.
9 changes: 0 additions & 9 deletions .idea/IntelliJ-Defold-Api.iml

This file was deleted.

10 changes: 0 additions & 10 deletions .idea/modules.xml

This file was deleted.

2 changes: 0 additions & 2 deletions .idea/modules/DefoldApi_main.iml

This file was deleted.

2 changes: 0 additions & 2 deletions .idea/modules/DefoldApi_test.iml

This file was deleted.

4 changes: 2 additions & 2 deletions DefoldDocs/api/buffer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ function buffer.get_bytes(buffer, stream_name) end
---Get a named metadata entry from a buffer along with its type.
---@param buf buffer the buffer to get the metadata from
---@param metadata_name hash|string name of the metadata entry
---@return table table of metadata values or nil if the entry does not exist
---@return constant numeric type of values or nil
---@return table|nil table of metadata values or nil if the entry does not exist
---@return constant|nil numeric type of values or nil
function buffer.get_metadata(buf, metadata_name) end

---Get a specified stream from a buffer.
Expand Down
2 changes: 1 addition & 1 deletion DefoldDocs/api/collection_factory.lua
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ function collectionfactory.get_status(url) end
---Resources loaded are referenced by the collection factory component until the existing (parent) collection is destroyed or collectionfactory.unload is called.
---Calling this function when the factory is not marked as dynamic loading does nothing.
---@param url string|hash|url the collection factory component to load
---@param complete_function function(self, url, result)) function to call when resources are loaded.
`---@param complete_function function(self, url, result) function to call when resources are loaded.
function collectionfactory.load(url, complete_function) end

---Changes the prototype for the collection factory.
Expand Down
2 changes: 1 addition & 1 deletion DefoldDocs/api/collision_object.lua
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ function physics.get_maskbit(url, group) end
---@param to vector3 the world position of the end of the ray
---@param groups table a lua table containing the hashed groups for which to test collisions against
---@param options table a lua table containing options for the raycast.
---@return table It returns a list. If missed it returns nil. See ray_cast_response for details on the returned values.
---@return table|nil It returns a list. If missed it returns nil. See ray_cast_response for details on the returned values.
function physics.raycast(from, to, groups, options) end

---Ray casts are used to test for intersections against collision objects in the physics world.
Expand Down
2 changes: 1 addition & 1 deletion DefoldDocs/api/factory.lua
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function factory.get_status(url) end
---Resources are referenced by the factory component until the existing (parent) collection is destroyed or factory.unload is called.
---Calling this function when the factory is not marked as dynamic loading does nothing.
---@param url string|hash|url the factory component to load
---@param complete_function function(self, url, result)) function to call when resources are loaded.
---@param complete_function function(self, url, result) function to call when resources are loaded.
function factory.load(url, complete_function) end

---Changes the prototype for the factory.
Expand Down
6 changes: 3 additions & 3 deletions DefoldDocs/api/game_object.lua
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ function go.get_id(path) end

---Get the parent for a game object instance.
---@param id string|hash|url optional id of the game object instance to get parent for, defaults to the instance containing the calling script
---@return hash parent instance or nil
---@return hash|nil parent instance or nil
function go.get_parent(id) end

---The position is relative the parent (if any). Use go.get_world_position <> to retrieve the global world position.
Expand Down Expand Up @@ -229,7 +229,7 @@ function go.property(name, value) end
---sets a named property of the specified game object or component, or a material constant
---@param url string|hash|url url of the game object or component having the property
---@param property string|hash id of the property to set
---@param value any the value to set
---@param value any|table the value to set
---@param options table optional options table - index integer index into array property (1 based) - key hash name of internal property
function go.set(url, property, value, options) end

Expand Down Expand Up @@ -315,7 +315,7 @@ function init(self) end
---@param self object reference to the script state to be used for storing data
---@param action_id hash id of the received input action, as mapped in the input_binding-file
---@param action table a table containing the input data, see above for a description
---@return boolean optional boolean to signal if the input should be consumed (not passed on to others) or not, default is false
---@return boolean|nil optional boolean to signal if the input should be consumed (not passed on to others) or not, default is false
function on_input(self, action_id, action) end

---This is a callback-function, which is called by the engine whenever a message has been sent to the script component.
Expand Down
34 changes: 26 additions & 8 deletions DefoldDocs/api/gui.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
---GUI API documentation
---GUI API documentation
---GUI core hooks, functions, messages, properties and constants for
---creation and manipulation of GUI nodes. The "gui" namespace is
---accessible only from gui scripts.
---@class gui
gui = {}
---This is a callback-function, which is called by the engine when a gui component is finalized (destroyed). It can
Expand Down Expand Up @@ -303,7 +305,7 @@ function gui.get_flipbook(node) end

---This is only useful nodes with flipbook animations. Gets the normalized cursor of the flipbook animation on a node.
---@param node node node to get the cursor for (node)
---@return value number cursor value
---@return number cursor value
function gui.get_flipbook_cursor(node) end

---This is only useful nodes with flipbook animations. Gets the playback rate of the flipbook animation on a node.
Expand Down Expand Up @@ -367,6 +369,11 @@ function gui.get_leading(node) end
---@return boolean true or false
function gui.get_line_break(node) end

---Returns the material of a node.
---The material must be mapped to the gui scene in the gui editor.
---@param node node node to get the material for
function gui.get_material(node) end

---Retrieves the node with the specified id.
---@param id string|hash id of the node to retrieve
---@return node a new node instance
Expand All @@ -386,7 +393,7 @@ function gui.get_outline(node) end
---Returns the parent node of the specified node.
---If the supplied node does not have a parent, nil is returned.
---@param node node the node from which to retrieve its parent
---@return node parent instance or nil
---@return node|nil parent instance or nil
function gui.get_parent(node) end

---Get the paricle fx for a gui node
Expand Down Expand Up @@ -510,15 +517,15 @@ function gui.is_enabled(node, recursive) end
---above the second.
---If the second argument is nil the first node is moved to the top.
---@param node node to move
---@param node node|nil reference node above which the first node should be moved
function gui.move_above(node, node) end
---@param reference node|nil reference node above which the first node should be moved
function gui.move_above(node, reference) end

---Alters the ordering of the two supplied nodes by moving the first node
---below the second.
---If the second argument is nil the first node is moved to the bottom.
---@param node node to move
---@param node node|nil reference node below which the first node should be moved
function gui.move_below(node, node) end
---@param reference node|nil reference node below which the first node should be moved
function gui.move_below(node, reference) end

---Dynamically create a new box node.
---@param pos vector3|vector4 node position
Expand Down Expand Up @@ -580,6 +587,10 @@ function gui.play_particlefx(node, emitter_state_function) end
---Resets the input context of keyboard. This will clear marked text.
function gui.reset_keyboard() end

---Resets the node material to the material assigned in the gui scene.
---@param node node node to reset the material for
function gui.reset_material(node) end

---Resets all nodes in the current GUI scene to their initial state.
---The reset only applies to static node loaded from the scene.
---Nodes that are created dynamically from script are not affected.
Expand Down Expand Up @@ -701,6 +712,13 @@ function gui.set_leading(node, leading) end
---@param line_break boolean true or false
function gui.set_line_break(node, line_break) end

---Set the material on a node. The material must be mapped to the gui scene in the gui editor,
---and assigning a material is supported for all node types. To set the default material that
---is assigned to the gui scene node, use gui.reset_material(node_id) instead.
---@param node node node to set material for
---@param material string|hash material id
function gui.set_material(node, material) end

---Sets the outer bounds mode for a pie node.
---@param node node node for which to set the outer bounds mode
---@param bounds_mode constant the outer bounds mode of the pie node:
Expand Down Expand Up @@ -903,7 +921,7 @@ function init(self) end
---@param self object reference to the script state to be used for storing data
---@param action_id hash id of the received input action, as mapped in the input_binding-file
---@param action table a table containing the input data, see above for a description
---@return boolean optional boolean to signal if the input should be consumed (not passed on to others) or not, default is false
---@return boolean|nil optional boolean to signal if the input should be consumed (not passed on to others) or not, default is false
function on_input(self, action_id, action) end

---This is a callback-function, which is called by the engine whenever a message has been sent to the gui component.
Expand Down
2 changes: 1 addition & 1 deletion DefoldDocs/api/html5.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function html5.run(code) end
---invoked when a user interacts with the web page by clicking, touching or typing.
---The callback can then call DOM restricted actions like requesting a pointer lock,
---or start playing sounds the first time the callback is invoked.
---@param callback function(self The interaction callback. Pass an empty function or nil if you no longer wish to receive callbacks.
---@param callback function(self)|nil The interaction callback. Pass an empty function or nil if you no longer wish to receive callbacks.
function html5.set_interaction_listener(callback) end


Expand Down
2 changes: 1 addition & 1 deletion DefoldDocs/api/image.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ image.TYPE_RGBA = nil
---Load image (PNG or JPEG) from buffer.
---@param buffer string image data buffer
---@param premult boolean optional flag if alpha should be premultiplied. Defaults to false
---@return table object or nil if loading fails. The object is a table with the following fields:
---@return table|nil object or nil if loading fails. The object is a table with the following fields:
function image.load(buffer, premult) end


Expand Down
48 changes: 48 additions & 0 deletions DefoldDocs/api/liveupdate.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,63 @@
---Functions and constants to access resources.
---@class liveupdate
liveupdate = {}
---LIVEUPDATE_BUNDLED_RESOURCE_MISMATCH
liveupdate.LIVEUPDATE_BUNDLED_RESOURCE_MISMATCH = nil
---LIVEUPDATE_ENGINE_VERSION_MISMATCH
liveupdate.LIVEUPDATE_ENGINE_VERSION_MISMATCH = nil
---LIVEUPDATE_FORMAT_ERROR
liveupdate.LIVEUPDATE_FORMAT_ERROR = nil
---LIVEUPDATE_INVAL
liveupdate.LIVEUPDATE_INVAL = nil
---LIVEUPDATE_INVALID_HEADER
liveupdate.LIVEUPDATE_INVALID_HEADER = nil
---LIVEUPDATE_INVALID_RESOURCE
liveupdate.LIVEUPDATE_INVALID_RESOURCE = nil
---LIVEUPDATE_IO_ERROR
liveupdate.LIVEUPDATE_IO_ERROR = nil
---LIVEUPDATE_MEM_ERROR
liveupdate.LIVEUPDATE_MEM_ERROR = nil
---LIVEUPDATE_OK
liveupdate.LIVEUPDATE_OK = nil
---LIVEUPDATE_SCHEME_MISMATCH
liveupdate.LIVEUPDATE_SCHEME_MISMATCH = nil
---LIVEUPDATE_SIGNATURE_MISMATCH
liveupdate.LIVEUPDATE_SIGNATURE_MISMATCH = nil
---LIVEUPDATE_UNKNOWN
liveupdate.LIVEUPDATE_UNKNOWN = nil
---LIVEUPDATE_VERSION_MISMATCH
liveupdate.LIVEUPDATE_VERSION_MISMATCH = nil
---Adds a resource mount to the resource system.
---The mounts are persisted between sessions.
---After the mount succeeded, the resources are available to load. (i.e. no reboot required)
---@param name string Unique name of the mount
---@param uri string The uri of the mount, including the scheme. Currently supported schemes are 'zip' and 'archive'.
---@param priority integer Priority of mount. Larger priority takes prescedence
---@param callback function Callback after the asynchronous request completed
---@return number The result of the request
function liveupdate.add_mount(name, uri, priority, callback) end

---Return a reference to the Manifest that is currently loaded.
---@return number reference to the Manifest that is currently loaded
function liveupdate.get_current_manifest() end

---Get an array of the current mounts
---This can be used to determine if a new mount is needed or not
---@return array Array of mounts
function liveupdate.get_mounts() end

---Is any liveupdate data mounted and currently in use?
---This can be used to determine if a new manifest or zip file should be downloaded.
---@return bool true if a liveupdate archive (any format) has been loaded
function liveupdate.is_using_liveupdate_data() end

---Remove a mount the resource system.
---The remaining mounts are persisted between sessions.
---Removing a mount does not affect any loaded resources.
---@param name string Unique name of the mount
---@return number The result of the call
function liveupdate.remove_mount(name) end

---Stores a zip file and uses it for live update content. The contents of the
---zip file will be verified against the manifest to ensure file integrity.
---It is possible to opt out of the resource verification using an option passed
Expand Down
Loading

0 comments on commit 6edf97a

Please sign in to comment.