@lorti/snow.js

1.0.5 • Public • Published

Snowflakes ❄️

https://schneeflocken.netlify.com

Installation

npm install @lorti/snow.js

Usage

snow.js is a module that exports a snow() function, which you can pass the number of snowflakes you'd like and an HTML element where they should be drawn. You can for example bundle it using Parcel.

<!-- index.html -->
<style>
    #stage {
        width: 1280px;
        height: 720px;
        background: black;
    }
</style>
<div id="stage"></div>
<script src="./index.js"></script>
// index.js
import snow from '@lorti/snow.js';
const stage = document.getElementById('stage');
snow(10, stage);
parcel index.html

Dependencies (0)

    Dev Dependencies (5)

    Package Sidebar

    Install

    npm i @lorti/snow.js

    Weekly Downloads

    6

    Version

    1.0.5

    License

    MIT

    Unpacked Size

    57.7 kB

    Total Files

    10

    Last publish

    Collaborators

    • lorti