Loader is the normal resource-loading entrypoint.
- queue named resources by
ResourceTypes - delegate decoding/creation to typed factories
- populate a
ResourceContainer - optionally use a
Databaseimplementation for persistence
await loader
.add(ResourceTypes.image, { logo: 'images/logo.png' })
.load()LoaderOptionsResourceFactoryResourceContainerDatabase
add(type, items, options?)load(callback?)loadItem(queueItem)addFactory(type, factory)getFactory(type)reset(...)destroy()
- resource path prefixing is controlled by
resourcePath - persistence is optional and explicit
- loader factories are the type boundary for resource creation