Expand description
A simple and efficient chunk management system for Bevy.
§Quick Start
use bevy::prelude::*;
use chunky_bevy::prelude::*;
fn main() {
App::new()
.add_plugins(DefaultPlugins)
.add_plugins(ChunkyPlugin::default())
.add_systems(Startup, setup)
.run();
}
fn setup(mut commands: Commands) {
// Spawn a chunk loader that generates chunks around it
commands.spawn((
Transform::default(),
ChunkLoader(IVec3::new(2, 1, 2)), // Load 5x3x5 chunks
));
}§Features
chunk_visualizer(default) - Enables debug visualization of chunk boundarieschunk_loader(default) - Enables automatic chunk loading around ChunkLoader entitieschunk_info- Logs chunk spawn/despawn events
Modules§
- helpers
- Utility functions for spawning chunks in bulk Utility functions for spawning chunks in bulk.
- prelude
- Re-exports of commonly used types
Structs§
- Chunk
- Marks an entity as a chunk.
- Chunk
Manager - Resource for managing all chunks in the world.
- Chunk
Pos - The position of a chunk in chunk-space coordinates.
- Chunky
Plugin - The main plugin for chunk management.