littlektframework / littlekt

A multiplatform WebGPU 2D game framework written in Kotlin. Build your own game engine on top.
https://littlekt.com
Apache License 2.0
321 stars 12 forks source link

AssetProvider is not fully loaded while the job is active #273

Open yufimtsev opened 3 months ago

LeHaine commented 2 months ago

I need to look into the AssetProvider a bit more as it's still a bit janky for my liking. The job active check was omitted, originally, as the thought was you could load assets at a later time initially loading a bunch of assets at the start.

yufimtsev commented 1 month ago

My only issue was that after this commit it became impossible to tell if AssetProvider is truly fully loaded without using onFullyLoaded callback (before the change assetsToPrepare were cleared once all the prepare() calls are finished, and after the change it is cleared ahead of preparing all the assets, flipping the fullyLoaded to true).