-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Gradients for Fill and Strokes #7313
Comments
would like to work on this please |
@gaurav-mehta19 before we get started on something like this, we need to discuss the implications a little bit, and possibly wait a bit for some p5.js 2.0 stuff since we're in the middle of a few refactors in the Two thoughts here:
cc the color stewards @paulaxisabel, @SoundaryaKoutharapu, @mrbrack, @TJ723, @Zarkv, @SkylerW99, @ramya202000, @hannahvy, @robin-haxx, @hiddenenigma, and @limzykenneth since you've been working on the 2.0 color refactor! |
For 2.0, using something like color.js this probably won't be complicated as it has detailed color interpolation support and we can more or less write a wrapper around it. One extra addition will be in 2D mode we'll need to convert the gradient in color.js into For now I think some experiment in an addon library would be best for us to figure out an API if the idea is to expose a public API for the user. |
please once check the pr #7387 |
Increasing access
This would make many more things possible in p5.js without incurring the heavy performance cost of writing to a texture manually from the CPU or drawing a gradient using strokes, and without requiring the burden of shifting to WebGL and using shaders to achieve the gradient effect.
Most appropriate sub-area of p5.js?
Feature request details
Add the ability to use gradients instead of pure colors as a default option using canvas gradients for P2D/HTMLCanvas and WebGL vertex color interpolation for WebGL mode.
The text was updated successfully, but these errors were encountered: