summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorMalcolm Nixon <Malcolm.nixon@gmail.com>2024-09-10 23:50:39 -0400
committerMalcolm Nixon <Malcolm.nixon@gmail.com>2024-09-11 01:18:30 -0400
commit3e93970ef5eb5013c4aff2eedf7b14e46f724a87 (patch)
tree49250134ab11ff7cc684af90f59e90b67082239e /doc
parent97ef3c837263099faf02d8ebafd6c77c94d2aaba (diff)
downloadredot-engine-3e93970ef5eb5013c4aff2eedf7b14e46f724a87.tar.gz
Expose the optimize method of the Animation class to gdscript.
Diffstat (limited to 'doc')
-rw-r--r--doc/classes/Animation.xml9
1 files changed, 9 insertions, 0 deletions
diff --git a/doc/classes/Animation.xml b/doc/classes/Animation.xml
index 942299cc7e..887e9cda81 100644
--- a/doc/classes/Animation.xml
+++ b/doc/classes/Animation.xml
@@ -293,6 +293,15 @@
Returns the arguments values to be called on a method track for a given key in a given track.
</description>
</method>
+ <method name="optimize">
+ <return type="void" />
+ <param index="0" name="allowed_velocity_err" type="float" default="0.01" />
+ <param index="1" name="allowed_angular_err" type="float" default="0.01" />
+ <param index="2" name="precision" type="int" default="3" />
+ <description>
+ Optimize the animation and all its tracks in-place. This will preserve only as many keys as are necessary to keep the animation within the specified bounds.
+ </description>
+ </method>
<method name="position_track_insert_key">
<return type="int" />
<param index="0" name="track_idx" type="int" />