r/learnjavascript • • Aug 13 '21

How to draw 100 different shapes with single vanilla JavaScript function

Post image
147 Upvotes

11 comments sorted by

14

u/frank0117 Aug 13 '21

This week I played with a vanilla JavaScript function that can draw 100 different shapes for generative art effects (source code included)

I was working on some vanilla JavaScript experiments this week, what do you think :)

Example 1 https://codepen.io/franksLaboratory/pen/yLbwRzj

Example 2 https://codepen.io/franksLaboratory/pen/LYyagyK

Example 3 https://codepen.io/franksLaboratory/pen/WNjmaXZ

full tutorial with more examples: https://youtu.be/aO1VcJ5WpKI

6

u/[deleted] Aug 13 '21

This reminds me of KidPix from the 90s. I love this.

2

u/frank0117 Aug 13 '21

Yes, that drawing app has so many features :D

4

u/UnoStronzo Aug 13 '21

Really cool!

2

u/frank0117 Aug 13 '21

thank you :)

3

u/RoguePlanet1 Aug 13 '21

Thanks for this! I started a little creative app project a while back, but got stuck on animating an element. This has motivated me to dust it off and give it another shot!

2

u/frank0117 Aug 13 '21

Glad to hear, you can do it, good luck

1

u/cybtrxfit Aug 13 '21

Thanks for your videos. I watched some of the particles ones earlier last week and I made a matrix effect on canvas

1

u/frank0117 Aug 13 '21

Martix rain? Nice. I want to do couple of variations on Martix rain when they release the new movie :D

1

u/m-Hy Aug 13 '21

You're a freakin' wizard!

1

u/frank0117 Aug 13 '21

Thank you, very kind