shadowcaster

Crates.ioshadowcaster
lib.rsshadowcaster
version0.4.5
created_at2024-12-14 08:12:33.362549+00
updated_at2025-11-26 06:38:52.977639+00
descriptionRecursive shadowcasting for grid based video games.
homepage
repositoryhttps://github.com/tauseefk/shadowcaster
max_upload_size
id1482989
size20,724
Tauseef Khan (tauseefk)

documentation

README

Shadowcaster

This is an implementation of recursive shadowcasting for use in grid based video games.

Example Usage

Bevy

/// Bevy requires any static data to implement Resource, so you can easily use that across the app
#[derive(Resource)]
pub struct VisContainer {
  pub visibility: shadowcaster::Visibility,
}

/// update the observer as the player moves
pub fn player_transform_system(
  mut commands: Commands,
  player_query: Query<&Transform, With<Player>>,
) {
    if player_query.get_single().is_err() {
        return;
    }
    let player_transform = player_query.single();
    vis_container.visibility.observer = player_grid_pos;
}
Commit count: 0

cargo fmt