Module asset

Module asset 

Source
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 Asset trait: 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.

Structs§

AssetHandle
A thread-safe, reference-counted handle to a loaded asset’s data.
AssetMetadata
Serializable metadata that describes an asset and its relationships.
AssetUUID
A globally unique, persistent identifier for a logical asset.
EmissiveMaterial
A material that emits light without being affected by scene lighting.
StandardMaterial
A physically-based rendering (PBR) material using the metallic-roughness workflow.
UnlitMaterial
A simple, unlit material.
WireframeMaterial
A material that renders geometry as a wireframe for debugging and editor visualization.

Enums§

AlphaMode
Specifies how a material handles transparency and alpha blending.
AssetSource
Represents the physical source of an asset’s data.

Traits§

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.