This is my first step on processing. What I wanted to do here was first figure out how to draw several balls throughout the processing template. This was hard at first as every time I wanted to draw a ball in a different spot the balls would constantly draw wherever the mouse moves, and not when I clicked the mouse. What I had to do was create another class just for the ball and an array list for each ball. This means that every time I click and make a ball grow it saves its position and carries on redrawing itself. I also set the max size of the ellipses to 150 so if it reaches that size while the mouse is being held down it will reverse and start reducing.
No comments:
Post a Comment