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

lambda360view

v0.1.12

Published

A 3D viewer library for CAD-like models with edge display

Readme

lambda360view

Live Demo

A React component library for displaying 3D CAD-like models with edge rendering, built with react-three-fiber.

Hexapod Demo

Features

  • 📦 Load GLB binary models directly from ArrayBuffer
  • ✏️ Edge line rendering for CAD-style visualization using orphan accessors
  • 🖱️ Built-in orbit controls (rotate, zoom, pan)
  • 📐 Automatic camera positioning based on bounding box
  • 📏 Distance and point annotations support
  • 🔄 Seamless model switching without flickering or resetting camera state
  • 🎛️ Built-in View Menu (Isometric, Front, Top, etc.) and Axis Helper
  • ⚛️ Pure React + TypeScript implementation

Installation

npm install lambda360view

Peer Dependencies

This library requires React 18+ and Three.js as peer dependencies:

npm install react react-dom three @react-three/fiber @react-three/drei

Usage

import { useState, useEffect } from 'react';
import { Lambda360View } from 'lambda360view';

function App() {
  const [model, setModel] = useState<ArrayBuffer | null>(null);

  useEffect(() => {
    // Load GLB file as ArrayBuffer
    fetch('/my-model.glb')
      .then((res) => res.arrayBuffer())
      .then((buffer) => setModel(buffer));
  }, []);

  return (
    <Lambda360View
      model={model}
      center={!model ? <div>Loading model...</div> : undefined}
      backgroundColor="#f0f0f0"
      edgeColor="#000000"
      showEdges={true}
      showViewMenu={true}
      orthographic={true}
      upAxis="Z"
      style={{ width: '100vw', height: '100vh' }}
    />
  );
}

Props

Lambda360View inherits all standard React.HTMLAttributes<HTMLDivElement> props (such as style, className, onClick, etc.) and accepts the following specific props. (Note: Because the root element of this component is a <div />, any standard HTML attributes passed to Lambda360View will be applied directly to that root div.)

| Prop | Type | Default | Description | |------|------|---------|-------------| | model | ArrayBuffer \| null | required | GLB binary data to load directly, or null for empty state | | center| React.ReactNode | - | Arbitrary React node to display in the center (e.g. loading spinner, error message) | | backgroundColor | string | "#1a1a2e" | Canvas background color | | edgeColor | string | "#000000" | Color for edge lines | | showEdges | boolean | true | Whether to render edges | | upAxis | 'Y' \| 'Z' \| '-Y' \| '-Z' | 'Y' | Up axis direction of the model | | orthographic | boolean | false | Use orthographic camera instead of perspective | | showViewMenu | boolean | false | Show built-in view control menu bar | | footer | React.ReactNode | - | Footer content to display at the bottom | | annotations | Annotation[] | - | Array of point/distance annotations to display | | preserveCamera | boolean | true | Preserve camera state (pos/zoom) when model changes |

Annotations

You can pass an array of annotations to display labels or measurements on the 3D model:

import type { Annotation } from 'lambda360view';

const annotations: Annotation[] = [
  {
    type: 'point',
    position: [152, 100, 44],
    label: 'Material: SUS304',
  },
  {
    type: 'distance',
    start: [-152, -87, -62],
    end: [152, -87, -62],
    label: '304mm',
  }
];

GLB Specification Requirements

For the edge rendering to work correctly, the GLB file must follow our specific structure. Please refer to the detailed GLB Specification document.

Key requirements:

  • Edges must be stored as an orphan accessor (FLOAT, VEC3) containing line segment pairs
  • The root extras object must contain edgeAccessor pointing to the correct accessor index:
    {
      "extras": {
        "edgeAccessor": 3
      }
    }

Example

See the examples directory for a complete Next.js example displaying a hexapod robot model.

# Run the example
make -C examples generate run

License

MIT

Author

lzpel