BinaryLerpSource

BinaryLerpSource

Takes two blend sources and uses linear interpolation to merge TransformData values. If one of the sources is null, or does not have a key that the other does, we disregard weighting and use the non-null side's full value. Source data that is not TransformData, JointData or float data is not combined, rather A's value will always be used unless it is null.

Constructor

new BinaryLerpSource(sourceA, sourceB, blendWeight)

Parameters:
Name Type Description
sourceA ClipSource | BinaryLerpSource | FrozenClipSource | ManagedTransformSource

our first source.

sourceB ClipSource | BinaryLerpSource | FrozenClipSource | ManagedTransformSource

our second source.

blendWeight number

A key into the related AnimationManager's values store for pulling blend weighting.

Methods

(static) blendFloatValues(rVal, key, blendWeight, dataA, dataB)

Blends two float values and stores them in rVal

Parameters:
Name Type Description
rVal Object

The object in which to store result

key string

The key to object rVal, so rVal[key] is the store

blendWeight number
dataA Array.<number>

The float is wrapped in an array

dataB Array.<number>

The float is wrapped in an array

(static) combineSourceData(sourceAData, sourceBData, blendWeight, storeopt, isAdditiveopt) → {Object}

Blends two sourceData maps together

Parameters:
Name Type Attributes Default Description
sourceAData Object
sourceBData Object
blendWeight number
store Object <optional>

If store is supplied, the result is stored there

isAdditive boolean <optional>
false

sourceBData is treated as additive when true. Defaults to false.

getSourceData()

isActive() → {boolean}

resetClips(globalStartTime)

Sets start time of clipinstance. If set to current time, clip is reset

Parameters:
Name Type Description
globalStartTime number

setTime(globalTime)

Sets the current time and moves the AnimationClipInstance forward

Parameters:
Name Type Description
globalTime number

setTimeScale(timeScale)

Sets the time scale for sources A and B

Parameters:
Name Type Description
timeScale number