0.4.0 - 2024-11-12
Changes
Added
- Reworked edges search algorithm for work with diagonal lines too
(60cb046) (c4ca604) (06012b7) (ac0c3dd) (8d38555). - Feature
glam-latest
for those who useglam
(e7ab40a). - Crate
rayon
to dependencies for parallelism (df77244). - Method
new
to takeEdges
from any data (3f5052f).
Changed
- Now
Edges
is structure (3f5052f). - Method
translate_vec
renamed totranslate
(5573751). - Dependency on
bevy
replaced withbevy_math
andbevy_render
(e7ab40a).
Fixed
Removed
Migration guide
Definition of edges
.
let edges = Edges::from(&image);
About feature glam-latest
This feature added for lightweight of usage of this crate without bevy
and support latest version of glam
.
Note
The bevy
feature disables the glam-latest
feature.
[dependencies.edges]
version = "*" # Your version
default-features = false
features = ["glam-latest"]
About Edges::new
Now, you mustn't call Edges::march_edges
.
To get edges from custom data, you can use Edges::new
.
Warning
The data size must be greater than or equal to height multiplied by width.
let data: &[u8];
let edges = Edges::new(height, width, data);
let objects = edges.multi_image_edge_translated();
About Edges
If you use match-case
on Edges
to return an image.
You should now use one of these options.
This will preserve your ownership of the image.
let data: &[u8];
let edges: Edges = Edges::new(height, width, data);
let edges: Edges = Edges::from(&image);