Hello,
According to the docs, the purpose of the loader.add(...) function is to enqueue something for loading.
What is the point of "enqueueing" something when doing so multiple times throws an error like
Error: Cannot add resources while the loader is running.. Why should the loader being in an active processing state stop enqueuement?
The word enqueue suggests Buffering the work items until the processor is ready, after which the processor pops (i.e array.unshift) the next work item off the list, and on it goes.
My use case is that I am using Pixi.js, which uses this library, to load textures somewhat adhoc as needed.
Could you shed more light on this "Error: Cannot add resources while the loader is running." error? I'd like to learn why it was implemented this way so I know whether to make a PR to improve on this behavior.
Thanks for the tool.
Hello,
According to the docs, the purpose of the loader.add(...) function is to enqueue something for loading.
What is the point of "enqueueing" something when doing so multiple times throws an error like
Error: Cannot add resources while the loader is running.. Why should the loader being in an active processing state stop enqueuement?The word enqueue suggests Buffering the work items until the processor is ready, after which the processor pops (i.e array.unshift) the next work item off the list, and on it goes.
My use case is that I am using Pixi.js, which uses this library, to load textures somewhat adhoc as needed.
Could you shed more light on this "Error: Cannot add resources while the loader is running." error? I'd like to learn why it was implemented this way so I know whether to make a PR to improve on this behavior.
Thanks for the tool.