Doug Rudolph

Particle Net

Posted on January 22nd, 2018

My first JavaScript canvas - Mesh of particles that creates a net while floating through 2D space

So this small animation is my first ever JavaScript canvas project, and let me tell you, this project has made me grow as a developer. I have never coded in JavaScript before, and I really now empathize with front end developers.

For those of you that have never coded in JavaScript, learning JavaScript is like learning to ride a bike that randomly morphs into unicycle. JavaScript claims to have this working free form structure, but as soon as you start to lean on its deeper features, the overhead for something so simple suddenly requires 10 anonymous functions; six callbacks; and learning some deeply rooted and esoteric syntax that you can never find examples for. Honestly, after doing some reading, It feels like JavaScript has had syntax issue for quite some time, and rather than fixing it, the EMCA (European Computer Manufacturers Association) just packed more features to mask its original issues. Please tell if me I'm wrong, I'd love to learn about why JavaScript feels a lot less consistent than other languages.

Anyways, this experience has taught me a lot, and has lead me to discover some new technologies. Probably the most exciting new tech I've stumbled into while googling was TypeScript. In case you haven't heard of TypeScript, TypeScript is a language created by Microsoft, and is designed to be a super set of JavaScript that has the same workings of C#. And so, my hopes are that my horrible web dev life will completely change with TypeScript. Mind you, I still wrote this project entirely in plain JavaScript as a challenge to myself, but … never again. It felt so inefficient (probably because I'm so new).

But yes, I’m so happy to see TypeScript will be fixing a lot of these random syntax and structural issues. And besides the quirkiness of JavaScript, creating graphics for websites is a lot more fun than just having it run locally in a window. The ability to share interactive graphics has never felt so easy, and I'm looking forward to seeing the potential the future holds for my graphics projects.

Stay tuned for more.