top of page

We Made A Bouncing Candy!

Updated: Sep 22, 2021

Bruce and I combined our go-to colors: black and orange, to create a Halloween-inspired animation.


Our design goal was to create a bouncing candy corn that changes direction when you click the button. Simple, right?





Actually, I cheated a little bit and used the p5 button function because I was struggling with different key and mousePressed functions that weren't working for me. Oops... maybe I'll try to code it myself after this if I have time.


UPDATE: Fixed it. coded it myself. Even included some halloweeny colors and a 'candy' text. Feeling very good about this.


Bruce was in charge of creating the candy corn shape. It's a rounded triangle with three different colors, which we got 80% of. The one part we didn't have the patience to figure out was the rounded corners, which would have been circles with quadrilaterals or other basic shapes.


I was in charge of re-coding the bounce animation and coding the button to toggle the directional change. It was a success! However, I tried coding the directional change about 3 different ways before I had to reference last week's example to figure it out. It's not intuitive for me to code object literals for direction, as I intuitively think it's just numbers going down, which seems simple to do mathematically. But I understand why coding the object literal for direction makes sense. Plus, it works.


See the sketch here





18 views1 comment

Recent Posts

See All
bottom of page