2 releases

0.1.1 Apr 3, 2023
0.1.0 Apr 2, 2023

#2042 in Game dev

MIT/Apache

110KB
397 lines

bevy_starfield

bevy Crates.io Crates.io docs.rs MIT/Apache 2.0

A procedural night sky plugin for the Bevy game engine.

Cube Example Screenshot

Minimal Example

use bevy::prelude::*;
use bevy_starfield::StarfieldPlugin;

fn main() {
    App::new()
        .add_plugins(DefaultPlugins)
        .add_plugin(StarfieldPlugin)
        .add_startup_system(setup)
        .insert_resource(GameUnitsToCelestial {
            origin_latitude: 51.4778,
            origin_longitude: -0.0014,
            ..Default::default()
        })
        .run();
}

fn setup(mut commands: Commands) {
    commands.spawn(Camera3dBundle::default());
}

License

bevy_starfield is dual-licensed under MIT and Apache-2.0. You may use it under either at your option.

Credits

The star data included with this crate is sourced from the Yale Bright Star Catalog.

Dependencies

~19–55MB
~1M SLoC