NumberSequence

Overview

Defines a sequence where values change smoothly over time by combining multiple number keypoints (NumberSequenceKeypoint).

Each keypoint specifies a numeric value at a specific point, and these values are sequentially connected to create smooth numeric change effects. This structure is commonly used in various elements that need to express numeric changes over time, such as particle size, transparency, and intensity.

Constructors

new

Creates a NumberSequence using the passed numeric value. The same value is applied at both the starting and ending points of the sequence, maintaining a constant numeric value throughout the entire range without changes.

Parameters

number InValue

The single numeric value to be applied across all points of the NumberSequence. This value remains constant from start to end.

Return

NumberSequence

A new NumberSequence with the passed numeric value set.

Code Samples

local NumSequence = NumberSequence.new(5)

new

Creates a NumberSequence with value n0 at the starting point and value n1 at the ending point. The sequence smoothly interpolates values from start to end.

Parameters

number n0

The value to be applied at the starting point of the sequence, defining the number at time value 0.

number n1

The value to be applied at the ending point of the sequence, defining the number at time value 1.

Return

NumberSequence

A new NumberSequence with the passed numeric value set.

Code Samples

new

Creates a NumberSequence from an array of NumberSequenceKeypoint.

Each keypoint must be sorted by time value in ascending order without shuffling. At least two keypoints are required to form a sequence, and the starting keypoint must have a time value of 0 while the ending keypoint must have a time value of 1.

Parameters

array InArrayValue

An array consisting of NumberSequenceKeypoint. Each keypoint defines a time value within the ColorSequence and the numeric value at that point. Keypoints must be sorted by time value in ascending order, with at least two required. The first keypoint's time value must be 0, and the last keypoint's time value must be 1.

Return

NumberSequence

A new NumberSequence with the passed numeric value set.

Code Samples

Properties

KeyPoints

Returns an array consisting of NumberSequenceKeypoint.

Code Samples

Methods

Last updated