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

@threejson/scene-tools

v0.1.0-alpha.4

Published

Shared ThreeJSON scene sessions for Node CLI, MCP and opt-in browser verification.

Readme

@threejson/scene-tools

Persistent ThreeJSON scene sessions for Node CLI and MCP. No Python, browser or model key is required for ordinary editing. 中文协议文档 · English protocol

Setup

Requires Node 24+. In the repository run npm install once. The package is included in the release pipeline; until its first publication, use repository commands instead of npx fetching a nonexistent version.

npm run scene-tools -- discover
npm run scene-tools -- query --file scene.json
npm run scene-tools -- preflight --file scene.json --commands edits.json
npm run scene-tools -- apply --file scene.json --commands edits.json --output edited.json

After publishing/installing the package, the equivalent command is threejson .... edits.json accepts a command object, array or JSONL script. Writes are opt-in: --write replaces the opened source only if its hash is unchanged; --output creates a new file. Existing destinations require --expected-version <SHA256>. A .threejson-lock prevents cooperating writers from racing; inspect a stale lock before removing it. No unsafe overwrite retry. Receipts/errors use JSON on stdout; diagnostic logs go to stderr. check exits nonzero for failed or unchecked postconditions, even when observation itself succeeded.

--runtime explicitly compiles a headless Three.js scene for applicable commands. It does not create a canvas; capture/raycast availability depends on actual adapters. Read each receipt's checks.

MCP

Configure your MCP client with an absolute path to the local Node entry:

{ "mcpServers": { "threejson": {
  "command": "node",
  "args": ["/absolute/path/ThreeJSON/packages/scene-tools/bin/threejson-mcp.mjs"]
} } }

After package publication you may use its installed threejson-mcp binary. There is no nested LLM. Use session.open → scene.discover → op.scene.query → scene.preflight → scene.apply → scene.save. Use sessionId/baseRevision/requestId for writes, scene.undo/redo for history. session.list/close manage lifetime. job.start/get/cancel handle long work. A process restart expires sessions/request caches; reopen and reconcile. Each op.* input schema comes from the engine, not a separate hand-maintained MCP list.

Browser verification and live Editor

Optional: install playwright yourself and point to an already installed browser; no browser downloads occur.

threejson browser-check --file scene.json --browser "/path/to/browser"
threejson editor-bridge --origin http://localhost:5173

For Windows Edge, the typical executable is C:/Program Files (x86)/Microsoft/Edge/Application/msedge.exe. Pass --capabilities modeling,complexMesh,webgpu,postprocessing only when required. Browser checks use local ESM files and the scene file's directory for relative assets, with ordinary CORS. The optional JavaScript API supports screenshot output, abort signal and timeout.

In Editor Settings choose “连接本机场景工具…”, enter pairingUrl and approve. Keep agentToken secret. Use MCP editor.call/editor.result, or threejson editor-call --options private.local and threejson editor-result --options private.local; options contain url/token/method/params/requestId. Result lookup omits method. Never resend an uncertain edit with a new ID. Explicitly disconnect or Ctrl+C the relay when finished. Browser local-network restrictions can require permission.

Optional AI, textures and assets

threejson ai --config setting.json --prompt "A blue cube" --options generation.local
threejson ai --mode update --file scene.json --prompt "Move the chair two metres" --config setting.json --write
threejson texture --file scene.json --config setting.json --options texture.local --write
threejson asset-search --options search.local
threejson asset-import --options import.local

Copy setting.example.json to a private setting.json; prefer THREEJSON_AI_API_KEY and THREEJSON_TEXTURE_API_KEY environment variables. Generation options support image, agent, modelBudget, scenePath/writeScene; update uses the neutral service and optional protocol:"native" (default JSONL). No model/service calls happen unless these explicit commands are invoked. Texture dryRun still uses the semantic planner; it is not a no-network preview. Provider failures are errors, never simulated success.

Asset search accepts explicit urls or a provider {endpoint,headers,queryParameter} returning items/results. The JavaScript API also accepts a provider function. allowedLicenses is a host filter; unknown is never CC0. Import uses {source,directory,filename?,metadata?} and saves a SHA-256 name plus source/license sidecar. It does not overwrite different bytes. This replaces the old Node→Python chain; default web scraping and platform-binary guessing were retired. Existing user setting.json files and downloaded assets remain untouched.

Limits and extension points

This package does not claim CAD manufacturing validation or image-based aesthetic guarantees. AABB checks are approximations. Registered action callbacks are trusted host code with explicit transient effects. Engine cores import neither this package nor the MCP SDK. Browser verification/AI/asset acquisition are separate opt-in subpaths. Desktop product modernization remains separate work.