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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@genart-dev/plugin-distribution

v0.2.0

Published

Distribution and packing plugin for genart.dev

Readme

@genart-dev/plugin-distribution

Distribution and packing plugin for genart.dev — spatial distribution algorithms (Poisson disk, phyllotaxis, hex grid, and more), circle/rect packing, growth simulations, and Wave Function Collapse tiling. Includes guide layers for non-destructive previews and MCP tools for AI-agent control.

Part of genart.dev — a generative art platform with an MCP server, desktop app, and IDE extensions.

Examples

Algorithm gallery

All 10 distribution algorithms side by side — from structured grids to quasi-random sequences.

Circle packing

Non-overlapping circle packing via trial-and-reject with variable radii.

Source files: algorithm-gallery.genart · circle-packing.genart

Install

npm install @genart-dev/plugin-distribution

Usage

import distributionPlugin from "@genart-dev/plugin-distribution";
import { createDefaultRegistry } from "@genart-dev/core";

const registry = createDefaultRegistry();
registry.registerPlugin(distributionPlugin);

// Or access individual exports
import {
  previewLayerType,
  voronoiLayerType,
  densityLayerType,
  distributionMcpTools,
} from "@genart-dev/plugin-distribution";

Guide Layers

All three layer types are guide layers — they render overlays and can be cleared non-destructively.

Distribution Preview (distribution:preview)

Renders generated points as colored dots.

| Property | Type | Default | Description | |----------|------|---------|-------------| | algorithm | string | "poisson-disk" | Algorithm name | | params | string (JSON) | "{}" | Algorithm parameters | | dotSize | number | 3 | Dot radius (0.5–20) | | dotColor | color | "#0088ff" | Dot color | | opacity | number | 0.6 | Overlay opacity (0–1) |

Voronoi Overlay (distribution:voronoi)

Renders Voronoi cell edges from a point set.

| Property | Type | Default | Description | |----------|------|---------|-------------| | strokeColor | color | "#333333" | Edge color | | strokeWidth | number | 1 | Edge width (0.5–5) | | fillColor | color | "transparent" | Cell fill color | | opacity | number | 0.7 | Overlay opacity (0–1) |

Density Map (distribution:density)

Kernel density estimation heatmap with built-in colormaps (viridis, plasma, inferno, hot, cool).

| Property | Type | Default | Description | |----------|------|---------|-------------| | radius | number | 30 | Kernel radius (5–100) | | colormap | string | "viridis" | Color map name | | opacity | number | 0.65 | Overlay opacity (0–1) |

Distribution Algorithms

| Algorithm | Key Parameters | |-----------|----------------| | poisson-disk | minDist (20), maxAttempts (30) | | phyllotaxis | count (200), scale | | hex-grid | size (20) | | tri-grid | size (20) | | jittered-grid | size (30), jitter (0.5) | | r2-sequence | count (100) | | halton | count (100) | | best-candidate | count (100), candidates (10) | | latin-hypercube | count (100) | | lloyd-relax | count (100) |

All stochastic algorithms accept a seed parameter for reproducibility.

MCP Tools (8)

| Tool | Description | |------|-------------| | distribute_points | Generate a spatial point distribution (10 algorithms) | | pack_circles | Pack non-overlapping circles (trial-and-reject) | | pack_rects | Pack rectangles into a bin (guillotine algorithm) | | preview_distribution | Generate distribution and add a preview guide layer | | clear_distribution_preview | Remove distribution guide layers | | grow_pattern | Run a growth algorithm (DLA, differential growth, substrate) | | tile_region | Tile a region using Wave Function Collapse | | distribute_along_path | Distribute points along a polyline by arc-length |

Related Packages

| Package | Purpose | |---------|---------| | @genart-dev/core | Plugin host, layer system (dependency) | | @genart-dev/mcp-server | MCP server that surfaces plugin tools to AI agents |

Support

Questions, bugs, or feedback — [email protected] or open an issue.

License

MIT