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

Beginning of WebGL curves don't have a cap since v1.8

Open davepagurek opened this issue 1 year ago • 2 comments
trafficstars

Most appropriate sub-area of p5.js?

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

p5.js version

1.8.0 through to 1.9.0

Web browser and version

Firefox 117

Operating system

MacOS 14.2.1

Steps to reproduce this

Steps:

  1. Draw a curve with beginShape, vertex, and quadraticVertex in WebGL mode
  2. Note that only one end has a cap instead of both
  3. Try setting the version back to 1.7 to see the expected value

Expected: image

Actual result: image

Snippet:


function setup() {
  createCanvas(400, 400, WEBGL);
  background(255)
  noFill()
  stroke(0)
  strokeWeight(20)
  translate(-width/2, -height/2)
  beginShape()
  vertex(20, 20)
  quadraticVertex(
    280, 200,
    100, 380
  )
  endShape()
}

https://editor.p5js.org/davepagurek/sketches/ILIzcUpnt

davepagurek avatar Feb 17 '24 16:02 davepagurek

May I have a go at this? Would like to work on it.

diyaayay avatar Feb 17 '24 17:02 diyaayay

Thanks! I'll assign this to you.

davepagurek avatar Feb 17 '24 18:02 davepagurek