Pixelpart 1.8.2
Godot Plugin
Loading...
Searching...
No Matches
godot::PixelpartAnimatedPropertyFloat4 Class Reference

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.
 

Detailed Description

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.

Member Function Documentation

◆ add_keyframe()

void godot::PixelpartAnimatedPropertyFloat4::add_keyframe ( float position,
Vector4 value )

Add a keyframe at time position with value value.

Parameters
positionTime between 0 and 1
valueValue of the property at the given time

◆ at()

Vector4 godot::PixelpartAnimatedPropertyFloat4::at ( float position) const

Return the (interpolated) value of the animation property at time position.

Parameters
positionTime between 0 and 1
Returns
Value of the property

◆ contains_keyframes()

bool godot::PixelpartAnimatedPropertyFloat4::contains_keyframes ( ) const

Return whether the animation property contains any keyframes.

Returns
Whether the animation property contains any keyframes

◆ enable_fixed_cache()

void godot::PixelpartAnimatedPropertyFloat4::enable_fixed_cache ( int size)

Enable a fixed cache with the given size, which only stores up to size different value.

Parameters
sizeCache size

◆ get_keyframe_count()

int godot::PixelpartAnimatedPropertyFloat4::get_keyframe_count ( ) const

Return the number of keyframes.

Returns
Number of keyframes

◆ get_keyframe_index()

int godot::PixelpartAnimatedPropertyFloat4::get_keyframe_index ( float position,
float epsilon )

Return the index of the keyframe closest to time position.

Parameters
positionTime between 0 and 1
epsilonMaximum differerence in time to consider to keyframes at the same time
Returns
Keyframe index

◆ get_keyframe_interpolation()

int godot::PixelpartAnimatedPropertyFloat4::get_keyframe_interpolation ( ) const

Return interpolation applied to the animation curve.

Returns
Interpolation method

◆ get_keyframe_value()

Vector4 godot::PixelpartAnimatedPropertyFloat4::get_keyframe_value ( int index) const

Return the value of the keyframe with the given index.

Parameters
indexKeyframe index
Returns
Keyframe value

◆ remove_keyframe()

void godot::PixelpartAnimatedPropertyFloat4::remove_keyframe ( int index)

Remove the keyframe with the given index from the animation.

Parameters
indexIndex to remove

◆ set_keyframe_interpolation()

void godot::PixelpartAnimatedPropertyFloat4::set_keyframe_interpolation ( int method)

Set interpolation applied to the animation curve.

Parameters
methodInterpolation method

◆ set_keyframe_position()

void godot::PixelpartAnimatedPropertyFloat4::set_keyframe_position ( int index,
float position )

Move the time of the keyframe with the given index to position.

Parameters
indexKeyframe index
positionNew time between 0 and 1

◆ set_keyframe_value()

void godot::PixelpartAnimatedPropertyFloat4::set_keyframe_value ( int index,
Vector4 value )

Change the value of the keyframe with the given index.

Parameters
indexKeyframe index
valueNew value

The documentation for this class was generated from the following files: