summaryrefslogtreecommitdiff
path: root/meta/3rd/Defold/library/model.lua
diff options
context:
space:
mode:
Diffstat (limited to 'meta/3rd/Defold/library/model.lua')
-rw-r--r--meta/3rd/Defold/library/model.lua43
1 files changed, 43 insertions, 0 deletions
diff --git a/meta/3rd/Defold/library/model.lua b/meta/3rd/Defold/library/model.lua
new file mode 100644
index 00000000..0631365e
--- /dev/null
+++ b/meta/3rd/Defold/library/model.lua
@@ -0,0 +1,43 @@
+---Model API documentation
+---Model API documentation
+---@class model
+model = {}
+---Cancels all animation on a model component.
+---@param url string|hash|url # the model for which to cancel the animation
+function model.cancel(url) end
+
+---Gets the id of the game object that corresponds to a model skeleton bone.
+---The returned game object can be used for parenting and transform queries.
+---This function has complexity O(n), where n is the number of bones in the model skeleton.
+---Game objects corresponding to a model skeleton bone can not be individually deleted.
+---@param url string|hash|url # the model to query
+---@param bone_id string|hash # id of the corresponding bone
+---@return hash # id of the game object
+function model.get_go(url, bone_id) end
+
+---Plays an animation on a model component with specified playback
+---mode and parameters.
+---An optional completion callback function can be provided that will be called when
+---the animation has completed playing. If no function is provided,
+---a model_animation_done <> message is sent to the script that started the animation.
+--- The callback is not called (or message sent) if the animation is
+---cancelled with model.cancel <>. The callback is called (or message sent) only for
+---animations that play with the following playback modes:
+---
+---
+--- * go.PLAYBACK_ONCE_FORWARD
+---
+--- * go.PLAYBACK_ONCE_BACKWARD
+---
+--- * go.PLAYBACK_ONCE_PINGPONG
+---@param url string|hash|url # the model for which to play the animation
+---@param anim_id string|hash # id of the animation to play
+---@param playback constant # playback mode of the animation
+---@param play_properties table? # optional table with properties Play properties table:
+---@param complete_function (fun(self: object, message_id: hash, message: table, sender: hash))? # function to call when the animation has completed.
+function model.play_anim(url, anim_id, playback, play_properties, complete_function) end
+
+
+
+
+return model \ No newline at end of file