AnimationModule Overview
AnimationModule Overview
SamplerFactory

SamplerFactory

The SamplerFactory class creates different types of animation samplers.

Properties

This module exposes no properties.

Methods

MethodDescription
bezier
bezier(p0: number | Array<number>, p1: number | Array<number>, p2: number | Array<number>, p3: number | Array<number>): ScalarSampler | ArrayOfScalarSamplers


Returns a sampler object that generates values of a cubic Bezier curve with the specified control points.
The control points are assumed to be equidistant along the parameter axis.
constant
constant(value: number | Array<number>): ScalarSampler | ArrayOfScalarSamplers


Returns a sampler that returns the same value at all points in the animation.
easeInBack
easeInBack(begin: number | Array<number>, end: number | Array<number>): ScalarSampler | ArrayOfScalarSamplers


Easing sampler. Behaves similarly to the linear sampler, but with easing functions at the beginning and/or end.
easeInBounce
easeInBounce(begin: number | Array<number>, end: number | Array<number>): ScalarSampler | ArrayOfScalarSamplers


Easing sampler. Behaves similarly to the linear sampler, but with easing functions at the beginning and/or end.
easeInCirc
easeInCirc(begin: number | Array<number>, end: number | Array<number>): ScalarSampler | ArrayOfScalarSamplers


Easing sampler. Behaves similarly to the linear sampler, but with easing functions at the beginning and/or end.
easeInCubic
easeInCubic(begin: number | Array<number>, end: number | Array<number>): ScalarSampler | ArrayOfScalarSamplers


Easing sampler. Behaves similarly to the linear sampler, but with easing functions at the beginning and/or end.
easeInElastic
easeInElastic(begin: number | Array<number>, end: number | Array<number>): ScalarSampler | ArrayOfScalarSamplers


Easing sampler. Behaves similarly to the linear sampler, but with easing functions at the beginning and/or end.
easeInExpo
easeInExpo(begin: number | Array<number>, end: number | Array<number>): ScalarSampler | ArrayOfScalarSamplers


Easing sampler. Behaves similarly to the linear sampler, but with easing functions at the beginning and/or end.
easeInOutBack
easeInOutBack(begin: number | Array<number>, end: number | Array<number>): ScalarSampler | ArrayOfScalarSamplers


Easing sampler. Behaves similarly to the linear sampler, but with easing functions at the beginning and/or end.
easeInOutBounce
easeInOutBounce(begin: number | Array<number>, end: number | Array<number>): ScalarSampler | ArrayOfScalarSamplers


Easing sampler. Behaves similarly to the linear sampler, but with easing functions at the beginning and/or end.
easeInOutCirc
easeInOutCirc(begin: number | Array<number>, end: number | Array<number>): ScalarSampler | ArrayOfScalarSamplers


Easing sampler. Behaves similarly to the linear sampler, but with easing functions at the beginning and/or end.
easeInOutCubic
easeInOutCubic(begin: number | Array<number>, end: number | Array<number>): ScalarSampler | ArrayOfScalarSamplers


Easing sampler. Behaves similarly to the linear sampler, but with easing functions at the beginning and/or end.
easeInOutElastic
easeInOutElastic(begin: number | Array<number>, end: number | Array<number>): ScalarSampler | ArrayOfScalarSamplers


Easing sampler. Behaves similarly to the linear sampler, but with easing functions at the beginning and/or end.
easeInOutExpo
easeInOutExpo(begin: number | Array<number>, end: number | Array<number>): ScalarSampler | ArrayOfScalarSamplers


Easing sampler. Behaves similarly to the linear sampler, but with easing functions at the beginning and/or end.
easeInOutQuad
easeInOutQuad(begin: number | Array<number>, end: number | Array<number>): ScalarSampler | ArrayOfScalarSamplers


Easing sampler. Behaves similarly to the linear sampler, but with easing functions at the beginning and/or end.
easeInOutQuart
easeInOutQuart(begin: number | Array<number>, end: number | Array<number>): ScalarSampler | ArrayOfScalarSamplers


Easing sampler. Behaves similarly to the linear sampler, but with easing functions at the beginning and/or end.
easeInOutQuint
easeInOutQuint(begin: number | Array<number>, end: number | Array<number>): ScalarSampler | ArrayOfScalarSamplers


Easing sampler. Behaves similarly to the linear sampler, but with easing functions at the beginning and/or end.
easeInOutSine
easeInOutSine(begin: number | Array<number>, end: number | Array<number>): ScalarSampler | ArrayOfScalarSamplers


Easing sampler. Behaves similarly to the linear sampler, but with easing functions at the beginning and/or end.
easeInQuad
easeInQuad(begin: number | Array<number>, end: number | Array<number>): ScalarSampler | ArrayOfScalarSamplers


Easing sampler. Behaves similarly to the linear sampler, but with easing functions at the beginning and/or end.
easeInQuart
easeInQuart(begin: number | Array<number>, end: number | Array<number>): ScalarSampler | ArrayOfScalarSamplers


Easing sampler. Behaves similarly to the linear sampler, but with easing functions at the beginning and/or end.
easeInQuint
easeInQuint(begin: number | Array<number>, end: number | Array<number>): ScalarSampler | ArrayOfScalarSamplers


Easing sampler. Behaves similarly to the linear sampler, but with easing functions at the beginning and/or end.
easeInSine
easeInSine(begin: number | Array<number>, end: number | Array<number>): ScalarSampler | ArrayOfScalarSamplers


