Skip to main content

Crate mirage_engine_derive

Crate mirage_engine_derive 

Source
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 Catalog for 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 Clip for 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.
InputAxis2Action
Derives the engine’s view of a vocabulary of actions whose value is a vector, whose bindings are declared by hand in the InputAxis2Action trait; see InputButtonAction.
InputAxisAction
Derives the engine’s view of a vocabulary of actions whose value is a number, whose bindings are declared by hand in the InputAxisAction trait; see InputButtonAction.
InputButtonAction
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 Part for 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.
ShaderValues
Derives ShaderValues for 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.