Options
All
  • Public
  • Public/Protected
  • All
Menu

Class SkeletonData

The skeleton data of 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 = ""

Serializable url for native asset. For internal usage.

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

Whether the asset is loaded or not

scale

scale: number = 1

A scale can be specified on the JSON or binary loader which will scale the bone positions, image sizes, and animation translations. This can be useful when using different sized images than were used when design ing the skeleton in Spine. For example, if using images that are half the size than were used in Spine, a scale of 0.5 can be used. This is commonly used for games that can run with either low or high resolution texture atlases. see http://en.esotericsoftware.com/spine-using-runtimes#Scaling

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

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

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
  • Get the included SkeletonData used in spine runtime.
    Returns a {{#crossLinkModule "sp.spine"}}sp.spine{{/crossLinkModule}}.SkeletonData object.

    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
  • 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

Static deserialize

  • deserialize(data: any): any

Generated using TypeDoc