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.

Image of Datadog

Master Mobile Monitoring for iOS Apps

Monitor your app’s health with real-time insights into crash-free rates, start times, and more. Optimize performance and prevent user churn by addressing critical issues like app hangs, and ANRs. Learn how to keep your iOS app running smoothly across all devices by downloading this eBook.

Get The eBook

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs