{"id":13680641,"url":"https://github.com/threlte/three-inspect","last_synced_at":"2025-04-12T10:51:31.771Z","repository":{"id":61662601,"uuid":"539269226","full_name":"threlte/three-inspect","owner":"threlte","description":"An inspector and debugger for Three.js","archived":false,"fork":false,"pushed_at":"2024-06-30T00:16:59.000Z","size":161884,"stargazers_count":52,"open_issues_count":5,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-03T16:07:08.661Z","etag":null,"topics":["3d","threejs"],"latest_commit_sha":null,"homepage":"","language":"Svelte","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/threlte.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-09-21T02:17:29.000Z","updated_at":"2025-03-24T14:31:53.000Z","dependencies_parsed_at":"2023-12-23T23:49:01.849Z","dependency_job_id":"f6da8489-0dc0-4c2e-9286-b974a48bd1fd","html_url":"https://github.com/threlte/three-inspect","commit_stats":null,"previous_names":["michealparks/three-debug","threlte/three-inspect","michealparks/three-inspect"],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/threlte%2Fthree-inspect","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/threlte%2Fthree-inspect/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/threlte%2Fthree-inspect/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/threlte%2Fthree-inspect/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/threlte","download_url":"https://codeload.github.com/threlte/three-inspect/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248557844,"owners_count":21124165,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["3d","threejs"],"created_at":"2024-08-02T13:01:19.668Z","updated_at":"2025-04-12T10:51:31.734Z","avatar_url":"https://github.com/threlte.png","language":"Svelte","funding_links":[],"categories":["Svelte"],"sub_categories":[],"readme":"# three-inspect\n\n\u003e [!WARNING]  \n\u003e `three-inspect` is a young project, and breaking changes will likely happen before 1.0.0. If you encounter problems please report them!\n\n`three-inspect` is an inspector for Three.js projects. It is designed to be minimalistic, powerful, and extensible, with little boilerplate required.\n\n```bash\nnpm i --save-dev three-inspect\n```\n\n\u003cdiv style='display:flex; gap: 1rem; justify-content: space-between'\u003e\n  \u003ca target='_tab' href='https://michealparks.github.io/threlte-xr/bonksaber'\u003e\n    \u003cimg width='400' src='https://raw.githubusercontent.com/threlte/three-inspect/main/static/screen1.gif'\u003e\n  \u003c/a\u003e\n\n  \u003ca target='_tab' href='https://michealparks.github.io/threlte-xr/hand-physics'\u003e\n    \u003cimg width='400' src='https://raw.githubusercontent.com/threlte/three-inspect/main/static/screen2.gif'\u003e\n  \u003c/a\u003e\n\u003c/div\u003e\n\n![A screenshot of three-inspect in action](https://raw.githubusercontent.com/michealparks/three-inspect/main/assets/screen.gif)\n\nCurrently, it covers:\n\n- Creating a view of the scene graph and editing object properties, such as materials, transforms, etc.\n- Viewing / editing textures.\n- Scene helpers (Grid / Axes), light helpers, shadow camera helpers.\n- Performance monitoring (resources, framerate, memory, capabilities, misc. stats).\n\n`three-inspect` uses [Tweakpane](https://cocopon.github.io/tweakpane/) \u003c3 for its input UI .\n\n### Getting started\n\n`three-inspect` is built with first-class support for [Threlte](https://threlte.xyz), but can be used without a framework or with other Frameworks such as React Three Fiber, for this setup see the section below.\n\nIf you are using Threlte, simply create the inspector by importing the `\u003cInspector\u003e` component. The `\u003cInspector\u003e` component must be placed in a separate child component of your `\u003cCanvas\u003e`.\n\n```svelte\n\u003c!-- App.svelte --\u003e\n\u003cscript\u003e\n  import { Canvas } from '@threlte/core'\n  import Scene from './Scene.svelte'\n\u003c/script\u003e\n\n\u003cCanvas\u003e\n  \u003cScene /\u003e\n\u003c/Canvas\u003e\n```\n\n```svelte\n\u003c!-- Scene.svelte --\u003e\n\u003cscript\u003e\n  import { Inspector } from 'three-inspect'\n\u003c/script\u003e\n\n\u003cInspector /\u003e\n```\n\nOnce running, the inspector can be toggled with the `i` key.\n\n### Getting started (Vanilla, R3F, TresJS, etc.)\n\n`three-inspect` can be used in any Three.js-based environment by importing the `createInspector` function.\n\n```ts\nimport { createInspector } from 'three-inspect/vanilla'\n\nconst targetElement = document.querySelector('div')\nconst inspector = createInspector(targetElement, {\n  scene,\n  camera,\n  renderer,\n})\n\n// When you're finished with the inspector...\ninspector.dispose()\n```\n\n### Extending\n\n`three-inspect` uses [`svelte-tweakpane-ui`](https://kitschpatrol.com/svelte-tweakpane-ui) under the hood, and can be extended by adding additional tweakpane tabs or panes.\n\n```svelte\n\u003c!-- Scene.svelte --\u003e\n\u003cscript\u003e\n  import { Inspector } from 'three-inspect'\n  import { TabPage, Slider } from 'svelte-tweakpane-ui'\n\n  let foo = 1\n  let bar = 0\n\u003c/script\u003e\n\n\u003cInspector\u003e\n  \u003cTabPage\n    slot=\"inspector\"\n    title=\"world\"\n  \u003e\n    \u003cSlider\n      bind:value={foo}\n      label=\"Foo\"\n      min={1}\n      max={30}\n    /\u003e\n    \u003cSlider\n      bind:value={bar}\n      label=\"Bar\"\n      min={0}\n      max={1}\n    /\u003e\n  \u003c/TabPage\u003e\n\u003c/Inspector\u003e\n```\n\nNote that some features, such as extending the UI, are not possible using this function.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthrelte%2Fthree-inspect","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthrelte%2Fthree-inspect","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthrelte%2Fthree-inspect/lists"}