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)