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

fluctus

v1.0.2

Published

A package for creating beautiful wave forms.

Downloads

2

Readme

Introduction

This package provides the ability to create beautiful waves with the use of the HTML canvas element. Fluctus uses vanilla JS and is super lightweight.

Quick Start

Install through npm

npm install fluctus

Then require or import Fluctus in:

import fluctus from 'fluctus'

Install through repo files

Fluctus Requires 2 things:

  1. A Canvas element <canvas class="fluctus" id="wave1"></canvas>
  2. The Javascript <script src="/js/fluctus.js"></script>

Usage

Creating a new wave is as simple as passing in 6 arguments into the Fluctus method:

fluctus(ID,Color, Zoom, Delay, Opacity, Height); 

Parameters

  1. ID

    The ID of the canvas element the wave should be drawn on.

  2. Color

    The fill color (HEX) of the wave.

  3. Zoom

    The Zoom value should be anywhere from 0 to 2.5 to produce desirable results. The lower the zoom value, the more waves the Fluctus will produce.

  4. Delay

    The Delay value shifts the wave left and right. Lower values shift the wave to the right while higher values shift the wave to the left. Nominal values are 0 through 1000.

  5. Opacity

    The opacity parameter sets the alpha of the wave. A value of 1 would be completely opaque while a value of 0 would be completely transparant.

  6. Height

    The Height parameter manipulates the height of the wave. This is useful for "stacking" waves. The default height is 80.

Mess around with the Zoom, Delay, Opacity, and Height values to get the desired effect.

Examples

Single Wave

<canvas id="wave"></canvas>
fluctus("wave", "#66a6ff", 1.2, 0, 1, 80);

Multiple Stacked Waves

<canvas id="wave1"></canvas>
<canvas id="wave2"></canvas>
<canvas id="wave3"></canvas>
fluctus("wave1", "#66a6ff", 1.2, 350, 1, 80);
fluctus("wave2", "#89DDFF", 1.2, 0, 0.5, 80);
fluctus("wave3", "#89f7fe", 0.9, 450, 0.5, 150);