Sampler

class Animation.Sampler()

Describes how the keyframes in a buffer are sampled.

Constructors

Animation.Sampler.constructor()
Sampler(buffer: KeyframeBuffer, interpolationType: InterpolationType): Sampler

Creates a new sampler for a [[KeyframeBuffer]]

Parameters

buffer: KeyframeBuffer

The buffer that will be sampled.

interpolationType: InterpolationType

The Type of interpolation that will be used

Returns: Sampler

Properties

Animation.Sampler.buffer

readonly

The buffer that will be sampled.

Animation.Sampler.interpolationType
interpolationType: InterpolationType

The Type of interpolation that will be used

Methods

Animation.Sampler.interpolateQuat()
interpolateQuat(t: number, out: Quaternion): void

Computes an interpolated quaternion for the given frame.

Parameters

t: number

out: Quaternion

Returns: void

Animation.Sampler.interpolateScalar()
interpolateScalar(t: number): number

Computes an interpolated scalar value for the given frame.

Parameters

t: number

Returns: number

Animation.Sampler.interpolateVec3()
interpolateVec3(t: number, out: Point3): void

Computes an interpolated Vector 3 value for the given frame.

Parameters

t: number

out: Point3

Returns: void

Animation.Sampler.interpolateVec3CubicSpline()
interpolateVec3CubicSpline(k0: number, k1: number, t: number, out: Point3): void

Performs Cubic Spline Interpolation on the Vector3 values at keyframes beginning at indices k0 and k1

Parameters

k0: number

k1: number

t: number

out: Point3

Returns: void