Options
All
  • Public
  • Public/Protected
  • All
Menu

Module animation

Index

References

Enumerations

Classes

Interfaces

Type aliases

Variables

Functions

References

AnimationComponent

Renames and re-exports Animation

SkeletalAnimationComponent

Renames and re-exports SkeletalAnimation

Type aliases

BezierControlPoints

BezierControlPoints: []

CompressedEasingMethods

CompressedEasingMethods: Record<number, EasingMethod>

ConvertedProps

ConvertedProps: Record<string, IPropertyCurve>

CubicSplineValueConstructor

CubicSplineValueConstructor<T>: {}

Type parameters

  • T

Type declaration

CurveData

CurveData: Vec3[] | Quat[] | Mat4[]

CurveTarget

CurveTarget: Record<string, any>

表示曲线的目标对象。

CurveValue

CurveValue: any

表示曲线值,曲线值可以是任意类型,但必须符合插值方式的要求。

EasingMethod

帧时间渐变方式。可能为内置帧时间渐变方式的名称或贝塞尔控制点。

EasingMethodName

EasingMethodName: keyof animation

内置帧时间渐变方式名称。

IRuntimeCurve

IRuntimeCurve: Pick<ICurve, "modifiers" | "valueAdapter" | "commonTarget"> & { curve: AnimCurve; sampler: RatioSampler | null }

LerpFunction

LerpFunction<T>: (from: T, to: T, t: number, dt: number) => T

Type parameters

  • T

Type declaration

    • (from: T, to: T, t: number, dt: number): T
    • Parameters

      • from: T
      • to: T
      • t: number
      • dt: number

      Returns T

ScaleAndAddFx

ScaleAndAddFx<T>: (out: T, v1: T, v2: T, s: number) => T

Type parameters

  • T

Type declaration

    • (out: T, v1: T, v2: T, s: number): T
    • Parameters

      • out: T
      • v1: T
      • v2: T
      • s: number

      Returns T

ScaleFx

ScaleFx<T>: (out: T, v: T, s: number) => T

Type parameters

  • T

Type declaration

    • (out: T, v: T, s: number): T
    • Parameters

      • out: T
      • v: T
      • s: number

      Returns T

Variables

Const CubicSplineQuatValue

CubicSplineQuatValue: {} = makeCubicSplineValueConstructor('cc.CubicSplineQuatValue', Quat, Quat.multiplyScalar, Quat.scaleAndAdd,)

Type declaration

Const CubicSplineVec2Value

CubicSplineVec2Value: {} = makeCubicSplineValueConstructor('cc.CubicSplineVec2Value', Vec2, Vec2.multiplyScalar, Vec2.scaleAndAdd,)

Type declaration

Const CubicSplineVec3Value

CubicSplineVec3Value: {} = makeCubicSplineValueConstructor('cc.CubicSplineVec3Value', Vec3, Vec3.multiplyScalar, Vec3.scaleAndAdd,)

Type declaration

Const CubicSplineVec4Value

CubicSplineVec4Value: {} = makeCubicSplineValueConstructor('cc.CubicSplineVec4Value', Vec4, Vec4.multiplyScalar, Vec4.scaleAndAdd,)

Type declaration

Const InvalidIndex

InvalidIndex: -1 = -1

Const acos

acos: acos = Math.acos

Const backOutIn

backOutIn: (Anonymous function) = _makeOutIn(backIn, backOut)

Const bounceOutIn

bounceOutIn: (Anonymous function) = _makeOutIn(bounceIn, bounceOut)

Const circOutIn

circOutIn: (Anonymous function) = _makeOutIn(circIn, circOut)

Const cos

cos: cos = Math.cos

Const cubicOutIn

cubicOutIn: (Anonymous function) = _makeOutIn(cubicIn, cubicOut)

Const elasticOutIn

elasticOutIn: (Anonymous function) = _makeOutIn(elasticIn, elasticOut)

Const expoOutIn

expoOutIn: (Anonymous function) = _makeOutIn(expoIn, expoOut)

Const m4_1

m4_1: Mat4 = new Mat4()

Const m4_1

m4_1: Mat4 = new Mat4()

Const m4_1

m4_1: Mat4 = new Mat4()

Const m4_2

m4_2: Mat4 = new Mat4()

Const m4_2

m4_2: Mat4 = new Mat4()

Const max

max: max = Math.max

Const noCurves

noCurves: IRuntimeCurve[] = []

Const pi

pi: number = Math.PI

Const quadOutIn

quadOutIn: (Anonymous function) = _makeOutIn(quadIn, quadOut)

Const quartOutIn

quartOutIn: (Anonymous function) = _makeOutIn(quartIn, quartOut)

Const quintOutIn

