Cycles
The Cycles modifier samples a defined portion of the curve and loops it throughout the modifier’s range.
Types
- Any
Constructor
new Cycles<T> (
startTime: number,
endTime: number,
rangeStart: number | undefined = undefined,
rangeEnd: number | undefined = undefined,
)
startTime: The beginning time of the range from which the curve will be sampled for the loop.endTime: The ending time of the range from which the curve will be sampled for the loop.rangeStart: The time at which the modifier begins to modify the curve.rangeEnd: The time at which the modifier no longer modifies the curve.\
The
Cycles modifier requires configuration, since its output depends not only on the evaluation time and value, but on the rest of the curve itself. This configuration occurs automatically whenever the curve to which it belongs is updated. However, if a Cycles modifier belongs to multiple curves, it might produce unexpected results.
import { Modifiers, RGBColor } from 'curves'; // Import Modifiers
const numberCycles = new Modifiers.Any.Cycles<number>(0, 1); // Create a new number cycles modifier
const rgbCycles = new Modifiers.Any.Cycles<RGBColor>(2, 6.5); // Create a new color cycles modifier