프로젝트
GitHub에서 보기
james-j-obrien/bevy_vector_shapes
소개
Bevy 게임 엔진을 사용해 벡터 도형을 렌더링하는 라이브러리입니다.
게임 및 에뮬레이션What you can do
- Variety of built in shape types: lines, rectangles, circles, arcs and regular polygons.
- Traits to allow implementation of custom shape types.
- Supports various bevy rendering features: 2D and 3D pipelines, transparency, alpha modes, render layers, bloom.
- Canvas API for rendering shapes to a texture.
측정된 스타 증가
- in 24h
- 0
- in 7 days
- +1
- in 15 days
- +1
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalWhat is Bevy Vector Shapes?
Bevy Vector Shapes is a library for easily and ergonomically creating instanced vector shapes in Bevy.
WARNING
Bevy Vector Shapes is in the early stages of development. You may encounter issues, but feel free to report them.
Features
- Variety of built in shape types: lines, rectangles, circles, arcs and regular polygons.
- Traits to allow implementation of custom shape types.
- Supports various bevy rendering features: 2D and 3D pipelines, transparency, alpha modes, render layers, bloom.
- Canvas API for rendering shapes to a texture.
- Ability to draw textures on shapes, including canvas textures.
- Immediate and retained mode.
- Local anti-aliasing for smoother looking shapes.
- Optional billboarding for each shape type to ensure they are always facing the camera.
- Shapes of the same type and rendering configuration are fully instanced together.
- Compilation to wasm to run your projects in the browser.
Usage
See basic usage below and the examples for more details on all supported features.
use bevy::prelude::*;
// Import commonly used items
use bevy_vector_shapes::prelude::*;
fn main() {
App::new()
.add_plugins(DefaultPlugins)
// Add the shape plugin:
// - Shape2dPlugin for 2D cameras
// - ShapePlugin for both 3D and 2D cameras
.add_plugins(Shape2dPlugin::default())
.add_systems(Startup, setup)
.add_systems(Update, draw)
.run();
}
fn setup(mut commands: Commands) {
// Spawn the camera
commands.spawn(Camera2d);
}
fn draw(mut painter: ShapePainter) {
// Draw a circle
painter.circle(100.0);
}
| bevy | bevy_vector_shapes |
|---|---|
| 0.20 | 0.14.0 |
| 0.19 | 0.13.1 |
| 0.18 | 0.12.1 |
| 0.17 | 0.11.1 |
| 0.16 | 0.10.0 |
| 0.15 | 0.9.3 |
| 0.14 | 0.8.2 |
| 0.13 | 0.7.0 |
| 0.12 | 0.6.0 |
| 0.11 | 0.5.2 |
| 0.10 | 0.4.6 |
Alternatives
- bevy_smud: for generating custom sdf expressions at run time.
- bevy_prototype_lyon: for generating meshes from 2D shapes and paths.
- vello: for very efficient 2D shape rendering to images.
관련 프로젝트 살펴보기
불러오는 중…