royibernthal Posted June 20, 2017 Share Posted June 20, 2017 Does renderer.plugins.prepare have something like on('progress', ...) or another way to track its progress? Quote Link to comment Share on other sites More sharing options...
megmut Posted June 21, 2017 Share Posted June 21, 2017 I have gone through the git repo and the documentation and I can't see anything. All that seems to be available is a 'done' callback on the upload function. That being said, if you extend the prepare class, and in the constructor, pass an event / signal.. you could add it to line 155 of http://pixijs.download/release/docs/prepare_BasePrepare.js.html. Then, every time an uploaded item is pushed to the completes array, your event will fire.. and you could pass a parameter of 'this.completes.length / this.queue.length * 100'. This would give you a percentage of the prepare completion. Just a thought Quote Link to comment Share on other sites More sharing options...
themoonrat Posted June 21, 2017 Share Posted June 21, 2017 Indeed. I personally keep a count of how many textures I've passed to prepare, then count how many callbacks I've received when they've done, voila a percentage. Quote Link to comment Share on other sites More sharing options...
royibernthal Posted June 22, 2017 Author Share Posted June 22, 2017 I'll try that, thanks 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.