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

[2.0 beta 1] textToModel adds extra face? #7474

Open
1 of 17 tasks
davepagurek opened this issue Jan 18, 2025 · 0 comments
Open
1 of 17 tasks

[2.0 beta 1] textToModel adds extra face? #7474

davepagurek opened this issue Jan 18, 2025 · 0 comments

Comments

@davepagurek
Copy link
Contributor

Most appropriate sub-area of p5.js?

  • Accessibility
  • Color
  • Core/Environment/Rendering
  • Data
  • DOM
  • Events
  • Image
  • IO
  • Math
  • Typography
  • Utilities
  • WebGL
  • Build process
  • Unit testing
  • Internationalization
  • Friendly errors
  • Other (specify if possible)

p5.js version

2.0 beta 1

Web browser and version

Firefox

Operating system

MacOS

Steps to reproduce this

I was testing out textToModel here, combining it with a shader to displace vertices: https://openprocessing.org/sketch/2513601

I notice that when the vertices get displaced, sometimes the fills go outside of the strokes in a straight line:

Image

It looks like there's an extra face here, or a face that hasn't been subdivided, so that when the endpoints move, it draws a straight line between them, rather than following the warped curve.

This has something to do with p5.Font.textToModel here probably:

const geom = this._pInst.buildGeometry(() => {

When drawing the front faces, I've called endContour(CLOSE), I wonder if the CLOSE is causing an extra face to be made?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant