feat(examples): Add visualizer#44
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #44 +/- ##
==========================================
- Coverage 99.73% 99.72% -0.01%
==========================================
Files 3 3
Lines 1859 1851 -8
==========================================
- Hits 1854 1846 -8
Misses 5 5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Adds an interactive egui-based example to visualize earcut triangulation behavior, while also adjusting the public triangulation API/docs and repo examples/dependencies.
Changes:
- Add
examples/visualizer.rs(interactive viewer with fixture selection, pan/zoom, and optional Delaunay overlay). - Update
Earcut::earcut/EarcutI32::earcutdocs and refactor implementation (including removal ofearcut_impland some debug assertions). - Remove the old
profile_loopexample and add dev-dependencies + explicit example target inCargo.toml.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
src/lib.rs |
Adds panic docs, inlines implementation previously routed via earcut_impl, and removes z_order debug assertions. |
src/int.rs |
Adds panic docs and inlines implementation previously routed via a private helper. |
examples/visualizer.rs |
New eframe/egui visualizer example using test fixtures and optional Delaunay triangulation overlay. |
examples/profile_loop.rs |
Removes the profiling-loop example. |
Cargo.toml |
Adds eframe/spade dev-deps and declares the new visualizer example target. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 7 changed files in this pull request and generated 6 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 7 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 7 changed files in this pull request and generated 4 comments.
Comments suppressed due to low confidence (1)
src/lib.rs:244
- This PR removes the previously-public
earcut_implentry point (it was being called here before the refactor). Removing a public method is a breaking API change; if this wasn’t intended, consider keepingearcut_implas a thin wrapper (optionally#[deprecated]) to preserve backward compatibility, or otherwise document it as a breaking change and add a changelog entry / version bump accordingly.
pub fn earcut<N: Index>(
&mut self,
data: impl IntoIterator<Item = [T; 2]>,
hole_indices: &[N],
triangles_out: &mut Vec<N>,
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Add a simple egui-based visualizer to help understand earcut's behavior.
CHANGES.mdorCHANGELOG.md