All retrieved data in m7BootStrap can be accessed via:
bootstrap.data
// or
bootstrap.packages.dataBoth properties are aliases that point to the same PackageData instance — the central in-memory registry for all loaded packages, assets, and modules.
You can either:
- Access the underlying
Mapobjects directly via class properties - Or use the convenience methods documented below for filtered and structured lookups
The following Map registries are available on bootstrap.data:
| Property | Key Type | Value Type | Description |
|---|---|---|---|
packages |
string |
object |
Loaded package metadata by internal ID |
assets |
string |
any |
Loaded asset content by internal ID |
assetsMeta |
string |
EntryMeta |
Asset metadata records |
modules |
string |
any |
Loaded JS module references |
modulesMeta |
string |
EntryMeta |
Module metadata records |
data.listPackages(filter?)Returns an array of package IDs, optionally filtered.
Example:
data.listPackages(meta => meta.loaded);data.getPackages(filter?)Returns all packages as { id: PackageEntry } objects, with assets and modules included.
Example:
const pkgs = data.getPackages({ type: "scene" });data.getPackage(id)Returns a single PackageEntry by package ID.
Example:
const uiPkg = data.getPackage("ui-kit");data.package_isLoaded(id)Boolean: checks if a package is loaded.
Example:
if (!data.package_isLoaded("ui-kit")) {
console.log("Package not yet loaded");
}data.package_setLoaded(id)Marks a package's meta.loaded = true.
Example:
data.package_setLoaded("ui-kit");data.getAssets(filter?)Returns all assets, optionally filtered by predicate or partial object.
Example:
const textures = data.getAssets(meta => meta.type === "texture");data.getAsset(id)Returns a single AssetEntry by internal asset ID.
Example:
const logo = data.getAsset("pkg1:logo.png");data.getPackageAssets(pkgId, filter?)Returns all assets loaded by a specific package, optionally filtered.
Example:
const pkgTextures = data.getPackageAssets("pkg1", { type: "texture" });data.getPackageAsset(pkgId, originalId)Looks up an asset by its original (un-prefixed) ID within a package.
Example:
const logo = data.getPackageAsset("pkg1", "logo.png");data.getModules(filter?)Returns all modules, optionally filtered.
Example:
const uiModules = data.getModules(meta => meta.category === "ui");data.getModule(id)Returns a single ModuleEntry by internal module ID.
Example:
const renderer = data.getModule("pkg1:renderer");data.getPackageModules(pkgId, filter?)Returns all modules loaded by a specific package, optionally filtered.
Example:
const mathModules = data.getPackageModules("pkg1", { category: "math" });data.getPackageModule(pkgId, originalId)Looks up a module by its original (un-prefixed) ID within a package.
Example:
const initFn = data.getPackageModule("pkg1", "init");Any method with a filter parameter accepts:
- A predicate function
(meta, id) => boolean - A shallow partial object
{ key: value, ... } null/undefinedto match all entries
Filtering always matches against the meta object.