Greetings,
I am attempting to use the java script run time (html5 canvas or webGL). Unfortunately I am unable to get it to work at all, as it says it cannot find the region. Full error below.
I tried exporting many times, made changes, adjusted names, did everything I could think of but didn't end up solving it.
this is my skeleton, atlas and images. Files are hosted here for 6 days.
https://filebin.net/vbluh383e3jpojxs
my error is as follows:
Error: Region not found in atlas: Body (region attachment: Body)
at AtlasAttachmentLoader.newRegionAttachment (https://unpkg.com/@esotericsoftware/spine-canvas@4.0.*/dist/iife/spine-canvas.js:3851:15)
here is my script:
` // Load the Spine atlas and skeleton JSON data
var atlasUrl = "hero-ess.atlas";
var skeletonUrl = "hero-ess.json";
// Create a new Spine atlas and skeleton
var atlas = new spine.TextureAtlas(atlasUrl, function (path) {
// Load image files here, if needed
// return new Image();
});
var attachmentLoader = new spine.AtlasAttachmentLoader(atlas);
// Load the skeleton JSON data
var skeletonJson = await fetch(skeletonUrl).then(response => response.json());
var skeletonData = new spine.SkeletonJson(attachmentLoader).readSkeletonData(skeletonJson);
var skeleton = new spine.Skeleton(skeletonData);
// Create a Spine WebGL renderer
var renderer = new spine.webgl.SceneRenderer(canvasId, context);
// Set the Spine skeleton and default animation
var stateData = new spine.AnimationStateData(skeleton.data);
var state = new spine.AnimationState(stateData);
state.setAnimation(0, "idle", true);
// Render the Spine skeleton
renderer.camera.position.z = 10;
renderer.drawSkeleton(skeleton);
renderer.camera.position.z = 0;
console.log("Canvas setup complete asynchronously");`