Open mnordine opened 4 years ago
@AndrewLugg I have this working as well, you can see some commits here: https://github.com/mnordine/StageXL/commits/cancellation
9d87653ec33ce47c978e76b03e79973d3ae2fe3d a6590c78938318572f9dc6c1e6b04adf346f6676 a945fdcda8e94988d16c17251fd92d4936f5f64f e66e2000b8ff48510f55fa8b94ad3cf2d732dd85 ed69280d13043c2cbab73ea48d28c47eed6a31d4 639398ea9aa825eb19aaf7ca0888fd695902baae ec4c48f8d25680d96e42b0f4e16b8482e0a40acd ae79f6a79d722e0025aea00a344019380abfa688
I have put some work in on this feature, it will currently be able to cancel assets that are downloaded using the imageBitmap feature as it uses a HTTP request, I haven't got the cancel working on ImageElement as Image elements are trickier to cancel. I got it working with Texture Atlas's as well.
Currently doesn't do anything with other assets such as audio.
It will also add progress for images, which will return a percentage completed of the image if it supports it.
https://github.com/bp74/StageXL/tree/cancellable-assets