Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to lyon for 2D geometry tesselation #371

Closed
11 tasks done
mitchmindtree opened this issue Jul 27, 2019 · 0 comments · Fixed by #375
Closed
11 tasks done

Switch to lyon for 2D geometry tesselation #371

mitchmindtree opened this issue Jul 27, 2019 · 0 comments · Fixed by #375

Comments

@mitchmindtree
Copy link
Member

mitchmindtree commented Jul 27, 2019

This is the actionable issue follow-up to #253. I'll update this comment with new steps as I work out the seemingly best way to approach it.

It's not yet clear to me whether or not we should remove nannou's 2D geom modules entirely in favour of lyon. While lyon is far better for tesselation, some of nannou's 2D geom types like Rect, Point, Range etc provide a whole suite of useful methods for easy integration with the rest of nannou's API and to be a little friendlier to new users.

For this reason, it might make sense to first replace the tesselation (triangulation) implementations first.

  • lyon Point and nannou Point interop conversions.
  • Create a simplified, nannou-friendly abstraction around lyon::path.
  • Add implementation of GeometryBuilder for building a nannou mesh.
  • Consider API options for providing fill and stroke options that makes the most of mesh and path but also allows specifying positioning, orienting, etc methods for basic shapes. Worth considering the draw "context" idea mentioned in Allow easier translation/rotation of groups of primitives #194. Going to save this for a future PR.
  • Consider replacing IntoDrawn with GeometryBuilder-like API. This might address current issue with incorrect index ranges when drawing primitives that use the intermediary mesh (meshs, paths). Saving for a future PR.
  • Add draw.path() API wrapping lyon path with curve support, etc.
  • Replace draw primitive tesselation with lyon tesselation:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant