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

three-inspector

v0.1.1

Published

A Three.js scene inspector for React Three Fiber applications

Readme

Three Inspector

npm version npm downloads License: MIT

A powerful scene inspector for React Three Fiber applications, inspired by Unity's scene hierarchy and inspector panels.

Three Inspector Demo

Features

  • React Three Fiber Integration: Simply add the <ThreeInspector> component inside your <Canvas>
  • Toggle with Keyboard: Use Ctrl + I / Cmd + I to open/close the inspector
  • Free Look Navigation: Hold right mouse button to navigate the scene (WASD movement, mouse look)
    • Shift to move faster
    • Q/E to move down/up
  • Scene Hierarchy: Browse your scene structure in the Outliner panel
  • Object Filtering: Filter objects in the outliner by name (filters persist between sessions)
  • Visual Object Types: Easily distinguish different object types by their icons
  • Object Details: Inspect any object's properties including:
    • Name and type
    • Local and world positions
    • Rotations (in degrees) and scale

Installation

# npm
npm install three-inspector

# pnpm
pnpm add three-inspector

# yarn
yarn add three-inspector

Quick Start

Add the ThreeInspector component inside your React Three Fiber canvas:

import { Canvas } from '@react-three/fiber'
import { ThreeInspector } from 'three-inspector'
import 'three-inspector/dist/index.css'

function App() {
  return (
    <Canvas>
      <ThreeInspector />

      {/* Your scene content */}
      <mesh>
        <boxGeometry />
        <meshStandardMaterial />
      </mesh>
      <ambientLight intensity={0.5} />
      <directionalLight position={[10, 10, 5]} />
    </Canvas>
  )
}

That's it! Press Ctrl+I (or Cmd+I on Mac) to open the inspector.

Usage Notes

Performance Consideration

To optimize performance, Three Inspector takes over the rendering loop when opened. Your scene's rendering will be paused while the inspector is active. The inspector will:

  1. Set scene.userData.isRenderedByInspector to true
  2. Dispatch inspectorOpened and inspectorClosed events on the canvas element

You can listen for these events to adjust your application's behavior:

useEffect(() => {
  const canvas = document.querySelector('canvas')

  const handleInspectorOpen = () => {
    // Pause your animations or other performance-heavy operations
  }

  const handleInspectorClose = () => {
    // Resume normal rendering
  }

  canvas.addEventListener('inspectorOpened', handleInspectorOpen)
  canvas.addEventListener('inspectorClosed', handleInspectorClose)

  return () => {
    canvas.removeEventListener('inspectorOpened', handleInspectorOpen)
    canvas.removeEventListener('inspectorClosed', handleInspectorClose)
  }
}, [])

Extending with Custom Detail Panels

The object details panel system is modular and extensible. You can create custom panels for your specialized object types.

import { BasePanel, PropertyRow, registerCustomDetailPanel } from 'three-inspector'
import { Object3D } from 'three'

// Your custom Three.js object
class MyCustomObject extends Object3D {
  customProperty = 'Custom Value'
  anotherProperty = 42
}

// Create a custom panel component
function MyCustomObjectPanel({ object }: { object: Object3D }) {
  const customObj = object as MyCustomObject

  return (
    <BasePanel title='My Custom Object' object={object}>
      <PropertyRow label='Custom Prop' value={customObj.customProperty} />
      <PropertyRow label='Another Prop' value={customObj.anotherProperty} />
    </BasePanel>
  )
}

// Register your custom panel
registerCustomDetailPanel({
  component: MyCustomObjectPanel,
  shouldShow: (obj) => obj instanceof MyCustomObject,
  order: 25 // Controls where in the panel list it appears
})

For more details on extending the inspector, see the Object Details Panel documentation.

Built-in Detail Panels

The inspector includes specialized panels for different Three.js object types:

  • ObjectPanel: Basic Object3D properties (shown for all objects)
  • TransformPanel: Position, rotation, and scale
  • MeshPanel: Mesh-specific properties
  • GeometryPanel: Geometry information
  • MaterialPanel: Material properties
  • LightPanel: Light-specific properties
  • CameraPanel: Camera-specific properties
  • InstancedMeshPanel: InstancedMesh properties
  • SkinnedMeshPanel: Skinned mesh properties

Requirements

Peer Dependencies

  • React: ^18.0.0 || ^19.0.0
  • React DOM: ^18.0.0 || ^19.0.0
  • React Three Fiber: ^8.0.0 || ^9.0.0
  • Three.js: ^0.164.0

Development

# Install dependencies
pnpm install

# Start development server with example app
pnpm dev

# Build the library
pnpm build

# Run tests
pnpm test

Project Roadmap

v1.0.0 (Current Focus)

  • React Three Fiber support

v2.0.0 (Future)

  • Vanilla Three.js support
  • Hook into any Three.js scene with ThreeInspector.open(scene, renderer, camera?)
  • Match inspector viewport with main camera position

License

MIT