Skip to content

Ability to provide a replacement XHRLoader for the loader plugin. #5453

Description

@Coderah

Hi! I am using the Cache api (https://developer.mozilla.org/en-US/docs/Web/API/Cache) to have full control over caching and management of my 500mb+ game assets. However there is no feasible way (that I'm currently aware of or able to find) to have Phaser's normal asset system, which handles MultiAtlas and many other types quite well, be able to get files from something other than the internal XHRLoader. I was expecting File would reference the Phaser.Loader so I could at least override the xhr loader there and hack in my own approach.

Given that I was thinking it might be awesome to have the Loader plugin have a more generic approach allowing us to implement our own network (or otherwise) based loader handlers. I assume this might have implications on progress reporting and such. But most of it seems generic enough already, there's just no place to override the actual loader method.

If I can find the time I'll take a stab at a PR or at least API suggestion, but I'm not confident about my overall knowledge of the entire Loader system and would be afraid to do so without a lot of time to really grasp more.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions