Expand description
Common imports for game development.
Glob-import this module to bring the everyday game-dev types into scope:
input (InputEvent, KeyCode, MouseButton), timing
(Time, SharedTime), assets (AssetHandle, AssetUUID), and
the ecs, materials, and math sub-modules. The window config
types WindowConfig and WindowIcon come along too.
§Examples
use khora_sdk::prelude::*;
use khora_sdk::prelude::math::Vec3;
// ECS components, math, and materials are all reachable through the prelude.
let _transform = ecs::Transform::from_translation(Vec3::new(0.0, 1.0, 0.0));
let _material = materials::StandardMaterial::default();
let _red = math::LinearRgba::RED;Re-exports§
pub use crate::WindowConfig;pub use crate::WindowIcon;pub use crate::PRIMARY_VIEWPORT;
Modules§
Structs§
- Asset
Handle - A thread-safe, reference-counted handle to a loaded asset’s data.
- AssetUUID
- A globally unique, persistent identifier for a logical asset.
- SaaTracking
Allocator - A wrapper around a
GlobalAllocimplementation (likestd::alloc::System) that intercepts allocation calls to update the global memory counters defined inkhora_core::memory. - Time
- Per-frame timing state shared between the simulation and the render path.
Enums§
- Input
Event - An engine-internal representation of a user input event.
- KeyCode
- Type-safe physical key codes — a 1-to-1 mirror of
winit::keyboard::KeyCodebut living inkhora-coreso app code never has to depend on winit. - Mouse
Button - An engine-internal representation of a mouse button.
Type Aliases§
- Shared
Time - Shared, interior-mutable handle to the engine’s
Timeresource.