Jenson Posted December 3, 2019 Share Posted December 3, 2019 Hi everyone! I have some problem with pixi.js spine event. I am using generated spine json file by another source. Anyway, it has some user defined events. (Added image file) I want to customize event end result. How can I do this? Thanks. Quote Link to comment Share on other sites More sharing options...
jonforum Posted December 3, 2019 Share Posted December 3, 2019 https://github.com/pixijs/pixi-spine/blob/master/examples/spine_events.md Jenson 1 Quote Link to comment Share on other sites More sharing options...
Jenson Posted December 6, 2019 Author Share Posted December 6, 2019 Hi jonforum. Thanks for your reply. I want to remove last event data. In the above image, I wanna remove "color" event How can I do this? Quote Link to comment Share on other sites More sharing options...
jonforum Posted December 6, 2019 Share Posted December 6, 2019 (edited) If you talk about spine software ? you can remove you event by select your event and click delete icon. (delete key not work in old spine version) If you talk about the api, if you manage one spine events per listener (not recommended in most case) and you want remove. you can do spine.state.removeListener(listener); Or the best and cleaner way for me is use one listener for all events and just a Switch to call method associate.And just avoid include your "color" event Example code. const checkEvent = (entry, event) => { switch (event.data.name) { case 'eventName0': // call a method when "eventName0":fired! break; case 'eventName1': break; case 'eventName44': break; default:break; } }; spine.state.addListener({ event: checkEvent, }); Edited December 6, 2019 by jonforum Quote Link to comment Share on other sites More sharing options...
Jenson Posted December 6, 2019 Author Share Posted December 6, 2019 Here is my record url https://www.dropbox.com/s/9l5v0w42b7d1nki/2019-12-07 06-36-06.mp4?dl=0 I want to stop the circle at the "ENCORE FREE SPIN" How can I do that? Thanks Quote Link to comment Share on other sites More sharing options...
jonforum Posted December 7, 2019 Share Posted December 7, 2019 am not understand sorry Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted December 9, 2019 Share Posted December 9, 2019 Oh, you want to stop something on event? Sorry, not possible. Please ask it at https://esotericsoftware.com/forum/ , its a problem for all runtimes, not only pixijs. Jenson 1 Quote Link to comment Share on other sites More sharing options...
Jenson Posted December 10, 2019 Author Share Posted December 10, 2019 Oh. Really? ? I stopped the animation manually. PIXI.spine.autoUpdate = false; hehe Anyway, thanks for your supporting. ? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.