You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using (https://icculus.org/physfs/)[PhysicsFS] in a project that i'm compiling with Emscripten and i'm curious about lazy-loading assets. Has anyone worked with this kind of asset loading? I mean, maybe i can write some JS code that will load the files into the virtual filesystem of the project, allowing the user to cache the project code, but not the assets. Right now, if i change an asset, i have to recompile everything and then clear the cache.
The text was updated successfully, but these errors were encountered:
I did lazy-loading for a previous project. From a high-level it went something like:
implement the notion of a virtual file system, mapping an MEMFS mount point to base URL
for each file request, check whether it already exits in the MEMFS, if it does return it
if it doesn't exist create a emscripten_async_wget request, storing the result in the MEMFS, with a completion callback
That's simplifying it, since behind the scenes the preloader would wait until all associated assets were loaded (and was able to load, say, *.txt from a given root by having serialised directory listings). In use it works quite well, with assets being cached by the browser for the next load.
This issue has been automatically marked as stale because there has been no activity in the past 2 years. It will be closed automatically if no further activity occurs in the next 7 days. Feel free to re-open at any time if this issue is still relevant.
I'm using (https://icculus.org/physfs/)[PhysicsFS] in a project that i'm compiling with Emscripten and i'm curious about lazy-loading assets. Has anyone worked with this kind of asset loading? I mean, maybe i can write some JS code that will load the files into the virtual filesystem of the project, allowing the user to cache the project code, but not the assets. Right now, if i change an asset, i have to recompile everything and then clear the cache.
The text was updated successfully, but these errors were encountered: