DEV Community

Cover image for Animate objects along a user editable path in two lines of JavaScript.
Dr Abstract
Dr Abstract

Posted on

Animate objects along a user editable path in two lines of JavaScript.

In ZIM, we can do so much with so little! We are constantly coming in at 25%-50% the code of competing platforms - wow! Here is an example - copy this and paste it at to try it out:

const track = new Beads(new Blob({
}), new Circle(20,[pink,orange,blue])).center();
Enter fullscreen mode Exit fullscreen mode

ZIM Beads is just one of many things you can do with ZIM on the Canvas. Here is a link to the Beads Mini-site. There are tabs at the top right of the site for more examples.

If you have not checked out the Canvas recently - you simply must! Here is the ZIM Dev Site and some In-depth Guides by Dr Abstract including Your Guide to Coding Creativity on the Canvas.

Top comments (2)

zimlearn profile image
Dr Abstract

Just a note to those devs who cringe at us using Blob as a class... ya... truthfully, we built Blob in ZIM before we knew there was a JS Blob. If you need the JS Blob it is stored on the document... so document.Blob. Or you can set zns=true to require ZIM to use the zim namespace and then the JS Blob will be available as Blob. You can then zimplify("Blob") and you will get all ZIM commands without namespace except for Blob which you can then use zim.Blob() to access.

karelrosseel profile image
Karel Rosseel

I like it a lot.. for example used in the chain of a bicycle