A Shattered Heart 💔 (with matter.js)

🔗 Code Example: A Shattered Heart 💔 (with matter.js)

🔗 Inspiration

🔗 References:

🔗 Timestamps:

  • 0:33 Set up the physics engine and create a single rectangular body

  • 5:55 Add mouse for some interactivity

  • 8:36 Create multiple rectangular bodies

  • 12:42 Preload an image to sketch

  • 14:40 Create a grid of cells and check which contains color values

  • 20:33 Combine matter.js and image sketches

  • 24:59 Create a Rect class

  • 29:01 Add pixels information to each Rect object

  • 33:19 Add background

  • 33:35 Add boundaries

Previous

Chladni Patterns

Next

Valentine's Day Specials 💖💕 (w ml5.js)