p5.js icon indicating copy to clipboard operation
p5.js copied to clipboard

[p5.js 2.0+ Bug Report]: WebGL - bezierVertex(x,y,u,v) overload won't texture map correctly

Open BRNMan opened this issue 1 month ago • 2 comments

Most appropriate sub-area of p5.js?

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

p5.js version

2.3.4

Web browser and version

No response

Operating system

No response

Steps to reproduce this

Steps:

The resolution of this issue means that we can now texture bezierVertex shapes just like we can for vertex shapes.

From the issue:

18. This is now resolved in 2.0 after #7373! All vertices now support texture coordinates. We're also changing the cubic/quadratic bezier works. bezierOrder(3) (or 2) is used to toggle cubic/quadratic, and you call bezierVertex(x, y, z, u, v) once per control point, allowing you to give each control point its own texture coordinates (or other per vertex properties! you can change fill/stroke/normal between control points now too.)

However, as far as I can tell vertex texturing only works for the bezierVertex overload with 5 parameters, bezierVertex(x, y, z, u, v). If you create a 2D bezierVertex using the bezierVertex(x, y, u, v) overload it does not work. Both overloads are referenced in https://p5js.org/reference/p5/bezierVertex/. I can't tell if the x,y,u,v overload doesn't actually exist or there is problem with that overload.

bezierVertex(x, y, u, v) Image

bezierVertex(x, y, z, u, v) Image

Snippet:

https://editor.p5js.org/BRN/full/5-f88HOr0

BRNMan avatar Oct 14 '26 21:10 BRNMan

Welcome! 👋 Thanks for opening your first issue here! And to ensure the community is able to respond to your issue, please make sure to fill out the inputs in the issue forms.

For guidance on contributing, check out our contributing guidelines and other resources for contributors. 💬 If you have questions or need support, feel free to join the Processing Foundation Forum or visit our Community page. 📜 Please also review our Code of Conduct to understand our community standards. Thank You!

welcome[bot] avatar Oct 14 '26 21:10 welcome[bot]

Hi @BRNMan i would like to work on this issue !!! I have rerad the contributing guidelines and would work on this issue as soon as it is assigned to me.

Ayushrawatcy009 avatar Oct 14 '26 21:10 Ayushrawatcy009