Options
All
  • Public
  • Public/Protected
  • All
Menu

Class SkeletalAnimationState

Hierarchy

Index

Constructors

constructor

Properties

Protected _animInfo

_animInfo: IAnimInfo | null = null

Protected _animInfoMgr

_animInfoMgr: JointAnimationInfo

Protected _bakedDuration

_bakedDuration: number = 0

Protected _clip

Protected commonTargetStatuses

commonTargetStatuses: (null | { changed: boolean; target: IBufferedTarget })[] = []

May be null due to failed to initialize.

Protected _comps

_comps: SkinnedMeshRenderer[] = []

Protected _currentFramePlayed

_currentFramePlayed: boolean = false

Mark whether the current frame is played. When set new time to animation state, we should ensure the frame at the specified time being played at next update.

Protected _curveLoaded

_curveLoaded: boolean = false

Protected _curvesInited

_curvesInited: boolean = false

Protected _delay

_delay: number = 0

Protected _delayTime

_delayTime: number = 0

Protected _frames

_frames: number = 1

Protected _ignoreIndex

_ignoreIndex: number = InvalidIndex

Protected Optional _lastIterations

_lastIterations: undefined | number

Protected _lastWrapInfo

_lastWrapInfo: WrappedInfo | null = null

Protected _lastWrapInfoEvent

_lastWrapInfoEvent: WrappedInfo | null = null

Protected _name

_name: string

Protected _parent

_parent: SkeletalAnimation | null = null

Protected _process

_process: process = this.process

Protected _repeatCount

_repeatCount: number = 1

Protected _samplerSharedGroups

_samplerSharedGroups: ISamplerSharedGroup[] = []

Protected _sockets

_sockets: ISocketData[] = []

Protected _target

_target: Node | null = null

Protected _targetNode

_targetNode: Node | null = null

Protected _wrapMode

_wrapMode: WrapMode = WrapMode.Normal

Protected _wrappedInfo

_wrappedInfo: WrappedInfo = new WrappedInfo()

duration

duration: number = 1

The iteration duration of this animation in seconds. (length)

readonly

frameRate

frameRate: number = 0

speed

speed: number = 1

The animation's playback speed. 1 is normal playback speed.

default:

1.0

time

time: number = 0

The current time of this animation in seconds.

default

0

weight

weight: number = 0

The weight.

Accessors

clip

curveLoaded

  • get curveLoaded(): boolean

delay

  • get delay(): number
  • set delay(value: number): void

isMotionless

  • get isMotionless(): boolean

isPaused

  • get isPaused(): boolean

isPlaying

  • get isPlaying(): boolean

length

  • get length(): number

name

  • get name(): string

repeatCount

  • get repeatCount(): number
  • set repeatCount(value: number): void
  • The animation's iteration count property.

    A real number greater than or equal to zero (including positive infinity) representing the number of times to repeat the animation node.

    Values less than zero and NaN values are treated as the value 1.0 for the purpose of timing model calculations.

    default

    1

    Returns number

  • The animation's iteration count property.

    A real number greater than or equal to zero (including positive infinity) representing the number of times to repeat the animation node.

    Values less than zero and NaN values are treated as the value 1.0 for the purpose of timing model calculations.

    default

    1

    Parameters

    • value: number

    Returns void

wrapMode

Methods

needReverse

  • needReverse(currentIterations: number): boolean

Protected sampleCurves

  • sampleCurves(ratio: number): void

Private sampleCurvesBaked

  • sampleCurvesBaked(ratio: number): void

setEventTarget

  • setEventTarget(target: any): void

allowLastFrameEvent

  • allowLastFrameEvent(allowed: boolean): void

cache

  • cache(frames: number): void

destroy

  • destroy(): void

emit

  • emit(...args: any[]): void

getWrappedInfo

initialize

  • initialize(root: Node): void

off

  • off(type: string, callback: Function, target?: any): void
  • deprecated

    Since V1.1.1, animation states were no longer defined as event targets. To process animation events, use Animation instead.

    Parameters

    • type: string
    • callback: Function
    • Optional target: any

    Returns void

on

  • on(type: string, callback: Function, target?: any): null | void
  • deprecated

    Since V1.1.1, animation states were no longer defined as event targets. To process animation events, use Animation instead.

    Parameters

    • type: string
    • callback: Function
    • Optional target: any

    Returns null | void

Private onBlendFinished

  • onBlendFinished(): void

Protected onError

  • onError(message: string): void

Protected onPause

  • onPause(): void

onPlay

  • onPlay(): void

Protected onResume

  • onResume(): void

Protected onStop

  • onStop(): void

once

  • once(type: string, callback: Function, target?: any): null | void
  • deprecated

    Since V1.1.1, animation states were no longer defined as event targets. To process animation events, use Animation instead.

    Parameters

    • type: string
    • callback: Function
    • Optional target: any

    Returns null | void

pause

  • pause(): void

play

  • play(): void

process

  • process(): void

rebuildSocketCurves

  • rebuildSocketCurves(sockets: Socket[]): void

resume

  • resume(): void

sample

setTime

  • setTime(time: number): void

simpleProcess

  • simpleProcess(): void

step

  • step(): void

stop

  • stop(): void

update

  • update(delta: number): void

Generated using TypeDoc