depthview-mcp 0.1.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +64 -19
- package/dist/cli.js +1009 -1194
- package/dist/probe.js +782 -0
- package/package.json +5 -1
- package/skill/SKILL.md +583 -54
- package/skill/references/award-sites.md +175 -0
- package/skill/references/extension-ui.md +190 -0
- package/skill/references/modeling.md +198 -0
- package/skill/references/particles.md +137 -0
- package/skill/references/performance.md +114 -0
- package/skill/references/r3f.md +151 -0
- package/skill/references/rendering.md +150 -0
- package/skill/references/shaders.md +200 -0
- package/skill/references/site-build.md +288 -0
- package/skill/references/threejs.md +387 -0
- package/skill/references/visual-qa.md +152 -0
- package/skill/references/volumetrics.md +165 -0
package/README.md
CHANGED
|
@@ -8,10 +8,10 @@ files. It runs on your machine, listens on `127.0.0.1` only, and never contacts
|
|
|
8
8
|
## Quick start with Claude Code
|
|
9
9
|
|
|
10
10
|
Easiest: install the plugin (server, skill and slash commands in one step), see
|
|
11
|
-
[
|
|
11
|
+
[the plugin repository](https://github.com/himavamsi12/depthview-plugin):
|
|
12
12
|
|
|
13
13
|
```text
|
|
14
|
-
/plugin marketplace add himavamsi12/depthview
|
|
14
|
+
/plugin marketplace add himavamsi12/depthview-plugin
|
|
15
15
|
/plugin install depthview@depthview
|
|
16
16
|
```
|
|
17
17
|
|
|
@@ -46,7 +46,7 @@ rewritten immediately with AST editing: no AI involved, formatting and comments
|
|
|
46
46
|
Edits that cannot be mapped exactly (values computed in code, props spread from a variable) are
|
|
47
47
|
queued for an AI agent through MCP.
|
|
48
48
|
|
|
49
|
-
Your project needs
|
|
49
|
+
Your project needs `depthview-r3f-bridge` so objects know which JSX element created them.
|
|
50
50
|
|
|
51
51
|
## Connecting Claude Code or Cursor
|
|
52
52
|
|
|
@@ -70,6 +70,18 @@ Or let the client start the server itself (stdio). The pairing code is then avai
|
|
|
70
70
|
`npx depthview-mcp init` writes that config and copies `skill/SKILL.md` into
|
|
71
71
|
`.claude/skills/depthview/`, which teaches Claude Code the workflow.
|
|
72
72
|
|
|
73
|
+
## Without the extension
|
|
74
|
+
|
|
75
|
+
The agent can work on a scene with no extension installed. `open_preview { url }` starts the
|
|
76
|
+
Chrome (or Chromium, Edge, Brave) on your machine in headless mode with a throw-away profile,
|
|
77
|
+
loads your dev page and gives it the same hook the extension uses. From then on the live
|
|
78
|
+
tools below work on that page: screenshots, the scene, values, shaders, effects, the realism
|
|
79
|
+
look, the visual audit, performance. It can emulate any screen (`width`, `height`,
|
|
80
|
+
`pixelRatio`: 390 × 844 at 3 is a phone). Set `DEPTHVIEW_CHROME` to use a particular browser.
|
|
81
|
+
|
|
82
|
+
Not in the preview: camera-path recording and editing, and seeing it yourself. Pair the
|
|
83
|
+
extension for those; when it is paired, it is used instead.
|
|
84
|
+
|
|
73
85
|
## Tools
|
|
74
86
|
|
|
75
87
|
| Tool | What it does |
|
|
@@ -99,21 +111,51 @@ Live scene (the inspector must be open on the page):
|
|
|
99
111
|
|
|
100
112
|
Measure, diagnose and try things live:
|
|
101
113
|
|
|
102
|
-
| Tool
|
|
103
|
-
|
|
|
104
|
-
| `get_performance`
|
|
105
|
-
| `get_resources`
|
|
106
|
-
| `get_errors`
|
|
107
|
-
| `get_lighting`
|
|
108
|
-
| `get_animated_values`
|
|
109
|
-
| `
|
|
110
|
-
| `
|
|
111
|
-
| `
|
|
112
|
-
| `
|
|
113
|
-
| `
|
|
114
|
-
| `
|
|
115
|
-
| `
|
|
116
|
-
| `
|
|
114
|
+
| Tool | What it does |
|
|
115
|
+
| ---------------------- | -------------------------------------------------------------------- |
|
|
116
|
+
| `get_performance` | Frame rate, frame time, draw calls, triangles, render passes |
|
|
117
|
+
| `get_resources` | Textures, geometries and materials by GPU memory |
|
|
118
|
+
| `get_errors` | Uncaught errors, console errors and warnings, failed shader programs |
|
|
119
|
+
| `get_lighting` | Lights and shadow set-up, with the problems found |
|
|
120
|
+
| `get_animated_values` | Which values the site's own code drives, over time or on scroll |
|
|
121
|
+
| `get_camera_views` | The view on load and at each section: pose, hold, changed |
|
|
122
|
+
| `set_camera_view` | Set a view: frame an object, exact pose, or the developer's own view |
|
|
123
|
+
| `get_camera_path` | The site camera along the scroll |
|
|
124
|
+
| `edit_camera_path` | Edit the scroll path live: start, move/add/remove keys, preview |
|
|
125
|
+
| `get_camera_path_edit` | The edited path: keys, changes, JSON and code |
|
|
126
|
+
| `save_camera_path` | Write it into the project as `camera-path.json` |
|
|
127
|
+
| `get_realism` | Realism score out of 100, what is missing, and the current look |
|
|
128
|
+
| `fix_realism` | One-click fixes: tone mapping, pixel ratio, world, shadows, bevels |
|
|
129
|
+
| `set_look` | Tune colour, world lighting, shadows, bevels and lens effects |
|
|
130
|
+
| `set_surface` | What one object is made of: a preset or single values |
|
|
131
|
+
| `measure_look_cost` | Frame rate with and without the look, and what each part costs |
|
|
132
|
+
| `lighten_look` | Step the look down until the frame rate is back |
|
|
133
|
+
| `adapt_model` | Fit the look to a new model; measure its size and grounding |
|
|
134
|
+
| `compare_to_reference` | Differences from a reference picture, with a look change for each |
|
|
135
|
+
| `find_assets` | Search free CC0 models, textures and lighting panoramas (Poly Haven) |
|
|
136
|
+
| `import_asset` | Download one into the project within a size budget, with its code |
|
|
137
|
+
| `create_scene` | Write a starter scene: objects, look, camera path, controls |
|
|
138
|
+
| `save_look` | Write the look into the project as `depthview-look.json` |
|
|
139
|
+
| `get_site_controls` | Controls the site declares with `depthviewControls` |
|
|
140
|
+
| `set_site_control` | Change one of them live |
|
|
141
|
+
| `save_site_controls` | Write changed control values back into the source |
|
|
142
|
+
| `get_shader` | The GLSL that runs, with line numbers |
|
|
143
|
+
| `set_shader` | Try a shader live; compile errors come back, a broken one is undone |
|
|
144
|
+
| `add_object` | Add a copy, a primitive, a group or a light; returns its JSX |
|
|
145
|
+
| `open_preview` | Open the page in a headless Chrome: every live tool, no extension |
|
|
146
|
+
| `close_preview` | Close that browser |
|
|
147
|
+
| `patch_shader` | Inject GLSL into a built-in material; returns the onBeforeCompile |
|
|
148
|
+
| `list_effects` | Effect kinds, presets and every uniform with its range |
|
|
149
|
+
| `add_effect` | Particles, smoke, clouds, fog or a custom GLSL object, live |
|
|
150
|
+
| `set_effect` | Tune an effect: uniforms, count, blending, shader source |
|
|
151
|
+
| `get_effect_code` | The effect as an R3F component or a three.js module |
|
|
152
|
+
| `audit_visuals` | Visual bugs from the set-up and the pixels of a real frame |
|
|
153
|
+
| `audit_camera_motion` | Is the scroll camera cinematic: jumps, reversals, pacing, roll |
|
|
154
|
+
| `get_guide` | Reference guides: award-level sites, rendering, shaders, particles… |
|
|
155
|
+
| `remove_object` | Take an object out of the live scene |
|
|
156
|
+
| `set_scroll` | Scroll the site to a position |
|
|
157
|
+
| `set_time` | Hold, step or release the site's animation |
|
|
158
|
+
| `set_viewport` | Resize the window, set the pixel ratio; `reset` to undo |
|
|
117
159
|
|
|
118
160
|
`take_screenshot` takes a `view`: `site` (the page as a visitor sees it), `scene` (the
|
|
119
161
|
inspector's 3D view) or the whole tab.
|
|
@@ -128,7 +170,10 @@ Not only Claude Code with the skill: any MCP client (Claude Desktop, Cursor, …
|
|
|
128
170
|
`get_changes` and `apply_changes_to_code` say which step to take now. `set_value(s)` report
|
|
129
171
|
`overwritten: true` when the site's own code moved the value back (it is animated).
|
|
130
172
|
- **Prompts** (slash commands in the client): `pair`, `tune` (with a goal), `apply`,
|
|
131
|
-
`
|
|
173
|
+
`camera-views` (with what each view should show), `camera-path`, `realism` (with the look
|
|
174
|
+
you are after), `new-scene` (with what the page is
|
|
175
|
+
for), `performance`. In Claude Code:
|
|
176
|
+
`/mcp__depthview__tune warmer light`, `/mcp__depthview__realism silver product shot`.
|
|
132
177
|
- **Resources**: `depthview://status`, `depthview://scene`, `depthview://selection`,
|
|
133
178
|
`depthview://changes`.
|
|
134
179
|
|