Number one this week, Zdog is a library to animate in 3D simple shapes such as circles, rectangles, cylinders, “boxes”…
It can render shapes on either a <canvas>
or a SVG element.
The online demos show how you can rotate objects by dragging on the screen, using a very few lines of JavaScript.
It’s not a real 3D engine (“Zdog’s 3D shapes are actually 2D projections rendered without any accounting for collisions with other shapes” as the author says) but its simple API and its small bundle size (less than 7 KB gzipped) make it very interesting.
Fun fact: its name and its concept is inspired by a virtual pet games of the 90’s, called “Dogz”!
Any question or feedback? Reach us on GitHub.
Best of JavaScript is a project created by Michael Rambeau, made in Osaka, Japan.