I wanted my creature to have a floating motion so from the class exercises I added noiseValue to the creature
so it would move on the X and Y randomly.
Then I added sin values so the creature would grow bigger and smaller based on the sin value. But I didn't want
the creature to fully shrink into nothing so I changed the map value so it would map from 0.8 to 1.3.
When I added the creatures tentacles on the top I tried to put all the creatures code into a draw creature funtion
so that I can change the creatures shape and movement from there.
Another interaction i wanted was the creature eating the dream bubble and changing colors so I tried using the distance
function to calculate the distance of the dream and the radius of the creature. When the distance is less than the radius of
the creature the dream would be false and the creature will change colors.
Findings/Lesson Learned:
grouping shapes into push and pop and setting them into its own function makes changing them easier
setting variables makes code easier to read and modify later on
coding bit by bit is cleaner and more easier to build up than coding everything at once.
Reflection Prompts:
You should use push, then translate and then pop. When you use translate you have to use push and pop so the transformation, scale, or rotation doesn't affect the rest of the canvas.
User-defined functions help make the code more organized and easier to read. It would also be easier to make simple changes by changing just the function itself.
I used parameters like transX, transY, circleSSize, and c in my draw creature function. They helped me change the location, size and color of my creature easily.
The drawCreature function and parameters helped me organize my code so it was easier to make changes.