Fission FSN
Loading...
Searching...
No Matches
fsSpine Directory Reference
Directory dependency graph for fsSpine:
/home/runner/work/fission/fission/libs/fsSpine

Directories

 
src
 
tests

Detailed Description

fsSpine is an optional, renderer-neutral animation provider backed by spine-cpp. Enable it in a game's root CMakeLists.txt before Fission is configured:

set(FISSION_SPINE ON)

The project generator carries this setting into generated options.cmake. The adapter requires Spine 4.2. Its default runtime is the unmodified 4.2 runtime bundled with Axmol. Set FISSION_SPINE_RUNTIME_ROOT to use a 4.2 runtime from another location; configuration fails early for other versions.

Assets

Export JSON data using a base name ending in .spine. For an animation named hero, keep these files together:

hero.spine.json
hero.spine.atlas
hero.png

Every atlas page named by hero.spine.atlas is resolved relative to the atlas file. Multiple texture pages are supported. Atlas premultiplied-alpha settings and Spine normal, additive, multiply, and screen blend modes are honoured. Atlas nearest/linear filtering and clamp/repeat wrapping are also applied. Mipmapped filters currently use their nearest or linear non-mipmapped equivalent because Fission does not generate texture mipmaps.

The standard fsCAnimatingSpriteComponent also discovers entity-prefixed files using the existing convention, for example ANM-hero.spine.json. Animation selection, looping, queued and multi-track playback, speed, start offset, cross-fade duration, skins, slot attachments, tinting, hit tests, transforms, and visibility use the existing Fission animating-sprite API. Pass an empty skin name to skinSet to restore the default skin, or an empty attachment name to attachmentSet to clear a slot. animationEventCallbackSet receives lifecycle and authored Spine events as renderer-neutral fsSAnimationEvent values.

Current support

  • Raylib and Axmol textured-mesh renderers
  • region and weighted/unweighted mesh attachments
  • clipping attachments
  • atlas-based pixel hit maps when requested
  • JSON skeleton data exported for Spine 4.2

Binary .skel files are not currently supported. Adding them requires a binary-safe Fission resource-reading API; fsIFile::strGetFromFile is suitable only for the current JSON and atlas inputs.

Use of the Spine runtime remains subject to the Spine Runtimes License Agreement included with the selected runtime.

Smoke test

The repository includes a metadata-only Spine 4.2 fixture and a standalone, headless runtime smoke test:

cmake -S libs/fsSpine/tests -B build-spine-tests
cmake --build build-spine-tests
ctest --test-dir build-spine-tests --output-on-failure