bevy_mops

Crates.iobevy_mops
lib.rsbevy_mops
version0.1.1
sourcesrc
created_at2024-04-30 01:55:41.554128
updated_at2024-04-30 15:59:40.119545
descriptionMesh Operations library for bevy
homepage
repositoryhttps://github.com/PixelDoted/bevy_mops
max_upload_size
id1224616
size140,317
(PixelDoted)

documentation

https://docs.rs/bevy_mops

README

Bevy MOps (Mesh Operations)

docs.rs crates.io Following released Bevy versions

Getting started

// We convert from a "Bevy Mesh" to a `GIMesh` (Globally-positioned Index Mesh)
let mut a = GIMesh::from_mesh(mesh_a);
let b = GIMesh::from_mesh(mesh_b);

// slice `a` triangles by `b`
slice(&mut a, &b);

// seperates `a` into `inside` and `outside` of `b`
let output = seperate(&a, &b);

// Convert the `output` back to a "Bevy Mesh"
let output_mesh = output.inside.to_mesh().unwrap();

// ... Create a handle and apply it to an entity

Why convert to GIMesh?

  1. Mesh Attributes are converted to Vectors (e.g. Vec3)
  2. The Positions and Normals are converted from Local-space to World-space (and back), allowing position, rotation and scaling to effect the operations

Versions

bevy bevy_mops
0.13 0.1

LICENSE

all code in this repository is dual-licensed under either:

at your option.

Commit count: 14

cargo fmt