|
@@ -7025,36 +7025,6 @@ return {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- {
|
|
|
|
- name = "newAnimator",
|
|
|
|
- tag = "graphicsObjects",
|
|
|
|
- summary = "Create a new Animator.",
|
|
|
|
- description = "Creates a new `Animator` by reading animations from a `Model`.",
|
|
|
|
- key = "lovr.graphics.newAnimator",
|
|
|
|
- module = "lovr.graphics",
|
|
|
|
- variants = {
|
|
|
|
- {
|
|
|
|
- arguments = {
|
|
|
|
- {
|
|
|
|
- name = "model",
|
|
|
|
- type = "Model",
|
|
|
|
- description = "The model to read animations from."
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- returns = {
|
|
|
|
- {
|
|
|
|
- name = "animator",
|
|
|
|
- type = "Animator",
|
|
|
|
- description = "The new Animator."
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- related = {
|
|
|
|
- "Model:setAnimator"
|
|
|
|
- },
|
|
|
|
- notes = "You can attach an animator to a Model with `Model:setAnimator`."
|
|
|
|
- },
|
|
|
|
{
|
|
{
|
|
name = "newCanvas",
|
|
name = "newCanvas",
|
|
tag = "graphicsObjects",
|
|
tag = "graphicsObjects",
|
|
@@ -9405,569 +9375,6 @@ return {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
objects = {
|
|
objects = {
|
|
- {
|
|
|
|
- name = "Animator",
|
|
|
|
- summary = "An object that plays and mixes animations.",
|
|
|
|
- description = "An animator is an object that controls the playback of skeletal animations. Animators can be attached to models using `Model:setAnimator`. Once attached, the Model will render using the animator's pose instead of the default pose. Don't forget to update the animator in `lovr.update` using `Animator:update`!",
|
|
|
|
- key = "Animator",
|
|
|
|
- module = "lovr.graphics",
|
|
|
|
- examples = {
|
|
|
|
- {
|
|
|
|
- code = "function lovr.load()\n model = lovr.graphics.newModel('model.gltf')\n animator = lovr.graphics.newAnimator(model)\n animator:play(animator:getAnimationNames()[1])\n model:setAnimator(animator)\n\n shader = lovr.graphics.newShader([[\n vec4 vertex(mat4 projection, mat4 transform, vec4 vertex) {\n return projection * transform * lovrPoseMatrix * vertex;\n }\n ]], nil)\nend\n\nfunction lovr.update(dt)\n animator:update(dt)\nend\n\nfunction lovr.draw()\n lovr.graphics.setShader(shader)\n model:draw()\nend"
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- constructors = {
|
|
|
|
- "lovr.graphics.newAnimator"
|
|
|
|
- },
|
|
|
|
- methods = {
|
|
|
|
- {
|
|
|
|
- name = "getAlpha",
|
|
|
|
- summary = "Get the alpha (weight) of an animation.",
|
|
|
|
- description = "Returns the current alpha factor of an animation.",
|
|
|
|
- key = "Animator:getAlpha",
|
|
|
|
- module = "lovr.graphics",
|
|
|
|
- related = {
|
|
|
|
- "Animator:getPriority",
|
|
|
|
- "Animator:setPriority"
|
|
|
|
- },
|
|
|
|
- variants = {
|
|
|
|
- {
|
|
|
|
- arguments = {
|
|
|
|
- {
|
|
|
|
- name = "name",
|
|
|
|
- type = "string",
|
|
|
|
- description = "The name of the animation."
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- returns = {
|
|
|
|
- {
|
|
|
|
- name = "alpha",
|
|
|
|
- type = "number",
|
|
|
|
- description = "The alpha of the animation."
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- notes = "The alpha is a number between 0 and 1 indicating how the animation's pose is blended with other animations. An alpha of 1 means the animation's pose will completely overwrite the existing pose, whereas an alpha of .5 would blend half of the animation's pose with half of the existing pose. This, combined with the animation's priority, allows for fine grained control over how multiple playing animations get blended together."
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- name = "getAnimationCount",
|
|
|
|
- summary = "Get the number of animations the Animator can play.",
|
|
|
|
- description = "Returns the number of animations the Animator can play.",
|
|
|
|
- key = "Animator:getAnimationCount",
|
|
|
|
- module = "lovr.graphics",
|
|
|
|
- related = {
|
|
|
|
- "Animator:getAnimationNames"
|
|
|
|
- },
|
|
|
|
- variants = {
|
|
|
|
- {
|
|
|
|
- arguments = {},
|
|
|
|
- returns = {
|
|
|
|
- {
|
|
|
|
- name = "count",
|
|
|
|
- type = "number",
|
|
|
|
- description = "The number of animations."
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- name = "getAnimationNames",
|
|
|
|
- summary = "Get a table containing all animation names.",
|
|
|
|
- description = "Returns a table containing the names of all animations supported by this Animator.",
|
|
|
|
- key = "Animator:getAnimationNames",
|
|
|
|
- module = "lovr.graphics",
|
|
|
|
- related = {
|
|
|
|
- "Animator:getAnimationCount"
|
|
|
|
- },
|
|
|
|
- variants = {
|
|
|
|
- {
|
|
|
|
- arguments = {},
|
|
|
|
- returns = {
|
|
|
|
- {
|
|
|
|
- name = "names",
|
|
|
|
- type = "table",
|
|
|
|
- description = "The list of animation names as strings."
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- arguments = {
|
|
|
|
- {
|
|
|
|
- name = "t",
|
|
|
|
- type = "table",
|
|
|
|
- description = "A table to fill with the animation names."
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- returns = {}
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- name = "getDuration",
|
|
|
|
- summary = "Get the duration of an animation.",
|
|
|
|
- description = "Returns the duration of an animation.",
|
|
|
|
- key = "Animator:getDuration",
|
|
|
|
- module = "lovr.graphics",
|
|
|
|
- related = {
|
|
|
|
- "Animator:seek",
|
|
|
|
- "Animator:tell"
|
|
|
|
- },
|
|
|
|
- variants = {
|
|
|
|
- {
|
|
|
|
- arguments = {
|
|
|
|
- {
|
|
|
|
- name = "name",
|
|
|
|
- type = "string",
|
|
|
|
- description = "The name of the animation."
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- returns = {
|
|
|
|
- {
|
|
|
|
- name = "duration",
|
|
|
|
- type = "number",
|
|
|
|
- description = "The duration of the animation at its normal speed, in seconds."
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- name = "getPriority",
|
|
|
|
- summary = "Get the priority of an animation, used for mixing.",
|
|
|
|
- description = "Returns the priority of an animation.",
|
|
|
|
- key = "Animator:getPriority",
|
|
|
|
- module = "lovr.graphics",
|
|
|
|
- related = {
|
|
|
|
- "Animator:getAlpha",
|
|
|
|
- "Animator:setAlpha"
|
|
|
|
- },
|
|
|
|
- variants = {
|
|
|
|
- {
|
|
|
|
- arguments = {
|
|
|
|
- {
|
|
|
|
- name = "name",
|
|
|
|
- type = "string",
|
|
|
|
- description = "The name of the animation."
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- returns = {
|
|
|
|
- {
|
|
|
|
- name = "priority",
|
|
|
|
- type = "number",
|
|
|
|
- description = "The priority of the animation."
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- notes = "The priority controls the order that multiple playing animations get blended together. Animations with a lower priority will get applied first, and animations with higher priority will get layered on top afterwards. If two or more animations have the same priority, they could get applied in any order. All animations start with a priority of 1.\n\nYou can use priority and alpha to control how different animations blend together. For instance, if you have a character with \"throw\" and \"walk\" animations and both of them key the bones in the arm, you could have the character walk and throw at the same time by giving the \"throw\" animation a higher priority and playing it over the walk animation."
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- name = "getSpeed",
|
|
|
|
- summary = "Get the speed of an animation.",
|
|
|
|
- description = "Returns the speed factor for an animation or the Animator's global speed factor.",
|
|
|
|
- key = "Animator:getSpeed",
|
|
|
|
- module = "lovr.graphics",
|
|
|
|
- variants = {
|
|
|
|
- {
|
|
|
|
- description = "Get the speed of a specific animation.",
|
|
|
|
- arguments = {
|
|
|
|
- {
|
|
|
|
- name = "name",
|
|
|
|
- type = "string",
|
|
|
|
- description = "The name of the animation."
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- returns = {
|
|
|
|
- {
|
|
|
|
- name = "speed",
|
|
|
|
- type = "number",
|
|
|
|
- description = "The current speed multiplier."
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- description = "Get the global speed multiplier for the Animator.",
|
|
|
|
- arguments = {},
|
|
|
|
- returns = {
|
|
|
|
- {
|
|
|
|
- name = "speed",
|
|
|
|
- type = "number",
|
|
|
|
- description = "The current speed multiplier."
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- name = "isLooping",
|
|
|
|
- summary = "Check if an animation is looping.",
|
|
|
|
- description = "Returns whether an animation is looping.",
|
|
|
|
- key = "Animator:isLooping",
|
|
|
|
- module = "lovr.graphics",
|
|
|
|
- variants = {
|
|
|
|
- {
|
|
|
|
- arguments = {
|
|
|
|
- {
|
|
|
|
- name = "animation",
|
|
|
|
- type = "string",
|
|
|
|
- description = "The name of the animation."
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- returns = {
|
|
|
|
- {
|
|
|
|
- name = "looping",
|
|
|
|
- type = "boolean",
|
|
|
|
- description = "Whether or not the animation is looping."
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- name = "isPlaying",
|
|
|
|
- summary = "Check if an animation is playing.",
|
|
|
|
- description = "Returns whether an animation is currently playing.",
|
|
|
|
- key = "Animator:isPlaying",
|
|
|
|
- module = "lovr.graphics",
|
|
|
|
- variants = {
|
|
|
|
- {
|
|
|
|
- arguments = {
|
|
|
|
- {
|
|
|
|
- name = "animation",
|
|
|
|
- type = "string",
|
|
|
|
- description = "The name of the animation."
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- returns = {
|
|
|
|
- {
|
|
|
|
- name = "playing",
|
|
|
|
- type = "boolean",
|
|
|
|
- description = "Whether or not the animation is playing."
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- name = "pause",
|
|
|
|
- summary = "Pause an animation.",
|
|
|
|
- description = "Pauses an animation. This will stop the animation without resetting its time.",
|
|
|
|
- key = "Animator:pause",
|
|
|
|
- module = "lovr.graphics",
|
|
|
|
- related = {
|
|
|
|
- "Animator:play",
|
|
|
|
- "Animator:stop",
|
|
|
|
- "Animator:resume",
|
|
|
|
- "Animator:isPlaying",
|
|
|
|
- "Animator:getAnimationNames"
|
|
|
|
- },
|
|
|
|
- variants = {
|
|
|
|
- {
|
|
|
|
- arguments = {
|
|
|
|
- {
|
|
|
|
- name = "name",
|
|
|
|
- type = "string",
|
|
|
|
- description = "The animation to pause."
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- returns = {}
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- name = "play",
|
|
|
|
- summary = "Start playing an animation.",
|
|
|
|
- description = "Plays an animation. If the animation is already playing, it will start over at the beginning.",
|
|
|
|
- key = "Animator:play",
|
|
|
|
- module = "lovr.graphics",
|
|
|
|
- related = {
|
|
|
|
- "Animator:stop",
|
|
|
|
- "Animator:pause",
|
|
|
|
- "Animator:resume",
|
|
|
|
- "Animator:isPlaying",
|
|
|
|
- "Animator:getAnimationNames"
|
|
|
|
- },
|
|
|
|
- variants = {
|
|
|
|
- {
|
|
|
|
- arguments = {
|
|
|
|
- {
|
|
|
|
- name = "name",
|
|
|
|
- type = "string",
|
|
|
|
- description = "The name of the animation to play."
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- returns = {}
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- name = "reset",
|
|
|
|
- summary = "Stop all animations.",
|
|
|
|
- description = "Resets the Animator to its initial state. All animations will be stopped, their speed will be reset to `1.0`, their looping state will be reset, and the Animator's global speed will be reset to `1.0`.",
|
|
|
|
- key = "Animator:reset",
|
|
|
|
- module = "lovr.graphics",
|
|
|
|
- related = {},
|
|
|
|
- variants = {
|
|
|
|
- {
|
|
|
|
- arguments = {},
|
|
|
|
- returns = {}
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- name = "resume",
|
|
|
|
- summary = "Resume a paused animation.",
|
|
|
|
- description = "Resumes an animation. This will play an animation without starting it over at the beginning.",
|
|
|
|
- key = "Animator:resume",
|
|
|
|
- module = "lovr.graphics",
|
|
|
|
- related = {
|
|
|
|
- "Animator:pause",
|
|
|
|
- "Animator:play",
|
|
|
|
- "Animator:stop",
|
|
|
|
- "Animator:isPlaying",
|
|
|
|
- "Animator:getAnimationNames"
|
|
|
|
- },
|
|
|
|
- variants = {
|
|
|
|
- {
|
|
|
|
- arguments = {
|
|
|
|
- {
|
|
|
|
- name = "name",
|
|
|
|
- type = "string",
|
|
|
|
- description = "The animation to resume."
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- returns = {}
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- name = "seek",
|
|
|
|
- summary = "Seek to a specific time in an animation.",
|
|
|
|
- description = "Seeks to a specific time in an animation.",
|
|
|
|
- key = "Animator:seek",
|
|
|
|
- module = "lovr.graphics",
|
|
|
|
- related = {
|
|
|
|
- "Animator:tell",
|
|
|
|
- "Animator:getDuration"
|
|
|
|
- },
|
|
|
|
- variants = {
|
|
|
|
- {
|
|
|
|
- arguments = {
|
|
|
|
- {
|
|
|
|
- name = "name",
|
|
|
|
- type = "string",
|
|
|
|
- description = "The name of the animation to seek."
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- name = "time",
|
|
|
|
- type = "number",
|
|
|
|
- description = "The time to seek to, in seconds."
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- returns = {}
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- notes = "If the time is greater than the duration of the animation, the animation will stop if it isn't currently looping. Negative time values are supported for animations (regardless of looping state) and will seek backwards from the animation's end time.\n\nSeeking an animation does not stop or play the animation."
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- name = "setAlpha",
|
|
|
|
- summary = "Set the alpha (weight) of an animation.",
|
|
|
|
- description = "Sets the current alpha factor of an animation.",
|
|
|
|
- key = "Animator:setAlpha",
|
|
|
|
- module = "lovr.graphics",
|
|
|
|
- related = {
|
|
|
|
- "Animator:getPriority",
|
|
|
|
- "Animator:setPriority"
|
|
|
|
- },
|
|
|
|
- variants = {
|
|
|
|
- {
|
|
|
|
- arguments = {
|
|
|
|
- {
|
|
|
|
- name = "name",
|
|
|
|
- type = "string",
|
|
|
|
- description = "The name of the animation."
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- name = "alpha",
|
|
|
|
- type = "number",
|
|
|
|
- description = "The alpha of the animation."
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- returns = {}
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- notes = "The alpha is a number between 0 and 1 indicating how the animation's pose is blended with other animations. An alpha of 1 means the animation's pose will completely overwrite the existing pose, whereas an alpha of .5 would blend half of the animation's pose with half of the existing pose. This, combined with the animation's priority, allows for fine grained control over how multiple playing animations get blended together."
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- name = "setLooping",
|
|
|
|
- summary = "Set whether an animation should loop.",
|
|
|
|
- description = "Sets whether an animation loops.",
|
|
|
|
- key = "Animator:setLooping",
|
|
|
|
- module = "lovr.graphics",
|
|
|
|
- variants = {
|
|
|
|
- {
|
|
|
|
- arguments = {
|
|
|
|
- {
|
|
|
|
- name = "animation",
|
|
|
|
- type = "string",
|
|
|
|
- description = "The name of the animation."
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- name = "loop",
|
|
|
|
- type = "boolean",
|
|
|
|
- description = "Whether the animation should loop."
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- returns = {}
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- name = "setPriority",
|
|
|
|
- summary = "Set the priority of an animation, used for mixing.",
|
|
|
|
- description = "Sets the priority of an animation.",
|
|
|
|
- key = "Animator:setPriority",
|
|
|
|
- module = "lovr.graphics",
|
|
|
|
- related = {
|
|
|
|
- "Animator:getAlpha",
|
|
|
|
- "Animator:setAlpha"
|
|
|
|
- },
|
|
|
|
- variants = {
|
|
|
|
- {
|
|
|
|
- arguments = {
|
|
|
|
- {
|
|
|
|
- name = "name",
|
|
|
|
- type = "string",
|
|
|
|
- description = "The name of the animation."
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- name = "priority",
|
|
|
|
- type = "number",
|
|
|
|
- description = "The new priority for the animation."
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- returns = {}
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- notes = "The priority controls the order that multiple playing animations get blended together. Animations with a lower priority will get applied first, and animations with higher priority will get layered on top afterwards. If two or more animations have the same priority, they could get applied in any order. All animations start with a priority of 1.\n\nYou can use priority and alpha to control how different animations blend together. For instance, if you have a character with \"throw\" and \"walk\" animations and both of them key the bones in the arm, you could have the character walk and throw at the same time by giving the \"throw\" animation a higher priority and playing it over the walk animation."
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- name = "setSpeed",
|
|
|
|
- summary = "Set the speed of an animation.",
|
|
|
|
- description = "Sets the speed factor for an animation or the Animator's global speed factor.",
|
|
|
|
- key = "Animator:setSpeed",
|
|
|
|
- module = "lovr.graphics",
|
|
|
|
- variants = {
|
|
|
|
- {
|
|
|
|
- description = "Set the speed of a specific animation.",
|
|
|
|
- arguments = {
|
|
|
|
- {
|
|
|
|
- name = "name",
|
|
|
|
- type = "string",
|
|
|
|
- description = "The name of the animation."
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- name = "speed",
|
|
|
|
- type = "number",
|
|
|
|
- description = "The new speed multiplier."
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- returns = {}
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- description = "Set the global speed multiplier for the Animator.",
|
|
|
|
- arguments = {
|
|
|
|
- {
|
|
|
|
- name = "speed",
|
|
|
|
- type = "number",
|
|
|
|
- description = "The new speed multiplier."
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- returns = {}
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- name = "stop",
|
|
|
|
- summary = "Stop an animation.",
|
|
|
|
- description = "Stops an animation.",
|
|
|
|
- key = "Animator:stop",
|
|
|
|
- module = "lovr.graphics",
|
|
|
|
- related = {
|
|
|
|
- "Animator:play",
|
|
|
|
- "Animator:reset",
|
|
|
|
- "Animator:pause",
|
|
|
|
- "Animator:resume",
|
|
|
|
- "Animator:isPlaying",
|
|
|
|
- "Animator:getAnimationNames"
|
|
|
|
- },
|
|
|
|
- variants = {
|
|
|
|
- {
|
|
|
|
- arguments = {
|
|
|
|
- {
|
|
|
|
- name = "name",
|
|
|
|
- type = "string",
|
|
|
|
- description = "The animation to stop."
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- returns = {}
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- name = "tell",
|
|
|
|
- summary = "Get the current time of an animation.",
|
|
|
|
- description = "Returns the current playback time of an animation.",
|
|
|
|
- key = "Animator:tell",
|
|
|
|
- module = "lovr.graphics",
|
|
|
|
- related = {
|
|
|
|
- "Animator:seek",
|
|
|
|
- "Animator:getDuration"
|
|
|
|
- },
|
|
|
|
- variants = {
|
|
|
|
- {
|
|
|
|
- arguments = {
|
|
|
|
- {
|
|
|
|
- name = "name",
|
|
|
|
- type = "string",
|
|
|
|
- description = "The name of the animation."
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- returns = {
|
|
|
|
- {
|
|
|
|
- name = "time",
|
|
|
|
- type = "number",
|
|
|
|
- description = "The current time the animation is at, in seconds."
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- notes = "This will always be between 0 and the animation's duration."
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- name = "update",
|
|
|
|
- summary = "Advance the Animator's clock.",
|
|
|
|
- description = "Updates the Animator's clock, advancing all playing animations by the time step.",
|
|
|
|
- key = "Animator:update",
|
|
|
|
- module = "lovr.graphics",
|
|
|
|
- variants = {
|
|
|
|
- {
|
|
|
|
- arguments = {
|
|
|
|
- {
|
|
|
|
- name = "dt",
|
|
|
|
- type = "number",
|
|
|
|
- description = "The amount of time to advance."
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- returns = {}
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- notes = "Animations require that you multiply vertices by a special pose matrix in your vertex shader:\n\n vec4 vertex(mat4 projection, mat4 transform, vec4 vertex) {\n return projection * transform * lovrPoseMatrix * vertex;\n }"
|
|
|
|
- },
|
|
|
|
{
|
|
{
|
|
name = "Canvas",
|
|
name = "Canvas",
|
|
summary = "An offscreen render target.",
|
|
summary = "An offscreen render target.",
|
|
@@ -11688,29 +11095,6 @@ return {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- },
|
|
|
|
- notes = "Note that currently this function returns the bounding box for the default animation pose, so it won't update based on the current Animator pose."
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- name = "getAnimator",
|
|
|
|
- summary = "Get the Animator attached to the Model.",
|
|
|
|
- description = "Returns the `Animator` attached to the Model. When attached, the animator will alter the pose of the bones of the model based on the set of playing animations.",
|
|
|
|
- key = "Model:getAnimator",
|
|
|
|
- module = "lovr.graphics",
|
|
|
|
- related = {
|
|
|
|
- "lovr.graphics.newAnimator"
|
|
|
|
- },
|
|
|
|
- variants = {
|
|
|
|
- {
|
|
|
|
- arguments = {},
|
|
|
|
- returns = {
|
|
|
|
- {
|
|
|
|
- name = "animator",
|
|
|
|
- type = "Animator",
|
|
|
|
- description = "The Animator attached to the Model, or `nil` if none is set."
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
}
|
|
}
|
|
},
|
|
},
|
|
{
|
|
{
|
|
@@ -11732,28 +11116,6 @@ return {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- {
|
|
|
|
- name = "setAnimator",
|
|
|
|
- summary = "Attach an Animator to the Model.",
|
|
|
|
- description = "Attaches an `Animator` to the Model. When attached, the animator will alter the pose of the bones of the model based on the set of playing animations.",
|
|
|
|
- key = "Model:setAnimator",
|
|
|
|
- module = "lovr.graphics",
|
|
|
|
- related = {
|
|
|
|
- "lovr.graphics.newAnimator"
|
|
|
|
- },
|
|
|
|
- variants = {
|
|
|
|
- {
|
|
|
|
- arguments = {
|
|
|
|
- {
|
|
|
|
- name = "animator",
|
|
|
|
- type = "Animator",
|
|
|
|
- description = "The Animator to attach."
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- returns = {}
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
{
|
|
{
|
|
name = "setMaterial",
|
|
name = "setMaterial",
|
|
summary = "Apply a Material to the Model.",
|
|
summary = "Apply a Material to the Model.",
|
|
@@ -12784,8 +12146,7 @@ return {
|
|
related = {
|
|
related = {
|
|
"lovr.headset.getBonePose",
|
|
"lovr.headset.getBonePose",
|
|
"DeviceButton",
|
|
"DeviceButton",
|
|
- "DeviceAxis",
|
|
|
|
- "Animator"
|
|
|
|
|
|
+ "DeviceAxis"
|
|
}
|
|
}
|
|
},
|
|
},
|
|
{
|
|
{
|