Expand description
Provides the foundational traits and primitive types for Khora’s asset system.
This module defines the “common language” for all asset-related operations in the engine. It contains the core contracts that other crates will implement or use, but it has no knowledge of how assets are loaded or stored.
The key components are:
- The
Assettrait: A marker for all types that can be treated as assets. - Stable, unique identifiers used to reference assets throughout the engine.
- Abstract interfaces for loading and managing assets.
These low-level primitives are the foundation upon which higher-level systems, such as an asset database or a virtual file system (VFS), are built in other crates.
Modules§
- font
- Font asset definitions and metadata.
Structs§
- Asset
Handle - A thread-safe, reference-counted handle to a loaded asset’s data.
- Asset
Metadata - Serializable metadata that describes an asset and its relationships.
- AssetUUID
- A globally unique, persistent identifier for a logical asset.
- Emissive
Material - A material that emits light without being affected by scene lighting.
- Handle
- A thread-safe, reference-counted handle to a loaded asset’s data.
- Standard
Material - A physically-based rendering (PBR) material using the metallic-roughness workflow.
- Unlit
Material - A simple, unlit material.
- Wireframe
Material - A material that renders geometry as a wireframe for debugging and editor visualization.
Enums§
- Alpha
Mode - Specifies how a material handles transparency and alpha blending.
- Asset
Source - Represents the physical source of an asset’s data.
- Compression
Kind - On-disk compression scheme for a packed asset.
Traits§
- AsAny
- Helper trait to allow downcasting
dyn Materialtrait objects to their concrete types. - Asset
- A marker trait for types that can be managed by the asset system.
- Material
- A trait for types that can be used as a material.
- Material
Clone - Supertrait that gives every material a
clone_boxwithout makingMaterialitself depend on the non-object-safeClone. The blanket impl below covers everyT: Material + Clone, so concrete materials implement nothing extra.