🙂 Hi guys im using PlayerSpine 4.1.10 to render game character from atlas , json , and png file to my Reactjs app . However I
cannot load things to render from 4.0.45 json and atlas file .Assets I download from your website work normally like spineboy or alien.json 4.0.31.
Please expain for me ! Tks
Here my code
import React, { useEffect } from 'react';
import { SpinePlayer } from '@esotericsoftware/spine-player';
const Character = () => {
//// Here no work
useEffect(() => {
const test = () => {
new SpinePlayer('player-container', {
jsonUrl: "/Dragon_Male.json",
atlasUrl: "/Dragon_Male.atlas",
animation: "Idle_0",
showControls: false,
});
}
test()
}, [])
// useEffect(() => {
// const test1 = () => {
// new SpinePlayer('bb', {
// jsonUrl: "/alien-ess.json",
// atlasUrl: "/alien.atlas",
// animation: "death",
// showControls: false,
// });
// }
// test1()
// }, []) // Work normally
return <div className="spine" id="player-container">
<div className="bb" id="bb" style={{marginTop: '50px'}}>
</div>
</div>;