This is mostly an internal class. TypeSprite normaly takes care of all calles you find here.

ResourceManager takes care of all resources. It's tightly coupled with World and WorldManager class and ensures that assets are loaded and available if needed.

It's possible to have multiple resource of the same file.

// Usage:

const res = new ResourceManager();
res.addLoader(new MyLoader1());
res.addLoader(new MyLoader2());

res.request('myOwner', ['loader1:path/to/file', 'loader2:path/to/file']).then(numFailed => {...});


  • ResourceLoader
  • SubResourceLoader


  • ResourceManager



loaders: Map<string, ResourceLoader> = ...
maxParallel: number = 8
pendingHeartbeat: any = null
pendingRequests: RequestSet[] = []
requireChain: RequireChain = ...
rootPath: string = ""


  • Requires all resources. If they are not yet loaded they'll be put into the loading queue.

    The callback return is called in sync if all resources are were loaded (or failed).

    The ownerId is the world, resource, etc. that holds the resource.


    • ownerId: string
    • resUrls: string[]
    • cb: ((number: any) => void)
        • (number: any): void
        • Parameters

          • number: any

          Returns void

    Returns void

Generated using TypeDoc