Skip to content
프로젝트

소개

General purpose 2D lighting for the Bevy game engine.

게임 및 에뮬레이션

이 수치를 측정하는 방법

What you can do

  • Component driven design
  • Configurable point lights
  • Light occlusion
  • Occluder z-sorting

측정된 스타 증가

in 24h
0
in 7 days
+1
in 15 days
+1
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

bevy_light_2d

Discord Crates.io docs license GitHub Actions Workflow Status Crates.io

General purpose 2D lighting for the bevy game engine. Designed to be simple to use, yet expressive enough to fit a variety of needs.

Features

  • Component driven design
  • Configurable point lights
  • Light occlusion
  • Occluder z-sorting
  • Dynamic shadows
  • Camera specific ambient light
  • Single camera rendering
  • Web support for WebGL2 and WebGPU

Usage

In the basic example, all we need is the plugin, a camera, and a light source.

# Cargo.toml
[dependencies]
bevy = "0.20"
bevy_light_2d = "0.11"
use bevy::prelude::*;
use bevy_light_2d::prelude::*;

fn main() {
    App::new()
        .add_plugins((DefaultPlugins, Light2dPlugin))
        .add_systems(Startup, scene.spawn())
        .run();
}

fn scene() -> impl SceneList {
    bsn_list! {
        Camera2d Light2d
        ---
        PointLight2d { intensity: 3.0, radius: 100.0 }
    }
}

To see an in depth example, use cargo run --example dungeon.

Motivation

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 compatibility

bevy bevy_light_2d
0.20 0.11
0.19 0.10
0.18 0.9
0.17 0.8
0.16 0.6..0.7
0.15 0.5
0.14 0.2..0.4
0.13 0.1

Acknowledgements

I'd like to thank the authors of the below crates; they were a significant source of inspiration.

Asset credits

관련 프로젝트 살펴보기

불러오는 중…