Expand description
A low-level Rust game engine: an ECS (ecs) plus a wgpu-backed
renderer (graphics) and asset pipeline (assets), wired together
by app::App. No built-in high-level systems (no scene graph, no
physics) — pebble gives you the primitives and stays out of the way.
Start with app::App and ecs::plugin::Plugin.
Re-exports§
pub use encase;
Modules§
Macros§
- asset
- Expands to the same
AssetSource/Asset<B>impls you’d write by hand — a pure syntax transform, so every built-in asset type keeps using the trait impls directly. Only exists to make a new, user-defined asset type cheaper to write: - bind_
comp - Same as
bind_mat!, for aComputePass+Computeinstead of aRenderPass+Material. - bind_
mat - The “look up, then bind” chain every draw call repeats:
$materials.get($handle), thenset_pipeline+set_bind_group(0, ...)on$pass. Returns from the enclosing function (viaor_return!) if the lookup isn’t ready yet — an asset that hasn’t finished uploading is a normal, common case (a couple frames on load), not a bug. - draw_
mesh - Looks up
$meshes.get($handle)and draws it — sets the vertex/index buffers and callsdraw_indexed, defaulting the instance range to0..1(pass a fourth argument for instanced draws). Returns from the enclosing function (viaor_return!) if the mesh isn’t ready yet. - or_
return - Unwraps an
Option, returning from the enclosing function if it’sNone— collapses thelet Some(x) = expr else { return };pattern that shows up constantly in systems (which return(), so the?operator isn’t an option the way it would be in a function returningOption/Result).