[tests] No explicit skeleton.setupPose() call.

This commit is contained in:
Mario Zechner 2025-07-22 01:53:02 +02:00
parent ddf4c50954
commit 235aa7b928
6 changed files with 7 additions and 8 deletions

View File

@ -106,8 +106,6 @@ int main(int argc, char *argv[]) {
// Create skeleton instance
Skeleton skeleton(*skeletonData);
skeleton.setupPose();
// Set animation if provided
AnimationState *state = nullptr;
AnimationStateData *stateData = nullptr;

View File

@ -97,7 +97,7 @@ int main() {
// spine_skeleton_data_result result = spine_skeleton_data_load_binary(atlas, skeleton_bytes, skeleton_length);
uint8_t *skeleton_bytes = read_file("data/spineboy-pro.json", &skeleton_length);
spine_skeleton_data_result result2 = spine_skeleton_data_load_json(atlas, (const char *) skeleton_bytes);
spine_skeleton_data_result result2 = spine_skeleton_data_load_json(atlas, (const char *) skeleton_bytes, "data/");
spine_skeleton_data skeleton_data = spine_skeleton_data_result_get_data(result2);
// Create a skeleton from the data, set the skeleton's position to the bottom center of

View File

@ -80,14 +80,16 @@ int main() {
skeleton.setPosition(width / 2, height - 100);
skeleton.setScaleX(0.3);
skeleton.setScaleY(0.3);
skeleton.setupPose();
// Create an AnimationState to drive animations on the skeleton. Set the "portal" animation
// on track with index 0.
AnimationStateData animationStateData(skeletonData);
animationStateData.setDefaultMix(0.2f);
AnimationState animationState(&animationStateData);
animationState.setAnimation(0, "portal", true);
animationState.addAnimation(0, "run", true, 0);
// animationState.setAnimation(0, "portal", true);
// animationState.addAnimation(0, "run", true, 0);
animationState.setAnimation(0, "idle", true);
// Create the renderer and set the viewport size to match the window size. This sets up a
// pixel perfect orthogonal projection for 2D rendering.

View File

@ -137,8 +137,6 @@ public class HeadlessTest implements ApplicationListener {
// Create skeleton instance
Skeleton skeleton = new Skeleton(skeletonData);
skeleton.setupPose();
// Set animation if provided
AnimationState state = null;
if (animationName != null) {

View File

@ -193,7 +193,7 @@ function generateJavaFromIR (ir: SerializerIR): string {
javaOutput.push(' json.writeValue(visitedObjects.get(obj));');
javaOutput.push(' return;');
javaOutput.push(' }');
// Generate reference string for this object (only when first encountered)
// Only use name if there's a proper getName() method returning String
const nameGetter = method.properties.find(p =>

View File

@ -1,3 +1,4 @@
- c++ clipping appears broken, try with portal animation in spine-glfw
- spine-c/codegen type extractor should also report typedefs like typedef long long PropertyId; so primitive type to some name, and we need to handle that in the codegen
- Generate language bindings in spine-c/codegen
- Use CClassOrStruct, CEnum that get generated from spine-cpp-types.json and generate