Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

101 Database Exercises Text Workbook

Authors: McGraw-Hill

2nd Edition

0028007484, 978-0028007489

More Books

Students also viewed these Databases questions