Skip to content

Connected strokes in WebGL mode #5790

Closed
@davepagurek

Description

@davepagurek

Topic

In WebGL mode, strokes don't have joins or caps. This leads to some ugly results, e.g.:

function setup() {
  createCanvas(400, 400, WEBGL)
}

function draw() {
  background(255)
  stroke(0)
  strokeWeight(20)
  beginShape()
  vertex(-40, -40)
  bezierVertex(40, -40, -40, 40, 40, 40)
  endShape()
}

image

It would be great to connect these strokes in WebGL mode too. The dofficulty would be for 3D shapes, when there might be more than two strokes connected to each other (e.g. the vertices on a sphere(), which connect multiple triangles.) Is there a way to support the former without having to handle the general 3D case?

Metadata

Metadata

Assignees

Type

No type

Projects

Status

DONE! 🎉

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions