Skip to main content

Module prelude

Module prelude 

Source
Expand description

Everything you need to write a game: use game_toolkit::prelude::*;.

Re-exports§

pub use anyhow;
pub use winit;
pub use game_toolkit_gfx::wgpu;

Modules§

transform
Minimal column-major 4x4 matrix helpers for building 3D model transforms.

Structs§

AppConfig
Assets
Audio
Camera2D
2D orthographic camera. Default coordinate system: top-left origin, pixels.
Camera3D
Perspective camera. Set Camera3D::eye/Camera3D::target to move it.
CircleInstance
Context
Frame
Gamepad
Per-controller state, with the same held / just-pressed / just-released model as the keyboard. Obtain via Input::gamepads or Input::first_gamepad.
GamepadId
Gamepad ID.
Graphics
Input
MeshId
Handle to a mesh uploaded via crate::Graphics::create_mesh.
MeshInstance
One instance of a mesh: a column-major model matrix and a tint color.
MeshVertex
One mesh vertex: position and normal, both in model space.
Painter
SoundId
SpriteInstance
TextureId
Tilemap
Grid tilemap backed by an atlas. tiles indexes into the atlas left-to-right, top-to-bottom; index 0 is treated as empty and skipped.
Time

Enums§

Axis
Gamepad’s elements which state can be represented by value from -1.0 to 1.0.
BlendMode
Button
Gamepad’s elements which state can be represented by value from 0.0 to 1.0.
GameEvent
Key
Code representing the location of a physical key
MouseButton

Traits§

Camera
A camera with a view_proj matrix, implemented by both crate::Camera2D and Camera3D so a pipeline can be fed by either.
Game

Functions§

run

Type Aliases§

Mat4
Column-major 4x4 matrix.
Result
Result<T, Error>