Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Curve

It represents a curve of Automaton.

Hierarchy

  • Curve

Index

Constructors

constructor

Properties

Protected __automaton

__automaton: Automaton

The parent automaton.

Protected __fxs

__fxs: FxSection[] = []

List of fx sections.

Protected __nodes

__nodes: BezierNode[] = []

List of bezier node.

Protected __shouldNotInterpolate

__shouldNotInterpolate: Uint8Array

An array of bool where you do not want to interpolate the value. Its length is same as curve.__automaton.resolution * curve.__automaton.length + 1.

Protected __values

__values: Float32Array

An array of precalculated value. Its length is same as curve.__automaton.resolution * curve.__automaton.length + 1.

Accessors

length

  • get length(): number
  • The length of this curve.

    Returns number

Methods

Protected __applyFxs

  • __applyFxs(): void
  • The second step of precalc: apply fxs to the generated curves.

    Returns void

Protected __generateCurve

  • __generateCurve(): void
  • The first step of precalc: generate a curve out of nodes.

    Returns void

deserialize

getValue

  • getValue(time: number): number
  • Return the value of specified time point.

    Parameters

    • time: number

      Time at the point you want to grab the value.

    Returns number

    Result value

precalc

  • precalc(): void
  • Precalculate value of samples.

    Returns void

Generated using TypeDoc