Hi everyone,
Would you please tell me if this is correct flow: If I make a scene in a web player, different skeletons meant to interact with each other?
Every skeleton should have its own player, right? Basically I just take user input or whatever game event happens and pass it to a skeleton to play specific animation?
What about moving in the world and rendering multiple skeletons at the same scale?
I have two characters, both of them from an equal sized png and their scale is approximately the same.
I used two spine renderers with similar configs and viewport sizes, but one of character renders bigger then the other one.
var german = new spine.SpinePlayer("first-character", {
alpha: true, // Enable player translucency
backgroundColor: "#00000000", // Background is fully transparent
skeleton: "/files/1/export/menu/skeleton.json",
atlas: "/files/1/export/menu/skeleton.atlas",
premultipliedAlpha: true,
preserveDrawingBuffer: true,
defaultMix: 1,
showControls: false,
viewport: {
width: 600,
height: 600,
},
success: function (player) {
console.log("Spine animation loaded successfully");
},
error: function (player, reason) {
console.error("Failed to load Spine animation:", reason);
}
});