Expand description
Runtime resource tables: per-kind, handle-indexed views of a compiled blob’s
resource stream. A resource (an audio clip, a texture, a mesh, a material, …)
is compiled by cook and addressed at runtime by its dense per-kind handle. The
owning system reads the table by that handle instead of querying an ECS column
or scanning names, so a resource lives in a table it owns rather than as a
component. Renderer-free (the tables are plain handle-indexed data), so they
live here where the physics / audio subsystem crates can reach them; the
client re-exports them under crate::resource::*, alongside the engine-side
install_resource_tables that inserts them as World resources.
Structs§
- Audio
Clip Table - A handle-indexed table of one resource kind.
- Color
LutTable - A handle-indexed table of one resource kind.
- Environment
MapTable - A handle-indexed table of one resource kind.
- Font
Table - A handle-indexed table of one resource kind.
- Material
Table - A handle-indexed table of one resource kind.
- Mesh
Table - A handle-indexed table of one resource kind.
- Resource
Entry - One loaded resource’s runtime form. A payload resource (audio clip, and later
meshes / textures) carries a
PayloadLocatorinto the blob payload section; a data resource (a baked Material) carries its runtime bytes indata_bytes. - Resource
Handles - Per-kind handles assigned to each resource, keyed by its identity.
- Runtime
Mesh Payloads - Mesh payloads baked at world start, each under the asset id of the value that owns it, in the order they were installed.
- Skinned
Mesh Table - A handle-indexed table of one resource kind.
- Texture
Table - A handle-indexed table of one resource kind.
Enums§
- Mesh
Block - Which block of the shared mesh-source handle space an asset belongs to.
Functions§
- append_
environment_ map - Install a baked IBL
payloadinto the world’s environment-map table and return its handle. The renderer lights with the map at handle 0. - append_
material - Install
materialinto the world’s material table and return its handle. A material is a data resource: its clamped parameters are the whole entry. - append_
mesh - Record
payloadasid’s geometry and return the handle it lands on. - install_
tables - Install every per-kind table built from a compiled world’s resource stream
into
world. The single place the table set is enumerated: the shipped runtime’s blob load, the in-memory cook build, and thebakebuilder all reach it, so a kind that migrates into the stream gets wired into every host by adding one line here. Each builder MOVES its kind’s data bytes out of the records, so the caller’s record slice is spent scaffolding afterwards.