Skip to content

⬅️ Back to Table of Contents

📄 QuaternionKeyframeTrack.js

📊 Analysis Summary

Metric Count
🔧 Functions 1
🧱 Classes 1
📦 Imports 2

📚 Table of Contents

🛠️ File Location:

📂 src/animation/tracks/QuaternionKeyframeTrack.js

📦 Imports

Name Source
KeyframeTrack ../KeyframeTrack.js
QuaternionLinearInterpolant ../../math/interpolants/QuaternionLinearInterpolant.js

Functions

QuaternionKeyframeTrack.InterpolantFactoryMethodLinear(result: TypedArray): QuaternionLinearInterpolant

JSDoc:

/**
     * Overwritten so the method returns Quaternion based interpolant.
     *
     * @static
     * @param {TypedArray} [result] - The result buffer.
     * @return {QuaternionLinearInterpolant} The new interpolant.
     */

Parameters:

  • result TypedArray

Returns: QuaternionLinearInterpolant

Calls:

  • this.getValueSize
Code
InterpolantFactoryMethodLinear( result ) {

        return new QuaternionLinearInterpolant( this.times, this.values, this.getValueSize(), result );

    }

Classes

QuaternionKeyframeTrack

Class Code
class QuaternionKeyframeTrack extends KeyframeTrack {

    /**
     * Constructs a new Quaternion keyframe track.
     *
     * @param {string} name - The keyframe track's name.
     * @param {Array<number>} times - A list of keyframe times.
     * @param {Array<number>} values - A list of keyframe values.
     * @param {(InterpolateLinear|InterpolateDiscrete|InterpolateSmooth)} [interpolation] - The interpolation type.
     */
    constructor( name, times, values, interpolation ) {

        super( name, times, values, interpolation );

    }

    /**
     * Overwritten so the method returns Quaternion based interpolant.
     *
     * @static
     * @param {TypedArray} [result] - The result buffer.
     * @return {QuaternionLinearInterpolant} The new interpolant.
     */
    InterpolantFactoryMethodLinear( result ) {

        return new QuaternionLinearInterpolant( this.times, this.values, this.getValueSize(), result );

    }

}

Methods

InterpolantFactoryMethodLinear(result: TypedArray): QuaternionLinearInterpolant
Code
InterpolantFactoryMethodLinear( result ) {

        return new QuaternionLinearInterpolant( this.times, this.values, this.getValueSize(), result );

    }