melonJS
    Preparing search index...

    Function isLoaded

    • Whether every asset of a bundle is in memory, however it got there (by this bundle, another one, or the old way) — so a game can skip a loading screen it does not need. false again as soon as one of them is unloaded, by a bundle or on its own. An empty bundle is always loaded.

      Parameters

      • id: string

        the bundle id

      Returns boolean

      true if every asset of the bundle is loaded

      when no bundle is declared under that id

      if (!loader.isLoaded("level2")) {
      await loader.preload(["level2"]); // with the loading screen
      }
      level.load("level2");