Easing sampler. Behaves similarly to the linear sampler, but with easing functions at the beginning and/or end.
easeOutBack
easeOutBack(begin: number | Array<number>, end: number | Array<number>): ScalarSampler | ArrayOfScalarSamplers


Easing sampler. Behaves similarly to the linear sampler, but with easing functions at the beginning and/or end.
easeOutBounce
easeOutBounce(begin: number | Array<number>, end: number | Array<number>): ScalarSampler | ArrayOfScalarSamplers


Easing sampler. Behaves similarly to the linear sampler, but with easing functions at the beginning and/or end.
easeOutCirc
easeOutCirc(begin: number | Array<number>, end: number | Array<number>): ScalarSampler | ArrayOfScalarSamplers


Easing sampler. Behaves similarly to the linear sampler, but with easing functions at the beginning and/or end.
easeOutCubic
easeOutCubic(begin: number | Array<number>, end: number | Array<number>): ScalarSampler | ArrayOfScalarSamplers


Easing sampler. Behaves similarly to the linear sampler, but with easing functions at the beginning and/or end.
easeOutElastic
easeOutElastic(begin: number | Array<number>, end: number | Array<number>): ScalarSampler | ArrayOfScalarSamplers


Easing sampler. Behaves similarly to the linear sampler, but with easing functions at the beginning and/or end.
easeOutExpo
easeOutExpo(begin: number | Array<number>, end: number | Array<number>): ScalarSampler | ArrayOfScalarSamplers


Easing sampler. Behaves similarly to the linear sampler, but with easing functions at the beginning and/or end.
easeOutQuad
easeOutQuad(begin: number | Array<number>, end: number | Array<number>): ScalarSampler | ArrayOfScalarSamplers


Easing sampler. Behaves similarly to the linear sampler, but with easing functions at the beginning and/or end.
easeOutQuart
easeOutQuart(begin: number | Array<number>, end: number | Array<number>): ScalarSampler | ArrayOfScalarSamplers


Easing sampler. Behaves similarly to the linear sampler, but with easing functions at the beginning and/or end.
easeOutQuint
easeOutQuint(begin: number | Array<number>, end: number | Array<number>): ScalarSampler | ArrayOfScalarSamplers


Easing sampler. Behaves similarly to the linear sampler, but with easing functions at the beginning and/or end.
easeOutSine
easeOutSine(begin: number | Array<number>, end: number | Array<number>): ScalarSampler | ArrayOfScalarSamplers


Easing sampler. Behaves similarly to the linear sampler, but with easing functions at the beginning and/or end.
frame
frame(numberOfFrames: number | Array<number>, startFrame?: number | Array<number>): ScalarSampler | ArrayOfScalarSamplers


Returns a sampler object that cyclically generates integer frame numbers in the range [0..numberOfFrames-1] as the attached driver's progress goes from 0.0 to 1.0.
If the startFrame is supplied, then the output values are shifted by that value.
HSVA
HSVA(channelSamplers: Array<ScalarSampler> | ArrayOfScalarSamplers): ColorSampler


Returns a sampler that specifies a color by interpreting the provided samplers as HSVA channels, respectively.
linear
linear(begin: number | Array<number>, end: number | Array<number>): ScalarSampler | ArrayOfScalarSamplers
polybezier
polybezier(config: {keyframes?: Array<number> | Array<Array<number>>, knots?: Array<number>, tangents?: Array<number> | Array<Array<number>>}): ScalarSampler | ArrayOfScalarSamplers


Returns a sampler object that generates values of a piecewise cubic Bezier spline that goes through specified keyframes as the attached driver's progress goes from 0.0 to 1.0 through normalized knots points.
When tangents is specified, the curve is C1-smooth, otherwise the curve is C2-smooth and the second derivatives at the begin and end points are zero.
The dimensions of config.keyframes and config.knots, if specified, and config.tangents, if specified, arrays must be equal and have no less than 2 elements.
The first element of config.knots, if specified, must always be zero.
If config.knots is not specified then the knot sequence is defaulted to [0, 1, 2, ..., config.keyframes.length - 1].
polyline
polyline(config: {keyframes?: Array<number> | Array<Array<number>> | Array<Rotation>, knots?: Array<number>}): ScalarSampler | ArrayOfScalarSamplers | RotationSampler


Returns a sampler object that generates values that goes piecewise linearly through specified keyframes as the attached driver's progress goes from 0.0 to 1.0 through normalized knots points.
The dimensions of the config.keyframes and config.knots arrays, if specified, must be equal and be not less than 2.
The first element of config.knots, if specified, must be zero.
If config.knots is not specified then the knot sequence defaults to [0, 1, 2, ..., config.keyframes.length - 1].
RGBA
RGBA(channelSamplers: Array<ScalarSampler> | ArrayOfScalarSamplers): ColorSampler


Returns a sampler that specifies a color by interpreting the provided samplers as RGBA channels, respectively.
sequence
sequence(config: {knots?: Array<number>, samplers?: ArrayOfScalarSamplers | Array<ArrayOfScalarSamplers>}): ScalarSampler | ArrayOfScalarSamplers


Returns an animation sequence built from provided segments with respect to the optionally provided knots.
config.samplers must contain at least 2 elements.
config.knots, if specified, must contain exactly config.samplers.length+1 elements.
The first element of config.knots, when specified, must always be zero.
If config.knots is not specified then the knot sequence defaults to [0, 1, 2, ..., config.samplers.length].

Was this article helpful?