Skip to main content

Crate sgl_core

Crate sgl_core 

Source
Expand description

Reusable deterministic helpers, fixed-step timing, animation, collision, and math.

Dependency rule: this foundation crate has no internal SGL crate dependencies.

Modules§

anim
Pure frame-animation driver over an explicit frame order array.
collision
Pure swept-AABB collision: boxes, a closed-form sweep, a uniform broadphase grid, and kinematic move-and-slide resolution for a platformer body.
math
Math re-exports (stack.md: glam). Downstream code imports vector/matrix types from here so the math backend is swappable in exactly one place.
random
Seedable RNG — a thin wrapper over fastrand::Rng (stack.md).
time
Fixed-step clock with render interpolation.

Structs§

Digest
A 32-byte canonical BLAKE3 digest.
Grid2
A row-major grid with fixed-width dimensions.
SplitMix64
The frozen SplitMix64 pseudo-random generator.
StateHasher
An explicit BLAKE3 writer for deterministic state.

Enums§

GridError
An invalid grid construction request.

Traits§

CanonicalWrite
Values with one frozen canonical byte representation.

Functions§

derive_stream_seed
Derives a deterministic stream seed from a game-owned base seed and three caller-supplied domain components.
digest_of
Computes the canonical digest of one value.