TransformPositionAnimation
extends BaseAnimation
in package
Animation that translates an object with a given position modifier
Table of Contents
Properties
- $currentDelayTick : int
- $currentTick : int
- $duration : int
- $easingType : AnimationEasingType|null
- $finished : bool
- $initialDelay : int|null
- $initialPosition : Vec3|null
- $modifier : Vec3
- $progress : float
- $repeat : bool|null
- $repeatCount : int|null
- $repeatDelay : int|null
- $repeatedCount : int
- $requiredDelayTicks : int
- $requiredTicks : int
- $reverse : bool|null
- $reverseCount : int|null
- $reversedCount : int
- $reverseDelay : int|null
- $reversing : bool
- $runCount : int
- $running : bool
- $tag : int|null
- $targetPosition : Vec3|null
- $waiting : bool
Methods
- __construct() : mixed
- fromCurrentAndTargetPosition() : static
- Creates a new animation from the current and target position
Properties
$currentDelayTick
public
int
$currentDelayTick
= 0
$currentTick
public
int
$currentTick
= 0
$duration
public
int
$duration
$easingType
public
AnimationEasingType|null
$easingType
= AnimationEasingType::LINEAR
$finished
public
bool
$finished
= false
$initialDelay
public
int|null
$initialDelay
= 0
$initialPosition
public
Vec3|null
$initialPosition
$modifier
public
Vec3
$modifier
$progress
public
float
$progress
= 0.0
$repeat
public
bool|null
$repeat
= false
$repeatCount
public
int|null
$repeatCount
= 0
$repeatDelay
public
int|null
$repeatDelay
= 0
$repeatedCount
public
int
$repeatedCount
= 0
$requiredDelayTicks
public
int
$requiredDelayTicks
= 0
$requiredTicks
public
int
$requiredTicks
= 0
$reverse
public
bool|null
$reverse
= false
$reverseCount
public
int|null
$reverseCount
= 0
$reversedCount
public
int
$reversedCount
= 0
$reverseDelay
public
int|null
$reverseDelay
= 0
$reversing
public
bool
$reversing
= false
$runCount
public
int
$runCount
= 0
$running
public
bool
$running
= false
$tag
public
int|null
$tag
= null
$targetPosition
public
Vec3|null
$targetPosition
$waiting
public
bool
$waiting
= false
Methods
__construct()
public
__construct(Vec3 $modifier, int $duration[, AnimationEasingType|null $easingType = AnimationEasingType::LINEAR ][, int|null $initialDelay = 0 ][, bool $repeat = false ][, int|null $repeatCount = 0 ][, int|null $repeatDelay = 0 ][, bool $reverse = false ][, int|null $reverseCount = 0 ][, int|null $reverseDelay = 0 ][, int|null $tag = null ]) : mixed
Parameters
- $modifier : Vec3
-
The position modifier to apply
- $duration : int
-
The duration of the animation in milliseconds
- $easingType : AnimationEasingType|null = AnimationEasingType::LINEAR
-
The easing type
- $initialDelay : int|null = 0
-
The initial delay in milliseconds
- $repeat : bool = false
-
Whether the animation should repeat
- $repeatCount : int|null = 0
-
The number of times the animation should repeat
- $repeatDelay : int|null = 0
-
The delay between each repeat in milliseconds
- $reverse : bool = false
-
Whether the animation should reverse
- $reverseCount : int|null = 0
-
The number of times the animation should reverse
- $reverseDelay : int|null = 0
-
The delay between each reverse in milliseconds
- $tag : int|null = null
-
The tag of the animation
fromCurrentAndTargetPosition()
Creates a new animation from the current and target position
public
static fromCurrentAndTargetPosition(Vec3 $currentPosition, Vec3 $targetPosition, int $duration) : static
Parameters
- $currentPosition : Vec3
- $targetPosition : Vec3
- $duration : int