Crates.io | bevy_light_2d |
lib.rs | bevy_light_2d |
version | |
source | src |
created_at | 2024-05-26 22:27:48.227984 |
updated_at | 2024-12-05 05:38:56.218521 |
description | General purpose 2d lighting for the Bevy game engine. |
homepage | |
repository | https://github.com/jgayfer/bevy_light_2d |
max_upload_size | |
id | 1252868 |
Cargo.toml error: | TOML parse error at line 22, column 1 | 22 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
bevy_light_2d
General purpose 2D lighting for the bevy
game engine.
Designed to be simple to use, yet expressive enough to fit a variety of needs.
In the basic
example, all we need is the plugin, a camera, and a light source.
# Cargo.toml
[dependencies]
bevy = "0.15"
bevy_light_2d = "0.5"
use bevy::prelude::*;
use bevy_light_2d::prelude::*;
fn main() {
App::new()
.add_plugins((DefaultPlugins, Light2dPlugin))
.add_systems(Startup, setup)
.run();
}
fn setup(mut commands: Commands) {
commands.spawn(Camera2d);
commands.spawn(PointLight2d {
intensity: 3.0,
radius: 100.0,
..default()
});
}
To see an in depth example, use cargo run --example dungeon
.
When I first started experimenting with Bevy, the lack of a first party 2D lighting implementation left me wanting. While there were some rather impressive experimental 2D lighting crates out there, there wasn't much in the way of drop in options available.
My goal with this crate is to fill that void, prioritizing ease of use and general application over depth of features.
bevy | bevy_light_2d |
---|---|
0.15 | 0.5 |
0.14 | 0.2..0.4 |
0.13 | 0.1 |
I'd like to thank the authors of the below crates; they were a significant source of inspiration.