Skip to content

feat(examples): Add visualizer#44

Merged
ciscorn merged 2 commits intogeorust:mainfrom
ciscorn:visualizer
May 4, 2026
Merged

feat(examples): Add visualizer#44
ciscorn merged 2 commits intogeorust:mainfrom
ciscorn:visualizer

Conversation

@ciscorn
Copy link
Copy Markdown
Member

@ciscorn ciscorn commented May 4, 2026

Add a simple egui-based visualizer to help understand earcut's behavior.


  • I agree to follow the project's code of conduct.
  • I added an entry to the project's change log file if knowledge of this change could be valuable to users.
    • Usually called CHANGES.md or CHANGELOG.md
    • Prefix changelog entries for breaking changes with "BREAKING: "

Copilot AI review requested due to automatic review settings May 4, 2026 05:59
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.72%. Comparing base (fffa65f) to head (3d98303).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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::earcut docs and refactor implementation (including removal of earcut_impl and some debug assertions).
  • Remove the old profile_loop example and add dev-dependencies + explicit example target in Cargo.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.

Comment thread src/lib.rs
Comment thread src/lib.rs
Comment thread examples/visualizer.rs Outdated
Comment thread Cargo.toml Outdated
Copilot AI review requested due to automatic review settings May 4, 2026 06:26
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread examples/visualizer.rs Outdated
Comment thread examples/visualizer.rs Outdated
Comment thread README.md
Comment thread README.md
Comment thread src/lib.rs
Comment thread src/lib.rs
Copilot AI review requested due to automatic review settings May 4, 2026 06:40
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/lib.rs
Comment thread src/lib.rs
Comment thread README.md
Copilot AI review requested due to automatic review settings May 4, 2026 07:07
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_impl entry point (it was being called here before the refactor). Removing a public method is a breaking API change; if this wasn’t intended, consider keeping earcut_impl as 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.

Comment thread Cargo.toml
Comment thread examples/visualizer.rs
Comment thread src/lib.rs
Comment thread README.md
@ciscorn ciscorn changed the title example: Add visualizer feat(examples): Add visualizer May 4, 2026
@ciscorn ciscorn merged commit 3f92ebd into georust:main May 4, 2026
7 checks passed
@ciscorn ciscorn deleted the visualizer branch May 4, 2026 07:18
@github-actions github-actions Bot mentioned this pull request May 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants