npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

smokybg

v0.1.1

Published

This is an analog of [waterpipe.js jQuery plugin](https://github.com/dragdropsite/waterpipe.js/), but rewritten in typescript and usable as a common npm module with types (not perfectly typed tho)

Downloads

2

Readme

Smokybg

This is an analog of waterpipe.js jQuery plugin, but rewritten in typescript and usable as a common npm module with types (not perfectly typed tho)

Install

npm i smokybg

Usage

<canvas id="smoky-wrapper" style="width: 100%; height: 100%;">Your browser does not support HTML5 canvas.</canvas>
import { Smoke } from 'smokybg';

const element = document.getElementById('smoky-wrapper');

const options = {
   kek: 'lol'
};

new Smoke(element, options);

Support

If anyone will use this- I will provide wider documentation for this and make a better API

Examples

Here are some examples generated using waterpipe.js plugin.

alt tag alt tag alt tag alt tag alt tag alt tag alt tag

Options

| Option | Type | Default | Description | |---------------|---------------|-----------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | gradientStart | string | '#000000' | Gradient start color in hex format. | | gradientEnd | string | '#222222' | Gradient end color in hex format. | | smokeOpacity | number | 0.1 | Smoke opacity 0 to 1. | | numCircles | int | 1 | Number of circles (smokes). | | maxMaxRad | int or 'auto' | 'auto' | Could be used to change circle radius size | | minMaxRad | int or 'auto' | 'auto' | Could be used to change circle radius size | | minRadFactor | int | 0 | It's a factor representing the size of the smallest radius with respect to the largest possible. Integer from 0 to 1. | | iterations | int | 8 | The number of subdividing steps to take when creating a single fractal curve. Can use more, but anything over 10 (thus 1024 points) is overkill for a moderately sized canvas. | | drawsPerFrame | int | 10 | Number of curves to draw on every tick of the timer | | lineWidth | number | 2 | Line width | | speed | int | 1 | Drawing speed (tick of timer in ms) | | bgColorInner | string | '#ffffff' | Background outer color in hex format | | bgColorOuter | string | '#666666' | Background inner color in hex format |

Methods

| Method | Arguments | Description | |-----------|-------------|-------------------------------------------------------------------------------------------------| | generate | | Generates background canvas | | setOption | optionName, | Set a new value to an option. Please check the above table for possible option names and values | | | optionValue | | | download | width: int, | Download size in pixels | | | height: int | |

License

Licensed under MIT license