Estella 0.113.0
A fast 2D and 3D game engine powered by WebAssembly and ECS
Loading...
Searching...
No Matches
SpineRuntimeCpp.cpp File Reference

The SpineRuntime backend for spine-cpp, which 4.3 made the only runtime. More...

#include "./SpineRuntime.hpp"
#include <spine/spine.h>
#include <spine/PhysicsConstraintData.h>
#include <spine/SkeletonRenderer.h>
#include <vector>
Include dependency graph for SpineRuntimeCpp.cpp:

Go to the source code of this file.

Classes

struct  es::spine::Skeleton
struct  es::spine::Instance

Namespaces

namespace  es
namespace  es::spine

Functions

void es::spine::destroy (Skeleton *skeleton)
void es::spine::destroy (Instance *instance)
Skeleton * es::spine::loadSkeleton (const void *skeletonData, int length, const char *atlasText, int atlasLength, bool binary, std::string &error)
int es::spine::atlasPageCount (const Skeleton *skeleton)
const char * es::spine::atlasPageName (const Skeleton *skeleton, int page)
void es::spine::setAtlasPageTexture (Skeleton *skeleton, int page, uint32_t texture, int width, int height)
void es::spine::setDefaultMix (Skeleton *skeleton, float seconds)
void es::spine::setMixDuration (Skeleton *skeleton, const char *from, const char *to, float seconds)
Instance * es::spine::createInstance (Skeleton *skeleton)
void es::spine::advanceAndApply (Instance *instance, float dt)
void es::spine::materializeWorldPose (Instance *instance, float dt)
void es::spine::update (Instance *instance, float dt)
float es::spine::animationDuration (const Skeleton *skeleton, const char *animation)
bool es::spine::requiresContinuousWorldPose (const Skeleton *skeleton)
void es::spine::setToSetupPose (Instance *instance)
bool es::spine::playAnimation (Instance *instance, const char *animation, bool loop, int track)
bool es::spine::addAnimation (Instance *instance, const char *animation, bool loop, float delay, int track)
void es::spine::setSkin (Instance *instance, const char *skin)
void es::spine::setTrackAlpha (Instance *instance, int track, float alpha)
void es::spine::setEventSink (EventSink sink)
const void * es::spine::eventSource (Instance *instance)
void es::spine::enableEvents (Instance *instance)
int es::spine::animationCount (const Instance *instance)
const char * es::spine::animationName (const Instance *instance, int index)
int es::spine::skinCount (const Instance *instance)
const char * es::spine::skinName (const Instance *instance, int index)
bool es::spine::bonePosition (const Instance *instance, const char *bone, float *x, float *y)
bool es::spine::boneRotation (const Instance *instance, const char *bone, float *degrees)
int es::spine::boneCount (const Instance *instance)
const char * es::spine::boneName (const Instance *instance, int index)
int es::spine::boneParent (const Instance *instance, int index)
bool es::spine::bonePose (const Instance *instance, int index, float *x, float *y, float *degrees, float *length)
void es::spine::bounds (const Instance *instance, float *x, float *y, float *width, float *height)
int es::spine::constraintCount (const Instance *instance, ConstraintKind kind)
const char * es::spine::constraintName (const Instance *instance, ConstraintKind kind, int index)
bool es::spine::transformMix (const Instance *instance, const char *name, TransformMix *out)
bool es::spine::setTransformMix (Instance *instance, const char *name, const TransformMix &mix)
bool es::spine::pathMix (const Instance *instance, const char *name, PathMix *out)
bool es::spine::setPathMix (Instance *instance, const char *name, const PathMix &mix)
bool es::spine::setAttachment (Instance *instance, const char *slot, const char *attachment)
bool es::spine::setIkTarget (Instance *instance, const char *constraint, float x, float y, float mix)
bool es::spine::setSlotColor (Instance *instance, const char *slot, float r, float g, float b, float a)
bool es::spine::setSkeletonColor (Instance *instance, float r, float g, float b, float a)
void es::spine::render (Instance *instance, TriangleSink &sink, bool clipping)
bool es::spine::renderStage (Instance *instance, TriangleSink &sink, bool clipping, int stage, ProbeCounts *counts)
bool es::spine::poseStage (Instance *instance, float dt, int stage, PoseCounts *counts)
bool es::spine::clipStorage (ClipStorage *out)
bool es::spine::renderCounted (Instance *instance, TriangleSink &sink, bool clipping, ProbeCounts *counts)
bool es::spine::clipStartStage (Instance *instance, int stage, ClipStartCounts *counts)
bool es::spine::skeletonBounds (const Skeleton *skeleton, float *x, float *y, float *width, float *height)
int es::spine::version ()

Detailed Description

The SpineRuntime backend for spine-cpp, which 4.3 made the only runtime.

4.3 retired the hand-written C runtime and regenerated spine-c as a wrapper over the C++ one. Binding the wrapper would buy nothing here — this TU is already C++ — so it binds spine-cpp directly.

The release also brought SkeletonRenderer, which walks the draw order, poses every attachment and applies clip regions. That is the whole of what the spine-c backend does by hand, so render() below is a translation of its RenderCommand list rather than a second copy of the traversal.

4.3 also moved a bone's world transform and a slot's colour onto pose objects, and reordered EventType so Dispose precedes Complete. The seam's normalized EventKind is why that reordering stops here instead of reaching the SDK.

Author
ESEngine Team
Date
2026

Definition in file SpineRuntimeCpp.cpp.