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

@nodetool-ai/model3d

v0.8.1

Published

Shared 3D scene document: glTF read/write, primitive geometry, the editor's scene operations, and validation

Readme

@nodetool-ai/model3d

The 3D scene document: glTF 2.0 reading and writing, primitive geometry, the scene operations the editor exposes, and the static check behind validate_model3d.

One implementation serves both 3D surfaces. The browser's ui_3d_* tools drive a live three.js scene; the model3d agent capability runs the same verbs against the glTF file itself, so an agent can build and edit a model with no editor open and what it saves opens in the editor unchanged.

import {
  applyOperations,
  createModel3DFile,
  listScene,
  serializeModel3D,
  validateModel3D
} from "@nodetool-ai/model3d";

const file = createModel3DFile("Studio");
applyOperations(file, [
  { op: "add_object", kind: "box" },
  { op: "set_material_color", target: "Box", color: "#ff8800" },
  { op: "add_object", kind: "directionalLight" }
]);

validateModel3D(file.json).ok; // true
listScene(file.json); // one Mesh + one DirectionalLight
serializeModel3D(file); // .gltf bytes, ready to store as an asset

What it keeps

An operation touches the nodes it names and nothing else: an imported model keeps its meshes, textures, skins, animations and extensions. Deleting a node renumbers glTF's node array, so every reference to one — scene roots, children, animation channel targets, skin joints — is remapped in the same pass.

Units follow the editor's Properties panel, not glTF's storage form: rotation is Euler degrees in three.js's XYZ order, and a material's base color is a CSS hex string, converted to and from the linear-space factor glTF stores.

Object ids live in node.extras.nodetool_id, minted on the first edit. Without them a delete would make an id an agent already holds point at a different object, since glTF addresses nodes by array index.

What it does not do

No rendering. ui_3d_capture_view and ui_3d_frame_scene need a WebGL context and a camera; the headless substitute is sceneBounds, which reports the scene's world-space extent from each mesh's accessor bounds.