euv-engine 0.11.0

A high-performance 2D game engine built on the euv framework, featuring ECS, fixed-timestep game loop, canvas rendering, physics, collision detection, sprite animation, and audio.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use crate::*;

/// A grid cell key for 2D spatial partitioning, combining x and y indices.
pub type CellKey2D = (i32, i32);

/// A grid cell key for 3D spatial partitioning, combining x, y, and z indices.
pub type CellKey3D = (i32, i32, i32);

/// A list of body indices stored within a single grid cell.
pub type CellEntries = Vec<usize>;

/// A hash map from 2D cell keys to lists of body indices.
pub type SpatialCellMap2D = HashMap<CellKey2D, CellEntries>;

/// A hash map from 3D cell keys to lists of body indices.
pub type SpatialCellMap3D = HashMap<CellKey3D, CellEntries>;