quintOutIn: (Anonymous function) = _makeOutIn(quintIn, quintOut)

Const selectLerpFx

selectLerpFx: (Anonymous function) = (() => {function makeValueTypeLerpFx<T extends ValueType> (constructor: Constructor<T>) {const tempValue = new constructor();return (from: T, to: T, ratio: number) => {// @ts-expect-error Hard to typingconstructor.lerp(tempValue, from, to, ratio);return tempValue;};}function callLerpable (from: ILerpable, to: ILerpable, t: number, dt: number): any {// eslint-disable-next-line @typescript-eslint/no-unsafe-returnreturn from.lerp(to, t, dt);}function makeQuatSlerpFx () {const tempValue = new Quat();return (from: Quat, to: Quat, t: number, dt: number) => Quat.slerp(tempValue, from, to, t);}return (value: any): LerpFunction<any> | undefined => {if (value === null) {return undefined;}if (typeof value === 'number') {return lerp;} else if (typeof value === 'object' && value.constructor) {if (value instanceof Quat) {return makeQuatSlerpFx();} else if (value instanceof ValueType) {return makeValueTypeLerpFx(value.constructor as typeof ValueType);} else if (value.constructor === Number) {return lerp;} else if (isLerpable(value)) {return callLerpable;}}return undefined;};})()

Const sineOutIn

sineOutIn: (Anonymous function) = _makeOutIn(sineIn, sineOut)

Const sqrt

sqrt: sqrt = Math.sqrt

Const tau

tau: number = 2 * pi

Functions

makeOutIn

  • makeOutIn(fnIn: (k: number) => number, fnOut: (k: number) => number): (Anonymous function)
  • Parameters

    • fnIn: (k: number) => number
        • (k: number): number
        • Parameters

          • k: number

          Returns number

    • fnOut: (k: number) => number
        • (k: number): number
        • Parameters

          • k: number

          Returns number

    Returns (Anonymous function)

backIn

  • backIn(k: number): number

backInOut

  • backInOut(k: number): number

backOut

  • backOut(k: number): number

bezier

  • bezier(C1: number, C2: number, C3: number, C4: number, t: number): number

bezierByTime

bounceIn

  • bounceIn(k: number): number

bounceInOut

  • bounceInOut(k: number): number

bounceOut

  • bounceOut(k: number): number

cardano

circIn

  • circIn(k: number): number

circInOut

  • circInOut(k: number): number

circOut

  • circOut(k: number): number

collectRecursively

  • collectRecursively(node: Node, prefix?: string, out?: string[]): string[]

computeRatioByType

  • computeRatioByType(ratio: number, type: EasingMethod): number
  • Compute a new ratio by curve type.

    Parameters

    • ratio: number

      The origin ratio

    • type: EasingMethod

      If it's Array, then ratio will be computed with bezierByTime. If it's string, then ratio will be computed with cc.easing function

    Returns number

constant

  • constant(): number

convertToSkeletalCurves

convertToUniformSample

convertToWorldSpace

crt

  • crt(v: number): number

cubicIn

  • cubicIn(k: number): number

cubicInOut

  • cubicInOut(k: number): number

cubicOut

  • cubicOut(k: number): number

elasticIn

  • elasticIn(k: number): number

elasticInOut

  • elasticInOut(k: number): number

elasticOut

  • elasticOut(k: number): number

equalClips

expoIn

  • expoIn(k: number): number

expoInOut

  • expoInOut(k: number): number

expoOut

  • expoOut(k: number): number

fade

  • fade(k: number): number

getPathFromRoot

  • getPathFromRoot(target: Node | null, root: Node): string

getWorldTransformUntilRoot

isLerpable

  • isLerpable(object: any): object is ILerpable

isTargetingTRS

  • isTargetingTRS(path: TargetPath[]): boolean

linear

  • linear(k: number): number

makeCubicSplineValueConstructor

makeSamplerSharedGroup

quadIn

  • quadIn(k: number): number

quadInOut

  • quadInOut(k: number): number

quadOut

  • quadOut(k: number): number

quartIn

  • quartIn(k: number): number

quartInOut

  • quartInOut(k: number): number

quartOut

  • quartOut(k: number): number

quickFindIndex

  • quickFindIndex(ratios: number[], ratio: number): number

quintIn

  • quintIn(k: number): number

quintInOut

  • quintInOut(k: number): number

quintOut

  • quintOut(k: number): number

sampleAnimationCurve

sineIn

  • sineIn(k: number): number

sineInOut

  • sineInOut(k: number): number

sineOut

  • sineOut(k: number): number

smooth

  • smooth(k: number): number

wrapIterations

  • wrapIterations(iterations: number): number

Generated using TypeDoc