Skip to main content

Module resource

Module resource 

Source
Expand description

Runtime resource tables (per-kind, handle-indexed views of the blob’s resource stream). pub so the editor’s in-memory build path can construct the tables it inserts into the world, mirroring the shipped-runtime loader.

Structs§

AudioClipTable
A handle-indexed table of one resource kind.
ColorLutSources
Dev-only source catalogue for the singleton ColorLut, inserted by the in-memory (cn debug / editor) build so GraphicsSystem::init can seed the hot-reload watcher now that ColorLut is a resource without a drained source field. The raw authored source path of the first declared ColorLut, or None. Absent in the shipped disk runtime, which does not hot-reload.
ColorLutTable
A handle-indexed table of one resource kind.
EnvironmentMapSourceInfo
One file-backed EnvironmentMap’s re-bake inputs, captured dev-only so the hot-reload watcher can re-run the IBL convolution with the same dimensions the build used (a size change would invalidate the shader’s prefilter-mip assumptions).
EnvironmentMapSources
Dev-only source catalogue for the singleton EnvironmentMap. Some only for a file-backed map (a procedural generator has nothing to watch). Mirrors ColorLutSources; absent in the shipped disk runtime.
EnvironmentMapTable
A handle-indexed table of one resource kind.
FontTable
A handle-indexed table of one resource kind.
MaterialNames
Dev-only catalogue of material identities, in MaterialHandle order: the interned asset name of each compiled Material. A material record carries its kind and handle, not its name, so this is what lets an editor resolve the material a Prop edit names to the handle the running world loaded it at. Inserted by the in-memory (cn debug / editor) build, and by the editor’s blob boot from world-lock.json, so a session has it either way it started. Absent in the shipped disk runtime, which addresses every material by handle.
MaterialTable
A handle-indexed table of one resource kind.
MeshSource
One file-backed Mesh’s re-import inputs, in MeshHandle order. Mirrors cook’s MeshSourceInfo; an inline-authored mesh has an empty source.
MeshSources
Dev-only catalogue of mesh source files, indexed by MeshHandle, inserted as a world resource by the in-memory (cn debug / editor) build so GraphicsSystem::init can seed the hot-reload watcher now that Mesh is a resource without a drained source field. Absent in the shipped disk runtime.
MeshTable
A handle-indexed table of one resource kind.
ResourceEntry
One loaded resource’s runtime form. A payload resource (audio clip, and later meshes / textures) carries a PayloadLocator into the blob payload section; a data resource (a baked Material) carries its runtime bytes in data_bytes.
SkinnedMeshTable
A handle-indexed table of one resource kind.
TextureSource
One texture’s identity + source file, in TextureHandle order. A procedural texture has an empty source. name_id is the interned asset name (the same interner the runtime shares in-process under cn debug), used by the runtime spawn-by-name path without interning at runtime.
TextureSources
Dev-only catalogue of texture source files, indexed by TextureHandle, inserted as a world resource by the in-memory (cn debug / editor) build. GraphicsSystem::init reads it to seed the hot-reload watcher now that Texture is a resource without a drained source field. Absent in the shipped disk runtime, which does not hot-reload; init simply captures no sources then.
TextureTable
A handle-indexed table of one resource kind.

Functions§

install_resource_tables
Install every per-kind resource table from a compiled blob’s resource stream into world. This is the single place the table set is enumerated: the shipped runtime (App::load_blob), the editor’s in-memory build, and the examples’ compile_world all call it, so a resource kind that migrates into the stream gets wired into every host by adding one line here. Systems then read their table by handle. Each builder MOVES its kind’s data bytes out of the records, so the caller’s record vec is spent scaffolding afterwards. Dev-only source catalogues (hot-reload) stay with the debug path that captures them, not here.