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

@vectojs/graph3d

v0.4.0

Published

3D force-directed graph visualization for VectoJS: pluggable layout engines and an instanced Three.js renderer

Readme

@vectojs/graph3d

3D force-directed graph visualization for VectoJS: pluggable layout engines behind one GraphLayout interface, plus an instanced Three.js renderer that draws any graph in two draw calls.

Install

bun add @vectojs/graph3d three

Usage

import { D3ForceLayout, Graph3D } from '@vectojs/graph3d';
import * as THREE from 'three';

const data = {
  nodes: [{ id: 'vectojs', val: 8, color: '#4f9cff' }, { id: 'core' }, { id: 'ui' }],
  links: [
    { source: 'vectojs', target: 'core' },
    { source: 'vectojs', target: 'ui' },
  ],
};

const layout = new D3ForceLayout();
layout.setGraph(data);

const graph = new Graph3D();
graph.setGraphData(data);
scene.add(graph.group);

function animate() {
  const active = layout.step();
  graph.applyPositions(layout.positions);
  renderer.render(scene, camera);
  if (active) requestAnimationFrame(animate);
}
animate();

Design

  • GraphLayout — the layout contract: positions out as one flat Float32Array of xyz triplets, so an engine can run in a Web Worker and stream its buffer across as a transferable. D3ForceLayout adapts d3-force-3d (the engine behind 3d-force-graph); more adapters (ngraph) and DAG modes are planned.
  • Graph3D — one InstancedMesh for all nodes (per-instance color, radius ∝ ∛val) and one LineSegments for all links, under a single THREE.Group. It consumes any GraphLayout-shaped positions buffer and knows nothing about how they were computed.
  • Node objects are never mutated; domain properties ride along untouched. fx/fy/fz pin nodes in place.

Interactive in-world node cards and HUD components built on @vectojs/ui + @vectojs/three (scene-to-texture billboards that keep working in WebXR) are the next layer on this package's roadmap.

License

MIT