Skip to main content

Crate codecraft

Crate codecraft 

Source

Re-exports§

pub use audio::Effect;
pub use audio::LoopHandle;
pub use audio::Voice;
pub use dev::DevMode;
pub use gpu::Frame;
pub use gpu::FrameError;
pub use gpu::GpuContext;
pub use input::Keys;
pub use material::Material;
pub use render3d::MeshId;
pub use render3d::MeshInstance;
pub use render3d::Model;
pub use render3d::Transform;
pub use scene::Scene;
pub use scene::SceneCommands;
pub use scene::SceneEntity;
pub use sceneobjects::cameras::Follow;
pub use sceneobjects::cameras::Camera;
pub use sceneobjects::cameras::OrbitCamera;
pub use sceneobjects::cameras::Projection;
pub use sceneobjects::cameras::Ray;
pub use sceneobjects::lights::Ambient;
pub use sceneobjects::lights::Light;
pub use sceneobjects::lights::LightShape;
pub use sceneobjects::lights::LocalLight;
pub use sceneobjects::lights::Suns;
pub use sceneobjects::Category;
pub use sceneobjects::SceneObject;
pub use state::App;
pub use state::AppState;
pub use time::Time;
pub use views::View;
pub use views::Views;
pub use glam;

Modules§

audio
Sound: recorded clips, synthesised effects, and loops that run until told to stop.
capture
Taking a picture of the frame that was just drawn.
clustered
The cluster grid: which lights reach which part of the frustum (forward+). See clustered.wgsl for the culling geometry.
code
A 3D map of a folder: its folders and files as nested boxes, and inside any Rust file its symbols, with crates and their dependencies picked out when the folder is a Cargo workspace.
control
A small loopback command port (screenshots, keys, pointer) so the running game can be driven from outside; on only when RENDERER_CONTROL_PORT is set.
dev
Dev mode: the F12 switch, its badge and menu, and the F9/F10/F11 keys.
ecs
Minimal App/Plugin scaffolding on top of bevy_ecs.
gizmos
Gizmos: the ground Grid and light markers, drawn as scene entities to help you see where you are.
gpu
helpers
hid
Game controllers as ECS resources, plus an on-screen readout.
input
Keyboard state, published into the ECS world each frame.
logging
Logging that outlives the terminal it was printed in.
material
How a surface answers light.
materials
Material models.
mesh
Loading meshes out of a .glb (binary glTF) by node name.
prelude
primitives
Procedural meshes (box, sphere, extrusion) that build the same MeshData the loader produces. Each shape is a component: spawn it with crate::AppState::spawn_entity and the app gives the entity a mesh, uploaded once per distinct size and shared.
render3d
Drawing loaded meshes: a camera, a mesh library, and one instanced draw call per mesh.
scene
sceneobjects
What a scene contains, as the tools see it: one module per kind of object, each owning its data, components, systems and the SceneObject it hands out.
state
time
Frame timing, published into the ECS world and readable from scenes.
tonemap
The tonemap pass: fits the HDR image into what the display can show; see tonemap.wgsl for the curve.
ui
The UI: yakui, drawn immediate-mode every frame by whoever has something to show, on the main thread.
views
Which parts of the frame the world is drawn into, and from where: a view is a rectangle plus a camera, and the renderer draws the world once per view.

Enums§

KeyCode
Code representing the location of a physical key