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

synapse-bg-wc

v1.0.0

Published

A performant and configurable background element that generates a network of connected nodes over which subtle, dynamic signal traversal is simulated.

Downloads

1

Readme

synapse-bg: Web Component

A performant and configurable background element that generates a network of connected nodes over which subtle, dynamic signal traversal is simulated.

Installation

From npm

Run npm install synapse-bg-wc in your project directory, then follow one of the two registration procedures below.

Registering Component from JS/TS

Import the module in client-side code or template file: import 'synapse-bg-wc';

Registering Component in HTML

Include this script element in your template or html:

<script type="module" src="<build directory>/synapse-bg-wc.js"></script>

Usage

As Custom Element

Add <synapse-bg></synapse-bg> to your template or html, making sure to include the mandatory closing tag.

The element and its internal canvases will grow to fill the viewport or parent element, and automatically resize when size changes.

Fill Viewport

If included as a direct descendant of the document body, the element will grow to fill the entire viewport and fix its position.

Fill Container

If nested within any descendant of the document body, the element will take absolute position over the container and grow to fit it.

Configuration

Element Attributes

Optionally include any, all, or none of the configuration attributes in the element tag. For example:

<synapse-bg
  color="hotpink"
  nodes="10"
  speed-scale="2"
  tracer-scale="6"
></synapse-bg>

Attribute Guide

color: Defines base color of rendered entities

  • Can be any valid CSS <color> keyword or string in any common colorspace, e.g. darkslateblue, #483d8b, rgb(72 61 139)
  • If omitted or invalid, defaults to black.

nodes: Defines number of nodes generated for each network

  • Must be an integer greater than or equal to 2
  • If omitted or invalid, defaults to 5 for a relatively subtle effect

speed-scale: Multiplies base traversal speed of network signals

  • Base speed is one percent of one coordinate space unit per render cycle
  • Must be a number greater than 0
  • If omitted or invalid, defaults to 1

tracer-scale: Multiplies width at which tracers are drawn along network

  • Base width is one coordinate space unit
  • Must be a number greater than 0
  • If omitted or invalid, defaults to 1