• Content count

  • Joined

  • Last visited

  1. RemoveListener for Spine animations

    Yes, it is my problem if I forget that I already have listener with the same name. I think variant - "spine.removeListener({complete: 'log'})" (event name and listener name) - is the best way and pretty obvious one. And "spine.removeListener({complete: ['log', 'update'], start: 'playSound'})" to remove multiple events. Perhaps is it possible to upgrade clearListeners function , so it takes event name as an argument and as result removes all listeners subscribed to this particular event?
  2. RemoveListener for Spine animations

    Need some time to think about it. I think about "spine.removeListener({complete: log})" But we can add "log" twice or more in one "complete", and then our removeListener must remove all "log"s in "complete" or just the last one. Maybe it is possible to do like in DOM addEventListener, when you add new listener on the same event with the same listener name it removes old one and push new one instead of it .
  3. RemoveListener is works, but only in one way: let spine // our spine animation let log = () => console.log('nonsense'); let listener = {complete: log}; spine.state.addListener(listener); And removes it like spine.state.removeListener(listener); It does not work if i do it like this: let spine //our spine animation let log = () => console.log('nonsense'); spine.state.addListener({complete: log}); // trying to remove spine.state.addListener(log); // or just like this spine.state.addListener({complete: log}); Works fine if add and remove only the same object, but its long way. Is there another way to do this?
  4. One atlas many json for spine

    Thanks! All is fine.
  5. One atlas many json for spine

    I want to use one atlas for many spine animations in my game. I found the way how to do it with loader. I am loaded atlas with game loader (name other.atlas) and got in game.loader.resources.other. Then i am trying to load json file of my animation from console. otherLoader = new PIXI.loaders.Loader() spineLoaderOptions = { metadata: { spineAtlas: 'game.loader.resources.other' } }; otherLoader.add('someJson', 'static/img/content/fullHD/machine/elements/testJ.json', spineLoaderOptions) .load() But it will not work. Loader still wants to load atlas with name of my json. GET http://localhost:3004/static/img/content/fullHD/machine/elements/testJ.atlas 404 (Not Found) I think it is because of atlas parser . I need varibale "pages" in my metadataAtlas, but there is no pages. How atlas data looks like in console. I am doing something wrong and i dont know what.