Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AnimationState

AnimationState 完全控制动画播放过程。
大多数情况下 动画组件 是足够和易于使用的。如果您需要更多的动画控制接口,请使用 AnimationState。

Hierarchy

Index

Constructors

constructor

Properties

Private _blendStateBuffer

_blendStateBuffer: BlendStateBuffer | null = null

Private _blendStateWriters

_blendStateWriters: IBlendStateWriter[] = []

Protected _clip

Protected commonTargetStatuses

commonTargetStatuses: Array<null | object> = []

May be null due to failed to initialize.

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 _delay

_delay: number = 0

Protected _delayTime

_delayTime: number = 0

Protected _ignoreIndex

_ignoreIndex: number = InvalidIndex

Private _isBlendStateWriterInitialized

_isBlendStateWriterInitialized: boolean = false

Protected Optional _lastIterations

_lastIterations: undefined | number

Protected _lastWrapInfo

_lastWrapInfo: WrappedInfo | null = null

Protected _lastWrapInfoEvent

_lastWrapInfoEvent: WrappedInfo | null = null

_lastframeEventOn

_lastframeEventOn: boolean = false

Protected _name

_name: string

Protected _process

_process: process = this.process

Protected _repeatCount

_repeatCount: number = 1

Protected _samplerSharedGroups

_samplerSharedGroups: ISamplerSharedGroup[] = []

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

单次动画的持续时间,秒。(动画长度)

readonly

frameRate

frameRate: number = 0

speed

speed: number = 1

播放速率。

default:

1.0

time

time: number = 0

动画当前的时间,秒。

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

wrapMode

Methods

Private destroyBlendStateWriters

  • _destroyBlendStateWriters(): void

emit

  • emit(type: any, state: any): void

Private fireEvent

  • fireEvent(index: number): void

needReverse

  • needReverse(currentIterations: number): boolean

Private onPauseOrStop

  • _onPauseOrStop(): void

Private onReplayOrResume

  • _onReplayOrResume(): void

Protected sampleCurves

  • sampleCurves(ratio: number): void

Private sampleEvents

setEventTarget

  • setEventTarget(target: any): void

cache

  • cache(frames: number): void

destroy

  • destroy(): void

emit

getWrappedInfo

initialize

  • initialize(root: Node, propertyCurves?: readonly, IRuntimeCurve: any, __namedParameters: []): void

off

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

on

Protected onError

  • onError(message: string): void

Protected onPause

  • onPause(): void

Protected onPlay

  • onPlay(): void

Protected onResume

  • onResume(): void

Protected onStop

  • onStop(): void

once

pause

  • pause(): void

play

  • play(): void

process

  • process(): 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