p5.js
p5.js copied to clipboard
Add guideline about chaining to style guide
trafficstars
Increasing access
Improve style guide to prevent future inconsistencies in docs.
Most appropriate sub-area of p5.js?
- Contributor Docs (style guide)
Feature enhancement details
In reference to https://github.com/processing/p5.js/issues/6400#issuecomment-1709419148, as proposed by @nickmcintyre, to add guideline about chaining functions to styleguide.
// Nope.
fill(0)
.strokeWeight(0)
.textSize(10);
// Nope.
fill(0).strokeWeight(0).textSize(10);
// Yep.
fill(0);
strokeWeight(0);
textSize(10);
Hey @meezwhite I would like to work on this issue. Please assign it to me.
Yes I think that is fine to add, @meezwhite you can go ahead with a PR if you like.