| Crates.io | bevy_lit |
| lib.rs | bevy_lit |
| version | 0.9.1 |
| created_at | 2024-07-23 15:23:26.7348+00 |
| updated_at | 2025-11-21 19:36:12.884465+00 |
| description | A lighting 2d library for Bevy |
| homepage | |
| repository | https://github.com/malbernaz/bevy_lit |
| max_upload_size | |
| id | 1312920 |
| size | 287,440 |

bevy_litA simple 2D lighting library designed for Bevy.
PointLight2d, SpotLight2d and TextureLight2dCustomLight2dPlugin and Light2dMaterial for defining custom light sourcesLightOccluder2d that can be used along side any Mesh2dInstall it using the CLI:
cargo add bevy_lit
Or add bevy_lit to your Cargo.lock:
[dependencies]
bevy_lit = "*"
Below is a basic example demonstrating how to set up and use bevy_lit in your project:
use bevy::prelude::*;
use bevy_lit::prelude::*;
fn main() {
App::new()
.add_plugins((DefaultPlugins, Lighting2dPlugin))
.add_systems(Startup, setup)
.run();
}
fn setup(mut commands: Commands, mut meshes: ResMut<Assets<Mesh>>) {
commands.spawn((
Camera2d,
Lighting2dSettings::default(),
));
commands.spawn(PointLight2d {
color: Color::WHITE,
intensity: 3.0,
outer_radius: 200.0,
falloff: 2.0,
..default(),
});
commands.spawn((
Mesh2d(meshes.add(Circle::new(50.0))),
LightOccluder2d::default(),
Transform::from_xyz(0.0, 200.0, 0.0)
));
}
bevy |
bevy_lit |
|---|---|
0.17.3 |
0.9 |
0.17 |
0.8 |
0.16 |
0.7 |
0.15 |
0.4..0.6 |
0.14 |
0.3 |
bevy_lit is licensed under the MIT License. See LICENSE for more details.