Skip to Content
defold-typescript libraries
defold (official)extension-spine

defold/extension-spine/spine.resource

Functions for creating Spine resources dynamically

  • GitHub: defold/extension-spine — pinned to 4.8.0 (released while Defold 1.13.1 was current)
    1. Pick a release from defold/extension-spine releases and add its Source code (zip) URL (or a packaged .zip asset, if the library ships one) to game.project under [project] dependencies, then Fetch Libraries in the Defold editor.
    2. Run bunx @defold-typescript/cli resolve to materialize its types.
    3. Call it through the global resource — no import. It adds members to the engine resource namespace.

Functions

resource.create_spinescene(path: string, options: table): hash

Creates a spinescene resource (.spinescenec) from runtime data. Creates a Spine scene resource dynamically at runtime. This allows loading Spine animations from data rather than pre-built assets. The atlas path must reference a compiled .texturesetc resource. The created spinescene is tracked for cleanup when the collection unloads; internal intermediate JSON is removed automatically.

Parameters

  • path: string — The target resource path. Must end with .spinescenec
  • options: table — Table with fields
    • spine_data: string — JSON bytes of the Spine skeleton
    • atlas_path: string — Path to the compiled atlas resource (.texturesetc)

Returns

  • path_hash: hash — canonical path hash of the created resource

On this page