Options
All
  • Public
  • Public/Protected
  • All
Menu

Class SkeletalAnimationClip

骨骼动画剪辑。

Hierarchy

Implements

Index

Constructors

constructor

Properties

_callbackTable

_callbackTable: any = createMap(true)

IEventTarget implementations, they will be overwrote with the same implementation in EventTarget by applyMixins

Protected _converted

_converted: boolean = false

Protected _duration

_duration: number = 0

Protected _hash

_hash: number = 0

Protected _keys

_keys: number[][] = []

Protected _name

_name: string

_native

_native: string | undefined = ""

Serializable url for native asset. For internal usage.

default

""

_objFlags

_objFlags: number

Protected _ratioSamplers

_ratioSamplers: RatioSampler[] = []

Protected Optional _runtimeCurves

_runtimeCurves: IRuntimeCurve[]

Protected Optional runtimeEvents

runtimeEvents: undefined | object

Protected _stepness

_stepness: number = 0

_uuid

_uuid: string

内部使用。

convertedData

convertedData: ConvertedData

events

events: IAnimationEventData[] = []
zh

动画包含的事件数据。

Protected frameRate

frameRate: number = 0

loaded

loaded: boolean = true

Whether the asset is loaded or not

originalKeys

originalKeys: number[][] = []

sample

sample: number = 60
zh

动画帧率,单位为帧/秒。

speed

speed: number = 1
zh

动画的播放速度。

wrapMode

wrapMode: WrapMode = AnimationWrapMode.Normal
zh

动画的循环模式。

Static WrapMode

WrapMode: WrapMode = AnimationWrapMode

Static preventDeferredLoadDependents

preventDeferredLoadDependents: boolean = false

Indicates whether its dependent raw assets can support deferred load if the owner scene (or prefab) is marked as asyncLoadAssets.

property

{Boolean} preventDeferredLoadDependents

default

false

static

Static preventPreloadNativeObject

preventPreloadNativeObject: boolean = false

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

property

{Boolean} preventPreloadNativeObject

default

false

static

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.

    property

    {Object} _nativeAsset

    default

    null

    type

    {any}

    Returns any

  • Parameters

    • obj: any

    Returns void

curves

duration

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

Protected eventGroups

hash

  • get hash(): number

isValid

  • get isValid(): boolean
  • Indicates whether the object is not yet destroyed. (It will not be available after being destroyed)
    When an object's destroy is called, it is actually destroyed after the end of this frame. So isValid will return false from the next frame, while isValid in the current frame will still be true. If you want to determine whether the current frame has called destroy, use cc.isValid(obj, true), but this is often caused by a particular logical requirements, which is not normally required.

    property

    {Boolean} isValid

    default

    true

    readonly
    example
    var node = new cc.Node();
    cc.log(node.isValid);    // true
    node.destroy();
    cc.log(node.isValid);    // true, still valid in this frame
    // after a frame...
    cc.log(node.isValid);    // false, destroyed in the end of last frame

    Returns boolean

keys

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

name

  • get name(): string
  • set name(value: string): void

nativeUrl

  • get nativeUrl(): string

Protected stepness

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

Methods

Protected applyStepness

  • _applyStepness(): void

Private convertToSkeletalCurves

  • convertToSkeletalCurves(root: INode): void

Private convertToUniformSample

Private convertToWorldSpace

Protected createPropertyCurves

  • _createPropertyCurves(): void

Protected createRuntimeEvents

  • _createRuntimeEvents(): void

destroyImmediate

  • _destroyImmediate(): void

destruct

  • _destruct(): void
  • Clear all references in the instance.

    NOTE: this method will not clear the getter or setter functions which defined in the instance of CCObject. You can override the _destruct method if you need, for example: _destruct: function () { for (var key in this) { if (this.hasOwnProperty(key)) { switch (typeof this[key]) { case 'string': this[key] = ''; break; case 'object': case 'function': this[key] = null; break; } } }

    Returns void

Private setRawAsset

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

Optional createNode

destroy

  • destroy(): boolean
  • Destroy this Object, and release all its own references to other objects.
    Actual object destruction will delayed until before rendering. From the next frame, this object is not usable any more. You can use cc.isValid(obj) to check whether the object is destroyed before accessing it.

    example
    obj.destroy();

    Returns boolean

    whether it is the first time the destroy being called

dispatchEvent

  • dispatchEvent(event: Event): void

emit

  • emit(key: string, ...args: any[]): void

Protected getEventGroupIndexAtRatio

  • getEventGroupIndexAtRatio(ratio: number): number

getPropertyCurves

hasEventListener

  • hasEventListener(key: string, callback?: Function | undefined, target?: Object | undefined): boolean

Protected hasEvents

  • hasEvents(): boolean

off

  • off(type: string, callback?: Function | undefined, target?: Object | undefined): void

on

  • on(type: string, callback: Function, target?: Object | undefined): Function | undefined

onLoaded

  • onLoaded(): void

once

  • once(type: string, callback: Function, target?: Object | undefined): Function | undefined

removeAll

  • removeAll(keyOrTarget?: string | Object | undefined): void

targetOff

  • targetOff(keyOrTarget?: string | Object | undefined): 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

updateCurveDatas

  • updateCurveDatas(): void

Protected updateEventDatas

  • updateEventDatas(): void

Static deferredDestroy

  • _deferredDestroy(): void

Static createWithSpriteFrames

Static deserialize

  • deserialize(data: any): any

Static isRawAssetType

  • isRawAssetType(ctor: Function): boolean

Generated using TypeDoc