shnewto / bevy_collider_gen

a library for generating 2D colliders for bevy apps from images
Apache License 2.0
89 stars 6 forks source link

migrate to edges crate #14

Closed shnewto closed 9 months ago

shnewto commented 9 months ago

this pr pulls the edge marching out of bevy_collider_gen and uses the functionality of the edges crate.

migration guide

imports

replace this

use bevy_collider_gen::edge;

with this

use bevy_collider_gen::Edges;

getting edges from images

replace functions that took an image like this

let edges = multi_image_edge_translated(sprite_image);

with this

let edges = Edge::from(sprite_image).multi_image_edge_translated();

march_edges

replace this

bevy_collider_gen::edge::march_edges(...)

with this

bevy_collider_gen::Edges::march_edges(...)