Skip to content

webGL Curves show weird behaviour  #7202

Closed
@diyaayay

Description

@diyaayay

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

v1.10.0

Web browser and version

Chrome: 128.0.6613.113 (Official Build) (64-bit)

Operating system

Windows 11

Steps to reproduce this

Steps:

  1. Sketch:
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()
}

Expected behaviour:
(This works fine in v1.8)
image

Current Behaviour:
image

I'm not too sure but it seems like this disappearing of drawing only exists in curves that are turned in terms of the direction.
For Example:
The sketch below renders correctly:

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()
}

image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions