Crates.io | grid_plane |
lib.rs | grid_plane |
version | 0.1.2 |
source | src |
created_at | 2023-03-13 20:51:03.565682 |
updated_at | 2023-03-15 14:20:34.956942 |
description | Grid plane for the bevy game engine |
homepage | |
repository | https://github.com/George35mk/grid_plane |
max_upload_size | |
id | 809246 |
size | 440,022 |
Grid plane is a Rust plugin for the Bevy game engine that allows you to add a grid plane inside your scene. This plugin provides a simple way to create a grid on 3 axes: xy
, yz
, and zx
.
Add grid plane on the scene.
Set grid size and spacing.
Set grid axes such as xy
, yz
, and zx
.
Set grid minor and major line colors.
To use the bevy_grid plugin, simply add it to your Bevy app's plugin list:
use bevy::prelude::*;
use grid_plane::GridPlanePlugin;
fn main() {
App::new()
.add_plugins(DefaultPlugins)
.add_plugin(GridPlanePlugin::default())
.run();
}
use bevy::prelude::*;
use grid_plane::{GridPlanePlugin, GridAxis};
fn main() {
App::new()
.add_plugins(DefaultPlugins)
.add_plugin(GridPlanePlugin {
grid_axis: GridAxis::Zx,
size: 100,
spacing: 1.0,
x_axis_color: Color::RED,
y_axis_color: Color::GREEN,
z_axis_color: Color::BLUE,
minor_line_color: Color::GRAY,
major_line_color: Color::CYAN,
})
.run();
}
The Grid Plugin comes with three example scenes to get you started:
cargo run --example grid_plane_default
cargo run --example grid_plane_with_options
cargo run --example grid_plane_with_some_options
grid_plane | bevy |
---|---|
0.1.0 | 0.10 |
Grid plane is licensed under MIT