-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Open
Description
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.2.0
Web browser and version
Chrome 143.0.7499.193
Operating system
MacOS
Steps to reproduce this
Steps:
- Open a new sketch in the playground (use p5 version 2.2.0)
- Paste in the snippet
- Notice the circle is translated / shows up twice in the clipping mask, but the bezier curve only shows up once.
- (Optional) Modify the snippet to not use a clipping mask, and just stroke the two circles and two beziers.
- Notice all four shapes, 2 beziers, 2 circles render properly.
Snippet:
function setup() {
createCanvas(1000, 1000);
}
function drawClipShape() {
circle(100, 100, 100)
beginShape();
bezierVertex(30, 20);
bezierVertex(80, 0);
bezierVertex(80, 75);
bezierVertex(30, 75);
endShape();
}
function draw() {
push()
beginClip()
drawClipShape()
push()
translate(100,0)
drawClipShape()
pop()
endClip()
fill("#ff0000")
rect(0,0,600,600)
pop()
}