Options
All
  • Public
  • Public/Protected
  • All
Menu

Class SkeletonData

Spine 的 骨骼数据。

Hierarchy

Index

Constructors

constructor

Properties

__asyncLoadAssets__

__asyncLoadAssets__: boolean = false

__depends__

__depends__: any = null

__nativeDepend__

__nativeDepend__: any = null

__onLoadedInvoked__

__onLoadedInvoked__: boolean = false

Private animsEnum

animsEnum: {} | null = null

Private _atlasCache

_atlasCache: TextureAtlas | null = null

Protected _atlasText

_atlasText: string = ""

Private Optional _buffer

_buffer: ArrayBuffer

_native

_native: string = ""

用于本机资产的可序列化URL。供内部使用。

default

""

_nativeUrl

_nativeUrl: string = ""

Private _skeletonCache

_skeletonCache: SkeletonData | null = null
property

{sp.spine.SkeletonData} _skeletonData

_skeletonJson

_skeletonJson: SkeletonJson | null = null

Private skinsEnum

skinsEnum: {} | null = null

_uuid

_uuid: string

loaded

loaded: boolean = true

该资源是否已经成功加载。

scale

scale: number = 1
property

{Number} scale

Private textureNames

textureNames: string[] = []
property

{String[]} textureNames

textures

textures: Texture2D[] = []
property

{Texture2D[]} textures

Static preventDeferredLoadDependents

preventDeferredLoadDependents: boolean = true

Static preventPreloadNativeObject

preventPreloadNativeObject: boolean = false

禁止预加载原生对象。

default

false

Accessors

nativeAsset

  • get nativeAsset(): ArrayBuffer
  • set nativeAsset(bin: ArrayBuffer): void

nativeDep

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

atlasText

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

nativeUrl

  • get nativeUrl(): string

refCount

  • get refCount(): number

skeletonJson

  • get skeletonJson(): SkeletonJson
  • set skeletonJson(value: SkeletonJson): void

skeletonJsonStr

  • get skeletonJsonStr(): string

Methods

Private getAtlas

  • getAtlas(quiet?: undefined | false | true): null | TextureAtlas

Private getTexture

Private setRawAsset

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

addRef

createNode

  • createNode(callback: (err: Error | null, node: Node) => void): void

decRef

  • decRef(autoRelease?: boolean): Asset

destroy

  • destroy(): any

ensureTexturesLoaded

  • ensureTexturesLoaded(loaded: null | ((x: boolean) => void), caller: any): void

getAnimsEnum

  • getAnimsEnum(): null | {}

getRuntimeData

  • getRuntimeData(quiet?: undefined | false | true): null | SkeletonData
  • 获取 Spine Runtime 使用的 SkeletonData。
    返回一个 {{#crossLinkModule "sp.spine"}}sp.spine{{/crossLinkModule}}.SkeletonData 对象。

    method

    getRuntimeData

    Parameters

    • Optional quiet: undefined | false | true

    Returns null | SkeletonData

getSkinsEnum

  • getSkinsEnum(): null | {}

isTexturesLoaded

  • isTexturesLoaded(): boolean

onLoaded

  • onLoaded(): void

reset

  • reset(): void

resetEnums

  • resetEnums(): void

Private serialize

  • serialize(): void

toString

  • toString(): string
  • 返回对象的字符串表示形式。
    Asset 对象将会重写 Object 对象的 toString() 方法。
    当资源要表示为文本值时或在字符串连接时引用时,
    JavaScript 会自动调用 toString() 方法。

    对于原始类型的资源,它将返回this.nativeUrl
    否则,返回空字符串。
    子类可能会覆盖此方法。

    method

    toString

    Returns string

Static deserialize

  • deserialize(data: any): any

Generated using TypeDoc