acamposuribe / p5.brush

Unlock custom brushes, natural fill effects and intuitive hatching in p5.js

Home Page:https://p5-brush.cargo.site/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

brush.point not working

benjaminhr opened this issue · comments

Given the code:

brush.pick("rotring");
brush.strokeWeight(random(3, 8));
brush.stroke(random(palette));

brush.point(300, 300);

Get the error 3 times:

🌸 p5.js says: [p5.brush.js, line 1685] circle() was expecting Number for the first parameter, received NaN instead. (http://p5js.org/reference/#/p5/circle)

Using the minified version of the p5.brush.js script.

Nothing visible in the UI.

@benjaminhr Can you create a sketch on the p5 online editor that reproduces the issue?

In any case, I do not recommend using the brush.point() function, since it is really designed for people who want to create their own brush paths with complete control over
In fact, I'm removing the function, since it creates many misunderstandings!

Ah ok - makes sense. I guess you can create an equivalent "point" by just using the brush.circle() function anyway.