Closed clankill3r closed 1 year ago
Hi Doeke you're absolutely correct! If you want to make a pull request for this I will happily merge it.
The following code works as intended:
void setup(){
size(400,400,P2D);
}
void draw(){
curveDetail(1);
drawCurves(-60);
stroke(126);
curveDetail(2);
drawCurves(0);
stroke(255);
curveDetail(4);
drawCurves(60);
noLoop();
}
void drawCurves(float y) {
noFill();
curve( 20, 112+y, 20, 112+y, 292, 104+y, 292, 252+y);
curve( 20, 112+y, 292, 104+y, 292, 252+y, 60, 268+y);
curve(292, 104+y, 292, 252+y, 60, 268+y, 60, 268+y);
}
@SableRaf can I work on this issue ?
Hi @yogitheboss. Thanks for your help ✨ I have assigned the issue to you. You will find information on how to update examples in the reference in reference.md
. Let me know if you have any questions.
I think you can close this issue as it has been fixed @SableRaf
https://processing.org/reference/curveDetail_.html
This is the example for curveDetail:
The thing is, the example should not use the default renderer cause curveDetail does not work there. This is what it looks like when switching to P2D (as intended):
Also it makes more sense to have all draw code in setup, cause now the first curve will become white after the first frame, and the become all ugly from drawing on top of each other.