• WORK
  • ABOUT
  • LABS
  • BLOG
Menu

WAWA LABS

  • WORK
  • ABOUT
  • LABS
  • BLOG

Class circles

October 9, 2019

I got inspired by Fidget Spinning. I wanted to create complex composition using Array, Class, Functions that makes 3D Optical illusion effect.

To begin with, I designed Spinning fidget that interact with location of mouse X and mouse Y.

Speed and color of Spinning fidget changes respect to mouseX and mouseY.

I coded background in setup in purpose in order to make 3D optical illusion.

Screen Shot 2019-10-09 at 2.50.46 PM.png
Screen Shot 2019-10-09 at 2.50.58 PM.png
Screen Shot 2019-10-09 at 2.50.46 PM.png Screen Shot 2019-10-09 at 2.50.58 PM.png
fidget_spinning_products_1024x1024.jpg
KakaoTalk_Photo_2019-10-09-17-57-14.png
Screen Shot 2019-10-09 at 2.55.56 PM.png

Then I wanted to make it more complex. I wanted to generate Arrays of circles whenever user press the mouse. I wanted to make circles that swirl, accelerate, and gets bigger as it goes towards outside of window.

so I set variables for x location, y location, radius, angle, distance, speed.

  • whenever user press the mouse, circle that swirl generates.

  • circle gets bigger as it goes towards outside of screen

  • speed changes respect to speed of fidget spinning (mouseX value)

Then I made it to submit values when user press the mouse into array so that it draws circle

over and over again whenever user press the mouse.

Screen Shot 2019-10-09 at 3.16.48 PM.png
Screen Shot 2019-10-09 at 3.16.56 PM.png
Screen Shot 2019-10-09 at 3.16.48 PM.png Screen Shot 2019-10-09 at 3.16.56 PM.png
← Class particleSimple game with Javascript (Code Clean-up) →

© 2021 All Rights Reserved