DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

Cover image for The Making of Plasma!
Dr Abstract
Dr Abstract

Posted on

The Making of Plasma!

Here we use the ZIM Emitter() class to fashion Plasma:

new Emitter({
    obj:new Rectangle(50,50,[
        purple, 
        purple.darken(.1), 
        purple.lighten(.1)
    ], pink).alp(.5),
    angle:{min:-1, max:1},
    force:10,
    animation:{
        props:{rotation:["360","-360"]}, 
        time:{min:.2, max:.5}, 
        loop:true
    },
    random:{
        rotation:{min:-40,max:40},
        scale:{min:.7,max:1.2}
    },
    gravity:0,
    shrink:false,
    life:1.5, 
    fade:false
});
Enter fullscreen mode Exit fullscreen mode

The final results can be found here:

https://codepen.io/zimjs/pen/zYKgWyZ

Enjoy!


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)

🌚 Browsing with dark mode makes you a better developer.

It's a scientific fact.