Pixelpart 1.9.0
Unity Plugin
Loading...
Searching...
No Matches
PixelpartAnimatedPropertyFloat2 Class Reference

Vector2 property animated with keyframes and affected by effect inputs. More...

Public Member Functions

 PixelpartAnimatedPropertyFloat2 (IntPtr internalPropertyPtr)
 Construct PixelpartAnimatedPropertyFloat2.
 
Vector2 At (float position)
 Return the (interpolated) value of the animation property at time position .
 
void AddKeyframe (float position, Vector2 value)
 Add a keyframe at time position with value value .
 
void RemoveKeyframe (int index)
 Remove the keyframe with the given index from the animation.
 
void SetKeyframeValue (int index, Vector2 value)
 Change the value of the keyframe with the given index.
 
void SetKeyframePosition (int index, float position)
 Move the time of the keyframe with the given index to position .
 
void ClearKeyframes ()
 Remove all keyframes from the animation.
 
Vector2 GetKeyframeValue (int index)
 Return the value of the keyframe with the given index.
 
int GetKeyframeIndex (float position, float epsilon)
 Return the index of the keyframe closest to time position .
 

Properties

PixelpartInterpolationType KeyframeInterpolation [get, set]
 Interpolation applied to the animation curve.
 
int KeyframeCount [get]
 Number of keyframes.
 

Detailed Description

Vector2 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.

Constructor & Destructor Documentation

◆ PixelpartAnimatedPropertyFloat2()

PixelpartAnimatedPropertyFloat2 ( IntPtr internalPropertyPtr)

Construct PixelpartAnimatedPropertyFloat2.

Parameters
internalPropertyPtrInternal property pointer

Member Function Documentation

◆ AddKeyframe()

void AddKeyframe ( float position,
Vector2 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()

Vector2 At ( float position)

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

Parameters
positionTime between 0 and 1
Returns
Value of the property

◆ GetKeyframeIndex()

int GetKeyframeIndex ( 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

◆ GetKeyframeValue()

Vector2 GetKeyframeValue ( int index)

Return the value of the keyframe with the given index.

Parameters
indexKeyframe index
Returns
Keyframe value

◆ RemoveKeyframe()

void RemoveKeyframe ( int index)

Remove the keyframe with the given index from the animation.

Parameters
indexIndex to remove

◆ SetKeyframePosition()

void SetKeyframePosition ( 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

◆ SetKeyframeValue()

void SetKeyframeValue ( int index,
Vector2 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 file: