Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AnimationClip

The animation clip represents a sequence of key frame animation created with the animation editor or skeletal animation other DCC tools. The data is divided in different levels: tracks, key frames, curves.

Hierarchy

Index

Type aliases

Static PropertyCurveData

PropertyCurveData: IPropertyCurveData

Constructors

constructor

Properties

__asyncLoadAssets__

__asyncLoadAssets__: boolean = false

__depends__

__depends__: any = null

__nativeDepend__

__nativeDepend__: any = null

__onLoadedInvoked__

__onLoadedInvoked__: boolean = false

Private _commonTargets

_commonTargets: ICommonTarget[] = []

Private _curves

_curves: ICurve[] = []

Private _data

_data: Uint8Array | null = null

Private _duration

_duration: number = 0

Private _hash

_hash: number = 0

Private _keys

_keys: number[][] = []

_native

_native: string = ""

Serializable url for native asset. For internal usage.

default

""

_nativeUrl

_nativeUrl: string = ""

Private _ratioSamplers

_ratioSamplers: RatioSampler[] = []

Private Optional _runtimeCurves

_runtimeCurves: IRuntimeCurve[]

Private Optional runtimeEvents

runtimeEvents: undefined | { eventGroups: IAnimationEventGroup[]; ratios: number[] }

Private _stepness

_stepness: number = 0

_uuid

_uuid: string

events

events: IEvent[] = []

Associated event data.

Private frameRate

frameRate: number = 0

loaded

loaded: boolean = true

Whether the asset is loaded or not

sample

sample: number = 60

Animation frame rate: frames per second. Note this property is only used for animation editing in Editor.

speed

speed: number = 1

Animation playback speed.

wrapMode

wrapMode: WrapMode = AnimationWrapMode.Normal

Animation loop mode.

Static WrapMode

WrapMode: WrapMode = AnimationWrapMode

Static preventDeferredLoadDependents

preventDeferredLoadDependents: boolean = true

Static preventPreloadNativeObject

preventPreloadNativeObject: boolean = false

Indicates whether its native object should be preloaded from native url.

default

false

Accessors

Private nativeAsset

  • get nativeAsset(): any
  • set nativeAsset(obj: any): void
  • The underlying native asset of this asset if one is available.
    This property can be used to access additional details or functionality releated to the asset.
    This property will be initialized by the loader if _native is available.

    default

    null

    Returns any

  • The underlying native asset of this asset if one is available.
    This property can be used to access additional details or functionality releated to the asset.
    This property will be initialized by the loader if _native is available.

    default

    null

    Parameters

    • obj: any

    Returns void

nativeDep

  • get nativeDep(): undefined | { __isNative__: boolean; ext: string; uuid: string }

commonTargets

curves

data

  • get data(): null | Uint8Array

duration

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

Protected eventGroups

hash

  • get hash(): number

keys

  • get keys(): number[][]
  • set keys(value: number[][]): void

nativeUrl

  • get nativeUrl(): string

refCount

  • get refCount(): number

Protected stepness

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

Methods

Protected applyStepness

  • _applyStepness(): void

Protected createPropertyCurves

  • _createPropertyCurves(): void

Protected createRuntimeEvents

  • _createRuntimeEvents(): void

Private decodeCVTAs

  • _decodeCVTAs(): void

Private setRawAsset

  • setRawAsset(filename: string, inLibrary?: boolean): void

addRef

Optional createNode

decRef

  • decRef(autoRelease?: boolean): Asset

destroy

  • destroy(): any

getEventGroupIndexAtRatio

  • getEventGroupIndexAtRatio(ratio: number): number

getPropertyCurves

Protected hasEvents

  • hasEvents(): boolean

onLoaded

  • onLoaded(): void

Private serialize

  • serialize(): void

toString

  • toString(): string
  • Returns the string representation of the object.
    The Asset object overrides the toString() method of the Object object.
    JavaScript calls the toString() method automatically
    when an asset is to be represented as a text value or when a texture is referred to in a string concatenation.

    For assets of the native type, it will return this.nativeUrl.
    Otherwise, an empty string is returned.
    This method may be overwritten by subclasses.

    method

    toString

    Returns string

updateEventDatas

  • updateEventDatas(): void

Static createWithSpriteFrames

Static deserialize

  • deserialize(data: any): any

Generated using TypeDoc