Expand description
The derive macros behind Mirage’s vocabulary traits, which the engine makes public; nothing here depends on the engine itself.
Derive Macros§
- Catalog
- Derives
Catalogfor a mesh vocabulary: every value the engine builds before the game’s startup closure runs, to prove the assets it names are loaded. - Clip
- Derives
Clipfor a vocabulary of the clips a mesh is posed by: each fieldless variant (and a unit struct) is named by what it is called in code, or by#[clip("...")]when the loaded animation name cannot be written as one — repeat the attribute for other spellings. The variants are numbered in order. - Input
Axis2 Action - Derives the engine’s view of a vocabulary of actions whose value is a
vector, whose bindings are declared by hand in the
InputAxis2Actiontrait; seeInputButtonAction. - Input
Axis Action - Derives the engine’s view of a vocabulary of actions whose value is a
number, whose bindings are declared by hand in the
InputAxisActiontrait; seeInputButtonAction. - Input
Button Action - Derives the engine’s view of a vocabulary of actions whose value is held or not: its values, and the names a rebind of one is kept under.
- Part
- Derives
Partfor a vocabulary of mesh parts: each fieldless variant (and a unit struct) is named by what it is called in code, or by#[part("...")]when the loaded material name cannot be written as one — repeat the attribute for other spellings. The variants are numbered in order, which is the position a draw’s override of one is stored at. - Saves
- Derives the engine’s view of a vocabulary of keys a game keeps between
runs: its values, and the name the store keeps each of them under — the
vocabulary’s own name,
., and the value’s name. - Shader
Values - Derives
ShaderValuesfor the values a style’s or an effect’s WGSL reads: the WGSL struct declaring them, and the layout writing each of them where that struct reads it.