Api > AnimationCurve > AddKey()
AnimationCurve.AddKey(Keyframe key)⚓︎
Add a new key to the curve.
Parameters:⚓︎
Name | Type | Description |
---|---|---|
key | Keyframe | The key to add to the curve. |
Returns:⚓︎
type | Description |
---|---|
number | The index of the added key, or -1 if the key could not be added. |
Usage⚓︎
---@type AnimationCurve
local animationcurve;
---@type Keyframe
local key;
local val0 = animationcurve.AddKey(key)
Usage⚓︎
---@type AnimationCurve
local animationcurve;
---@type number
local time;
---@type number
local value;
local val0 = animationcurve.AddKey(time, value)