anu-prakash-dev / bevy_mesh_drawing

Bevy Plugin to draw polygonal meshes

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bevy Mesh Drawing

[Experimental ⚠️] Bevy Plugin to draw polygonal meshes.

Simple Demo 1

Quick Start

[dependencies]
bevy_mesh_drawing = { git = "https://github.com/nilaysavant/bevy_mesh_drawing", tag = "v0.4.0" }
/// Add canvas and camera...
fn setup(mut commands: Commands) {
    commands.spawn((
            Name::new("Ground Canvas"),
            PbrBundle { .. },
            Canvas, // Canvas Marker.
        ));
    commands.spawn((
        Name::new("Camera"),
        Camera3dBundle { .. },
        MeshDrawingCamera, // Camera Marker.
    ));
}

/// Meshes will be created with [`PolygonalMesh`]
fn handle_polygonal_mesh_add(query: Query<Entity, Added<PolygonalMesh>>) {
    for entity in query.iter() {
        // Use the created mesh here...
    }
}

Checkout simple.rs in examples.

Versions

bevy bevy_mesh_drawing
0.13 0.4.0
0.12 0.3.0
0.11 0.2.0
0.8 0.1.0

About

Bevy Plugin to draw polygonal meshes

License:Apache License 2.0


Languages

Language:Rust 100.0%