![]() |
Pixelpart 1.8.2
Godot Plugin
|
Vector4
property animated with keyframes and affected by effect inputs.
More...
Public Member Functions | |
Vector4 | at (float position) const |
Return the (interpolated) value of the animation property at time position . | |
void | add_keyframe (float position, Vector4 value) |
Add a keyframe at time position with value value . | |
void | remove_keyframe (int index) |
Remove the keyframe with the given index from the animation. | |
void | set_keyframe_value (int index, Vector4 value) |
Change the value of the keyframe with the given index. | |
void | set_keyframe_position (int index, float position) |
Move the time of the keyframe with the given index to position . | |
void | clear_keyframes () |
Remove all keyframes from the animation. | |
bool | contains_keyframes () const |
Return whether the animation property contains any keyframes. | |
int | get_keyframe_count () const |
Return the number of keyframes. | |
Vector4 | get_keyframe_value (int index) const |
Return the value of the keyframe with the given index. | |
int | get_keyframe_index (float position, float epsilon) |
Return the index of the keyframe closest to time position . | |
void | set_keyframe_interpolation (int method) |
Set interpolation applied to the animation curve. | |
int | get_keyframe_interpolation () const |
Return interpolation applied to the animation curve. | |
void | enable_adaptive_cache () |
Enable an adaptive cache, which resizes itself automatically if the number of keyframes increases or decreases a lot. | |
void | enable_fixed_cache (int size) |
Enable a fixed cache with the given size, which only stores up to size different value. | |
Public Attributes | |
int | keyframe_interpolation |
Interpolation applied to the animation curve. | |
Vector4
property animated with keyframes and affected by effect inputs.
Scene objects of an effect like particle emitters and force fields have properties that change over time and are affected by effect inputs. Such properties are represented by one of the PixelpartAnimatedProperty
classes, depending on the type of the property.
void godot::PixelpartAnimatedPropertyFloat4::add_keyframe | ( | float | position, |
Vector4 | value ) |
Add a keyframe at time position
with value value
.
position | Time between 0 and 1 |
value | Value of the property at the given time |
Vector4 godot::PixelpartAnimatedPropertyFloat4::at | ( | float | position | ) | const |
Return the (interpolated) value of the animation property at time position
.
position | Time between 0 and 1 |
bool godot::PixelpartAnimatedPropertyFloat4::contains_keyframes | ( | ) | const |
Return whether the animation property contains any keyframes.
void godot::PixelpartAnimatedPropertyFloat4::enable_fixed_cache | ( | int | size | ) |
Enable a fixed cache with the given size, which only stores up to size
different value.
size | Cache size |
int godot::PixelpartAnimatedPropertyFloat4::get_keyframe_count | ( | ) | const |
Return the number of keyframes.
int godot::PixelpartAnimatedPropertyFloat4::get_keyframe_index | ( | float | position, |
float | epsilon ) |
Return the index of the keyframe closest to time position
.
position | Time between 0 and 1 |
epsilon | Maximum differerence in time to consider to keyframes at the same time |
int godot::PixelpartAnimatedPropertyFloat4::get_keyframe_interpolation | ( | ) | const |
Return interpolation applied to the animation curve.
Vector4 godot::PixelpartAnimatedPropertyFloat4::get_keyframe_value | ( | int | index | ) | const |
Return the value of the keyframe with the given index.
index | Keyframe index |
void godot::PixelpartAnimatedPropertyFloat4::remove_keyframe | ( | int | index | ) |
Remove the keyframe with the given index from the animation.
index | Index to remove |
void godot::PixelpartAnimatedPropertyFloat4::set_keyframe_interpolation | ( | int | method | ) |
Set interpolation applied to the animation curve.
method | Interpolation method |
void godot::PixelpartAnimatedPropertyFloat4::set_keyframe_position | ( | int | index, |
float | position ) |
Move the time of the keyframe with the given index to position
.
index | Keyframe index |
position | New time between 0 and 1 |
void godot::PixelpartAnimatedPropertyFloat4::set_keyframe_value | ( | int | index, |
Vector4 | value ) |
Change the value of the keyframe with the given index.
index | Keyframe index |
value | New value |