/P5js-Glitter-Scatter

P5Js program to scatter multiple balls built from a class with minimal styling using tailwind.

Primary LanguageJavaScript

Hello 😁

🚧 Ongoing Project 🚧

Goal of this project

Using P5JS to make balls and scatter them around like they're a bunch of glitter/star objects

Things I wish I learned sooner about p5

  • Calling Background(red,blue,green,alpha < 255) does not fully cover the background to make a trailing effect even after multiple calls. It will leave a ghosting effect.
  • Using multiple p5js Files is as easy as adding <script src="anotherScript.js"></script> to the main html file.

Short term Goals

  • Relearn the basic structure of p5
  • Embedded into an html to look like one page
  • Mouse Click and drag feature to launch balls
  • Ball trail and deleting the balls once their lifetime is over
  • Ball physics
  • Obstacles or options to release multiple balls at once
  • Add interactive buttons to change/alter simulation

If I come back to this

  • Shift from frame/draw dependance to something more reliable for consistent viewing accross different devices
  • Performance improvements where possible