Technical Documentation: EsotericSoftware/spine-runtimes
โน๏ธ Provenance: Multi-Tier Ingestion ยท CodeWiki Reference
Overview (README.md)
Spine Runtimes
This GitHub project hosts the Spine Runtimes which are needed to use Spine 2D skeletal animation data with various game toolkits.
Licensing
You are welcome to evaluate the Spine Runtimes and the examples we provide in this repository free of charge.
You can integrate the Spine Runtimes into your software free of charge, but users of your software must have their own Spine license. Please make your users aware of this requirement! This option is often chosen by those making development tools, such as an SDK, game toolkit, or software library.
In order to distribute your software containing the Spine Runtimes to others that don't have a Spine license, you need a Spine license at the time of integration. Then you can distribute your software containing the Spine Runtimes however you like, provided others don't modify it or use it to create new software. If others want to do that, they'll need their own Spine license.
For the official legal terms governing the Spine Runtimes, please read the Spine Runtimes License Agreement and Section 2 of the Spine Editor License Agreement.
Documentation
See the Spine Runtimes Guide for detailed information about using the Spine Runtimes. The Spine documentation page provides further information about tools and data formats. For runtime specific documentation, refer to the README.md file in each runtime directory.
Bugs, enhancements, and tasks
Review our backlog of bugs, enhancements, and tasks in the spine-runtimes and spine-editor issue trackers. Our roadmap provides a more convenient view of the same issue tracker information.
Versioning
The default branch on GitHub is stable and works with data exported from the latest, non-beta version of the Spine editor. New development is done in an X.X-beta branch, which may be a work in progress. Important changes to the runtimes can be reviewed in the CHANGELOG.md file. Occasionally the Spine Runtimes are tagged with the specific Spine editor version they work with.
It is highly suggested to freeze the Spine editor version to match the Spine Runtimes source being used and to update them in lock step. See the Spine Runtimes Guide for more information.
Contributing
In order to merge your contributions, we need a signed contributor license agreement (CLA) from you. You can send a copy of the CLA to [email protected].
When possible, it is best to base your contributions on the current beta branch (X.X-beta). Please be sure to follow the style and formatting you find in the respective runtime code to which you are contributing.
Spine Godot Spine Godot Docs Docs (`spine-godot/spine_godot/docs/docs.md`)
Spine Godot Documentation Update Guide
Overview
This document serves as a reusable prompt for updating the Spine Godot documentation. The documentation consists of XML files in spine_godot/docs/ that document the user-facing API classes exposed to GDScript.
Key Rule
Any SpineXXX.h class that contains a _bind_methods() declaration must be documented, as this indicates the class is exposed to GDScript users.
Instructions for Documentation Update
IMPORTANT: DO NOT USE TASK AGENTS FOR THIS WORK! You must work on documentation sequentially, one class at a time, checking off completed items as you go.
Step 1: Analyze Current State
Before updating documentation, you must:
- Run:
grep -l "_bind_methods" spine_godot/Spine*.h | sortto find all classes that need documentation - List all existing
.xmlfiles inspine_godot/docs/ - Compare the two lists to identify missing documentation
- Update the checklist below based on current state
Step 2: Documentation Sources
For each class that needs documentation:
- Primary source: The Godot wrapper header in
spine_godot/SpineXXX.h- check the_bind_methods()implementation in the corresponding.cppfile to see what's exposed - CRITICAL source for documentation text: The corresponding spine-cpp header in
spine_godot/spine-cpp/include/spine/*.h- COPY AND ADAPT THE DOCUMENTATION FROM HERE - Implementation details: The corresponding
.cppfile if needed for understanding behavior
Step 3: Update Process (WORK SEQUENTIALLY)
For each class in the checklist, working one at a time:
- Read the wrapper's
_bind_methods()to identify all exposed methods, properties, signals, and constants - READ THE SPINE-CPP HEADER FILE AND COPY THE DOCUMENTATION COMMENTS - Look for:
- Class-level documentation (usually after
class ClassName) - Method documentation (usually comments above or near methods)
- Member variable documentation (inline comments or above declarations)
- Class-level documentation (usually after
- ADAPT the spine-cpp documentation to GDScript:
- Convert C++ terminology to GDScript terminology
- Adjust examples to use GDScript syntax
- Keep the technical accuracy and detail from the original documentation
- For Godot-specific additions (signals, properties not in spine-cpp), document based on implementation
- Create or update the XML documentation following Godot's documentation format
- Ensure all bound methods, properties, signals, and enum constants are documented
- Check off the item in the checklist after completing its documentation
CRITICAL RULE FOR DOCUMENTATION
DO NOT WRITE GENERIC OR VAGUE DOCUMENTATION! You must:
- Copy the actual documentation from spine-cpp headers
- Preserve technical details about what each method/property does
- Explain the purpose and behavior as documented in spine-cpp
- Only write your own documentation for Godot-specific features not in spine-cpp
Documentation Checklist
Instructions: Update this checklist every time before processing documentation updates. Check the box [x] when documentation is complete and up-to-date.
Classes with Existing Documentation
Based on files in spine_godot/docs/:
- SpineAnimation -
spine_godot/SpineAnimation.hโspine-cpp/include/spine/Animation.h - SpineAnimationState -
spine_godot/SpineAnimationState.hโspine-cpp/include/spine/AnimationState.h - SpineAnimationTrack -
spine_godot/SpineAnimationTrack.hโ (Godot wrapper specific) - SpineAtlasResource -
spine_godot/SpineAtlasResource.hโspine-cpp/include/spine/Atlas.h - SpineAttachment -
spine_godot/SpineAttachment.hโspine-cpp/include/spine/Attachment.h - SpineBone -
spine_godot/SpineBone.hโspine-cpp/include/spine/Bone.h - SpineBoneData -
spine_godot/SpineBoneData.hโspine-cpp/include/spine/BoneData.h - SpineBoneNode -
spine_godot/SpineBoneNode.hโ (Godot node wrapper) - SpineConstraintData -
spine_godot/SpineConstraintData.hโspine-cpp/include/spine/ConstraintData.h - SpineEvent -
spine_godot/SpineEvent.hโspine-cpp/include/spine/Event.h - SpineIkConstraint -
spine_godot/SpineIkConstraint.hโspine-cpp/include/spine/IkConstraint.h - SpineIkConstraintData -
spine_godot/SpineIkConstraintData.hโspine-cpp/include/spine/IkConstraintData.h - SpinePathConstraint -
spine_godot/SpinePathConstraint.hโspine-cpp/include/spine/PathConstraint.h - SpinePathConstraintData -
spine_godot/SpinePathConstraintData.hโspine-cpp/include/spine/PathConstraintData.h - SpineSkeleton -
spine_godot/SpineSkeleton.hโspine-cpp/include/spine/Skeleton.h - SpineSkeletonDataResource -
spine_godot/SpineSkeletonDataResource.hโspine-cpp/include/spine/SkeletonData.h - SpineSkeletonFileResource -
spine_godot/SpineSkeletonFileResource.hโ (Godot resource loader) - SpineSkin -
spine_godot/SpineSkin.hโspine-cpp/include/spine/Skin.h - SpineSlot -
spine_godot/SpineSlot.hโspine-cpp/include/spine/Slot.h - SpineSlotData -
spine_godot/SpineSlotData.hโspine-cpp/include/spine/SlotData.h - SpineSlotNode -
spine_godot/SpineSlotNode.hโ (Godot node wrapper) - SpineSprite -
spine_godot/SpineSprite.hโ (Main Godot node for Spine animations) - SpineTimeline -
spine_godot/SpineTimeline.hโspine-cpp/include/spine/Timeline.h - SpineTrackEntry -
spine_godot/SpineTrackEntry.hโ (Part of AnimationState) - SpineTransformConstraint -
spine_godot/SpineTransformConstraint.hโspine-cpp/include/spine/TransformConstraint.h - SpineTransformConstraintData -
spine_godot/SpineTransformConstraintData.hโspine-cpp/include/spine/TransformConstraintData.h
Classes Missing Documentation (Have _bind_methods but no .xml file)
These classes have _bind_methods() in their headers but lack documentation:
Data Classes
- SpineEventData -
spine_godot/SpineEventData.hโspine-cpp/include/spine/EventData.h- Setup pose data for events
Physics Classes (New in 4.x)
- SpinePhysicsConstraint -
spine_godot/SpinePhysicsConstraint.hโspine-cpp/include/spine/PhysicsConstraint.h- Runtime physics constraint
- SpinePhysicsConstraintData -
spine_godot/SpinePhysicsConstraintData.hโspine-cpp/include/spine/PhysicsConstraintData.h- Setup data for physics constraints
- SpinePhysicsConstraintPose -
spine_godot/SpinePhysicsConstraintPose.hโspine-cpp/include/spine/PhysicsConstraintPose.h- Physics constraint pose state
Slider Classes (New in 4.x)
- SpineSlider -
spine_godot/SpineSlider.hโspine-cpp/include/spine/Slider.h- Runtime slider for property animation
- SpineSliderData -
spine_godot/SpineSliderData.hโspine-cpp/include/spine/SliderData.h- Setup data for sliders
- SpineSliderPose -
spine_godot/SpineSliderPose.hโspine-cpp/include/spine/SliderPose.h- Slider pose state
Pose Classes
- SpineBoneLocal -
spine_godot/SpineBoneLocal.hโspine-cpp/include/spine/BoneLocal.h- Local bone transform data
- SpineBonePose -
spine_godot/SpineBonePose.hโspine-cpp/include/spine/BonePose.h- Bone pose state
- SpineIkConstraintPose -
spine_godot/SpineIkConstraintPose.hโspine-cpp/include/spine/IkConstraintPose.h- IK constraint pose state
- SpinePathConstraintPose -
spine_godot/SpinePathConstraintPose.hโspine-cpp/include/spine/PathConstraintPose.h- Path constraint pose state
- SpineSlotPose -
spine_godot/SpineSlotPose.hโspine-cpp/include/spine/SlotPose.h- Slot pose state
- SpineTransformConstraintPose -
spine_godot/SpineTransformConstraintPose.hโspine-cpp/include/spine/TransformConstraintPose.h- Transform constraint pose state
Constants/Enums Class
- SpineConstant -
spine_godot/SpineConstant.hโ (Godot-specific constants)- Exposes Spine enums and constants to GDScript (MixBlend, MixDirection, Property, etc.)
Classes to Skip (Internal/Editor Only)
These have _bind_methods() but should NOT have user-facing documentation:
- SpineCommon - Internal base classes and utilities
- SpineEditorPlugin - Editor-only functionality
Documentation Template
When creating new documentation files, use this template:
<?xml version="1.0" encoding="UTF-8" ?>
<class name="SpineClassName" inherits="RefCounted" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description>
One-line description of the class purpose.
</brief_description>
<description>
Detailed description of the class.
Include usage context and relationship to other Spine classes.
For wrapper classes, explain what Spine runtime feature this exposes.
</description>
<methods>
<method name="method_name">
<return type="return_type" />
<param index="0" name="param_name" type="param_type" />
<description>
Method description. Check _bind_methods() for exact signature.
</description>
</method>
</methods>
<members>
<member name="property_name" type="property_type" setter="set_property" getter="get_property">
Property description. Must match ADD_PROPERTY in _bind_methods().
</member>
</members>
<signals>
<signal name="signal_name">
<param index="0" name="param_name" type="param_type" />
<description>
Signal description. Must match ADD_SIGNAL in _bind_methods().
</description>
</signal>
</signals>
<constants>
<constant name="CONSTANT_NAME" value="0" enum="EnumName">
Constant description. Must match BIND_ENUM_CONSTANT in _bind_methods().
</constant>
</constants>
</class>Validation Steps
After updating documentation:
- Verify every method in
_bind_methods()has corresponding documentation - Check that all
ADD_PROPERTYcalls have corresponding member documentation - Verify all
ADD_SIGNALcalls have corresponding signal documentation - Ensure all
BIND_ENUM_CONSTANTcalls have corresponding constant documentation - Test that property setters/getters match the actual implementation
- Validate that examples (if provided) are valid GDScript code
Important Notes
Identifying What to Document
- Run
grep -l "_bind_methods" spine_godot/Spine*.hto get the definitive list - The presence of
_bind_methods()is the key indicator that a class needs documentation - Even if a class seems internal, if it has
_bind_methods()it's exposed to users
Class Categories
- Core Runtime Classes: SpineSkeleton, SpineAnimation, SpineBone, etc.
- Data Classes: Classes ending in "Data" that hold setup/configuration
- Pose Classes: Classes ending in "Pose" that represent runtime state
- Constraint Classes: IK, Path, Transform, Physics constraints
- Resource Classes: Atlas, SkeletonData, SkeletonFile resources
- Node Classes: SpineSprite, SpineBoneNode, SpineSlotNode (Godot scene nodes)
- Constants Class: SpineConstant (enum definitions)
Version Considerations
- Physics constraints and sliders are new in Spine 4.x
- Some features may not be available in all Spine versions
- Documentation should note version requirements where applicable
Running the Documentation Update
To use this guide:
- Run
grep -l "_bind_methods" spine_godot/Spine*.h | sortto get current list - Compare with existing .xml files in
spine_godot/docs/ - Update this checklist based on findings
- For each unchecked item, create or update the XML documentation
- Focus on the
_bind_methods()implementation to ensure accuracy - Mark items as complete when documentation is finished
- Commit with message indicating which classes were documented
Remember: The presence of _bind_methods() is the definitive indicator that a class needs documentation.
--- METRICS ---
- Files Extracted: 2
- Estimated Token Budget: ~3869 tokens
- Canonical Reference: https://codewiki.google/github.com/EsotericSoftware/spine-runtimes