Skip to content

nilaysavant/bevy_mesh_drawing

Repository files navigation

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.5.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.14 0.5.0
0.13 0.4.0
0.12 0.3.0
0.11 0.2.0
0.8 0.1.0

Packages

No packages published

Languages