Question
Javascript P5 Animation Problem: 1. Paint Brush Read and understand the template code: http://alpha.editor.p5js.org/doubleshow/sketches/rJnNyAI8M The code draws a circle as the user moves the cursor
Javascript P5 Animation Problem:
1. Paint Brush
Read and understand the template code:
http://alpha.editor.p5js.org/doubleshow/sketches/rJnNyAI8M
The code draws a circle as the user moves the cursor around the canvas. Your task is to implement the following enhancements:
Each circle should have a random color (currently only black).
Circles should keep changing sizes, increasing and decreasing between 10 and 30 (currently the size is fixed).
Circles are only drawing in the drawing mode; a user can toggle the drawing mode by clicking on the canvas. (hint: you need to work with the "isDrawing" variable).
Some links for info on mouseX and mouseY:
mouseX: https://p5js.org/reference/#/p5/mouseX
mouseY: https://p5js.org/reference/#/p5/mouseY
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started