DEV Community

Cover image for 42% the Size of HTML SCSS with ZIM...
Dr Abstract
Dr Abstract

Posted on

42% the Size of HTML SCSS with ZIM...

Once again, we saw some HTML and CSS and thought... yikes! That could be done in less lines of code! Here is the original CodePen pen (thanks to the original poster and their clever HTML SCSS):

and here is the ZIM CodePen pen:

The ZIM code looks like this:

// usually users can interact with a Blob
const mask = new Blob({interactive:false})
// a Blob has a set of control points we will wiggle
loop(mask.pointControls, point=>{
        // prop, start, min, max, timeMin, timeMax
// a manually changed Blob needs updating
new Circle(355, null, grey, 1, true).center();
new Rectangle(500, 500, null, grey, 1, null, true).center();
Enter fullscreen mode Exit fullscreen mode

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 (0)