depthview-mcp 0.0.0-stage → 0.1.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 +144 -2
- package/dist/cli.js +1233 -0
- package/package.json +33 -4
- package/skill/SKILL.md +309 -0
package/package.json
CHANGED
|
@@ -1,6 +1,35 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "depthview-mcp",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Local MCP server for Depthview: receives edits from the browser extension and writes them into your React Three Fiber source code.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"bin": {
|
|
8
|
+
"depthview-mcp": "./dist/cli.js"
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"dist",
|
|
12
|
+
"skill",
|
|
13
|
+
"README.md"
|
|
14
|
+
],
|
|
15
|
+
"scripts": {
|
|
16
|
+
"build": "node build.mjs",
|
|
17
|
+
"typecheck": "tsc -p tsconfig.json",
|
|
18
|
+
"test": "vitest run",
|
|
19
|
+
"start": "node dist/cli.js"
|
|
20
|
+
},
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"@babel/parser": "^7.28.0",
|
|
23
|
+
"@modelcontextprotocol/sdk": "^1.32.2",
|
|
24
|
+
"recast": "^0.23.11",
|
|
25
|
+
"ws": "^8.18.0",
|
|
26
|
+
"zod": "^3.25.76"
|
|
27
|
+
},
|
|
28
|
+
"devDependencies": {
|
|
29
|
+
"@types/node": "^24.0.0",
|
|
30
|
+
"@types/ws": "^8.18.0",
|
|
31
|
+
"esbuild": "^0.25.0",
|
|
32
|
+
"typescript": "~5.9.3",
|
|
33
|
+
"vitest": "^3.2.7"
|
|
34
|
+
}
|
|
35
|
+
}
|
package/skill/SKILL.md
ADDED
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: depthview
|
|
3
|
+
description: Work on a three.js / React Three Fiber scene together with the Depthview browser inspector, through the Depthview MCP tools. Read the live scene, change lights, cameras, materials and shader uniforms on the running page, look at the result, and write the final values into the source code. Use when the user is building or tuning a 3D scene, says they changed something in Depthview, asks to "apply the Depthview edits", pastes a Depthview change list, or asks to pair or connect Depthview.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Depthview: tune a 3D scene live, then write it into the source
|
|
7
|
+
|
|
8
|
+
Depthview is a Chrome extension that opens on the developer's running site and shows its
|
|
9
|
+
three.js scene. Through the `depthview` MCP server you can use it as your eyes and hands:
|
|
10
|
+
|
|
11
|
+
- **Read** the scene that is really running (not what the code seems to say).
|
|
12
|
+
- **Measure** it: frame rate, draw calls, memory, shadows, errors.
|
|
13
|
+
- **Change** it on the live page at once, like a dat.GUI you can drive: values, shaders,
|
|
14
|
+
objects. No reload, no source edit, the developer watches it happen and can undo it.
|
|
15
|
+
- **Write** what is right into the source files.
|
|
16
|
+
|
|
17
|
+
The developer can also change things by hand in the inspector. Those changes reach you the same
|
|
18
|
+
way, through `get_changes`.
|
|
19
|
+
|
|
20
|
+
## 1. Connect
|
|
21
|
+
|
|
22
|
+
Call `get_status` first, always.
|
|
23
|
+
|
|
24
|
+
| `get_status` says | Do this |
|
|
25
|
+
| -------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
26
|
+
| `paired: false` | Give the developer the `pairingCode` and say: open your site in Chrome, click the Depthview icon, and type the code under **AI agent & code sync** in the side panel. Then stop and wait. |
|
|
27
|
+
| `paired: true`, `inspectorOpen: false` | Ask them to click the Depthview icon on their page and keep that tab in front. |
|
|
28
|
+
| `sceneAvailable: false` | The page has no readable three.js scene (not loaded yet, or it uses the WebGPU renderer). Say so. Do not guess values. |
|
|
29
|
+
| `sourceLocations: false` | Live tuning works. Exact source edits do not: you will find the code yourself (see section 4). Suggest adding `@depthview/r3f-bridge` once, do not insist. |
|
|
30
|
+
|
|
31
|
+
The pairing code is used once. If pairing fails, call `get_status` again for the new code.
|
|
32
|
+
If the `depthview` tools are missing, the project is not set up: tell the developer to run
|
|
33
|
+
`npx depthview-mcp init` in the project and restart the agent.
|
|
34
|
+
|
|
35
|
+
## 2. Look before you change
|
|
36
|
+
|
|
37
|
+
0. `describe_scene` once per task. It gives the scene's size in scene units (`scene.radius`),
|
|
38
|
+
what the camera looks at (`focus`), the camera and every light. Size every move and every
|
|
39
|
+
new object to that scale: a scene of radius 0.5 and one of radius 500 need very different
|
|
40
|
+
numbers.
|
|
41
|
+
1. `find_objects` to locate things. Search by part of a name or by type (`"light"`,
|
|
42
|
+
`"PerspectiveCamera"`), or filter with `kind`. Do not dump the whole tree for a big scene.
|
|
43
|
+
2. `get_object` for the one you care about. With no arguments it returns the object the
|
|
44
|
+
developer has selected, which is usually what "this" or "it" means in their message.
|
|
45
|
+
3. Read `editable`: it is the exact list of paths `set_value` accepts for that object, with
|
|
46
|
+
the current values. A path that is not in `editable` cannot be set.
|
|
47
|
+
4. `worldBounds` in `get_object` is the object's world-space box (`min`, `max`, `size`,
|
|
48
|
+
`center`). Use it to place things next to, on top of or in front of the object.
|
|
49
|
+
|
|
50
|
+
Use `uuid` to address objects. A `name` works only when it is unique in the scene. Ids change
|
|
51
|
+
when the page reloads: after a reload, or after a source edit that hot-reloads the scene, call
|
|
52
|
+
`find_objects` again instead of reusing old ids.
|
|
53
|
+
|
|
54
|
+
## 3. Tune live
|
|
55
|
+
|
|
56
|
+
`set_value` with `{ uuid, path, value }` changes the running page immediately. For a change
|
|
57
|
+
that touches several values (a lighting set-up, a camera move, a material look), use
|
|
58
|
+
`set_values` with `{ changes: [{ uuid, path, value }, …] }`: every change is checked first,
|
|
59
|
+
nothing is changed if one is wrong, and one `undo_change` takes all of them back.
|
|
60
|
+
|
|
61
|
+
- Think in degrees if you like: add `degrees: true` to a `rotation` or `angle` change and it is
|
|
62
|
+
converted to radians. Without it, those paths are radians.
|
|
63
|
+
- Results end with `next`: the step to take now. Follow it unless you have a reason not to.
|
|
64
|
+
- `overwritten: true` in a result means the site's own code moved the value back at once (it
|
|
65
|
+
is animated, scrolled or driven by state). Do not retry: see "is it animated?" below.
|
|
66
|
+
- Work in small steps and check: `take_screenshot` after a visible change, then adjust. One or
|
|
67
|
+
two rounds is normal. `compare: true` returns the previous picture of the same view next to
|
|
68
|
+
the new one, labelled before and after: take one picture before you start, then compare.
|
|
69
|
+
The tab must be in front. Three views:
|
|
70
|
+
- `view: "site"`: the real page as a visitor sees it, HTML included. Judge the result here.
|
|
71
|
+
- `view: "scene"`: the inspector's free camera with light and camera helpers. Use `angle`
|
|
72
|
+
(`front`, `side`, `back`) to see where things are in space.
|
|
73
|
+
- default: the whole tab with the inspector's panels.
|
|
74
|
+
- Call `select_object` on what you are changing, so the developer sees which object you mean.
|
|
75
|
+
- Start from the current value. To make a light "a bit warmer", read its colour and shift it;
|
|
76
|
+
do not replace it with an unrelated one.
|
|
77
|
+
- `undo_change` takes back the latest step. `reset_changes` puts everything back, including the
|
|
78
|
+
developer's own changes: ask before using it if `get_status` showed changes you did not make.
|
|
79
|
+
|
|
80
|
+
### Paths and values
|
|
81
|
+
|
|
82
|
+
| Path | Value |
|
|
83
|
+
| ----------------------------------------------------------------------------------------------------------------- | ------------------------------------ |
|
|
84
|
+
| `position`, `scale` | `[x, y, z]` |
|
|
85
|
+
| `rotation` | `[x, y, z]` Euler XYZ in **radians** |
|
|
86
|
+
| `visible`, `castShadow`, `receiveShadow` | boolean |
|
|
87
|
+
| `color`, `material.color`, `material.emissive` | `"#rrggbb"` |
|
|
88
|
+
| `intensity`, `distance`, `decay`, `angle`, `penumbra` (lights) | number (`angle` in radians) |
|
|
89
|
+
| `fov` (degrees), `near`, `far`, `zoom` (cameras) | number |
|
|
90
|
+
| `material.roughness`, `material.metalness`, `material.opacity`, `material.emissiveIntensity`, `material.size` | number |
|
|
91
|
+
| `material.transparent`, `material.wireframe`, `material.flatShading`, `material.depthTest`, `material.depthWrite` | boolean |
|
|
92
|
+
| `material.side` | `0` front, `1` back, `2` double |
|
|
93
|
+
| `uniform.<name>` | same type as the uniform has now |
|
|
94
|
+
|
|
95
|
+
The value must have the same shape as the current one: a number stays a number, a vector stays
|
|
96
|
+
`[x, y, z]`. `set_value` refuses anything else and says what it expected.
|
|
97
|
+
|
|
98
|
+
Things that cannot be changed live: adding or removing objects, geometry, swapping material
|
|
99
|
+
types, textures, shader source, animation code. Do those in the source.
|
|
100
|
+
|
|
101
|
+
`material.opacity` below 1 shows only when `material.transparent` is true.
|
|
102
|
+
|
|
103
|
+
## Before you write a value: is it animated?
|
|
104
|
+
|
|
105
|
+
Call `get_animated_values` before putting any `position`, `rotation`, `scale`, opacity or
|
|
106
|
+
uniform into the source, and whenever a `set_value` does not seem to stick.
|
|
107
|
+
|
|
108
|
+
- `overTime`: the site's code writes this value every frame.
|
|
109
|
+
- `onScroll`: the site's code writes it when the page scrolls.
|
|
110
|
+
|
|
111
|
+
A value in either list is driven by code (`useFrame`, a GSAP tween, an animation clip, a scroll
|
|
112
|
+
handler). A constant in JSX is then only its starting value, and `set_value` is overwritten on
|
|
113
|
+
the next frame. Change the code that drives it instead, and say so to the developer.
|
|
114
|
+
|
|
115
|
+
## Finding what is wrong
|
|
116
|
+
|
|
117
|
+
Start a "why is it slow / ugly / broken" task with the tool that measures it, not with a guess.
|
|
118
|
+
|
|
119
|
+
| Symptom | Tool | Look at |
|
|
120
|
+
| --------------------------------------- | ----------------- | ------------------------------------------------------------------------------------------------------------------ |
|
|
121
|
+
| Slow, stutter, hot laptop | `get_performance` | `fps`, `frameMs.p95`, `drawCalls`, `triangles`, `renderPasses`, `canvas.pixelRatio`, `passesOfOneFrame` |
|
|
122
|
+
| Slow to load, crashes on phones | `get_resources` | The biggest textures and geometries; `usedBy: 1` on a huge texture; many materials that look the same |
|
|
123
|
+
| Something does not show, a black object | `get_errors` | `shaderPrograms` (compile failures), then `errors` |
|
|
124
|
+
| Shadows blurry, cut off or missing | `get_lighting` | `issues` first: it names the light and the fix |
|
|
125
|
+
| Looks wrong at one scroll position | `set_scroll` | Then `take_screenshot` with `view: "site"` |
|
|
126
|
+
| Looks wrong at one moment | `set_time` | `pause`, then `step`, then screenshot. **Always `resume`.** |
|
|
127
|
+
| Wrong on small or dense screens | `set_viewport` | `width`/`height`, then screenshot; `pixelRatio: 2` or `3`, then `get_performance`. **Always `reset: true` after.** |
|
|
128
|
+
|
|
129
|
+
Rules of thumb for `get_performance` (they are starting points, not laws):
|
|
130
|
+
|
|
131
|
+
- Over about 200 draw calls: merge geometry, use `InstancedMesh`, or share materials.
|
|
132
|
+
- `renderPasses` well above 1 with no post-processing: shadow-casting lights. See `get_lighting`.
|
|
133
|
+
- `canvas.pixelRatio` above 2: cap it with `Math.min(devicePixelRatio, 2)`. Confirm with
|
|
134
|
+
`set_viewport { pixelRatio }` and a second measurement before claiming a gain.
|
|
135
|
+
- Frame rate equals the screen refresh rate at best. 60 on a 60 Hz screen says "fast enough",
|
|
136
|
+
not how much room is left: compare `frameMs.average` instead.
|
|
137
|
+
|
|
138
|
+
Prove a fix: measure, change, measure again, and report both numbers. To learn what one object
|
|
139
|
+
costs, `remove_object` it, measure, then `reset_changes`.
|
|
140
|
+
|
|
141
|
+
## Shaders
|
|
142
|
+
|
|
143
|
+
1. `get_shader` shows the GLSL that runs, with line numbers. When `kind` is `"compiled"` it is
|
|
144
|
+
the whole program with three.js's own code expanded: good for understanding, not for
|
|
145
|
+
pasting back.
|
|
146
|
+
2. Read the material's source in the project files. That is what you edit.
|
|
147
|
+
3. `set_shader` with the complete new `vertex` and/or `fragment` source tries it live. It
|
|
148
|
+
returns the compiler's errors with line numbers. A shader that does not compile is put back
|
|
149
|
+
at once, so nothing stays broken: fix and send again.
|
|
150
|
+
4. When it compiles and a `take_screenshot` looks right, write the same source into the file.
|
|
151
|
+
|
|
152
|
+
Only `ShaderMaterial` and `RawShaderMaterial` can be replaced (`canBeReplaced` in `get_shader`).
|
|
153
|
+
Built-in materials are changed through their properties, or in source with `onBeforeCompile`.
|
|
154
|
+
New uniforms cannot be added live: add them in the source. Existing ones are set with
|
|
155
|
+
`set_value` and the path `uniform.<name>`.
|
|
156
|
+
|
|
157
|
+
## Adding and removing objects
|
|
158
|
+
|
|
159
|
+
- `add_object { copyOf: uuid }` duplicates an object. Always possible.
|
|
160
|
+
- `add_object { kind }` makes a `box`, `sphere`, `plane`, `Group`, or a light of a type the page
|
|
161
|
+
already uses. The classes come from the site's own three.js, so a light type the page never
|
|
162
|
+
created cannot be made here: the error lists what can. Add other things in the source.
|
|
163
|
+
- The result carries `r3f`: the JSX for the new object. Tune it with `set_value`, then put the
|
|
164
|
+
JSX into the right component. `get_changes` lists everything added, with JSX, under `added`.
|
|
165
|
+
- `remove_object` takes an object out to see or measure the scene without it. It returns the
|
|
166
|
+
source location when known; delete the element there to remove it for good.
|
|
167
|
+
|
|
168
|
+
All of this is live only and gone after a reload. `reset_changes` puts added, removed and
|
|
169
|
+
re-shaded things back.
|
|
170
|
+
|
|
171
|
+
## 4. Write it into the source
|
|
172
|
+
|
|
173
|
+
When the scene looks right, or when the developer says they changed something in the inspector:
|
|
174
|
+
|
|
175
|
+
1. `get_changes`. It lists every value that differs from what the page loaded with: object,
|
|
176
|
+
path, original, current, and `source` (file, line, column, component, JSX prop) when known.
|
|
177
|
+
It also lists `added` objects (with JSX), `removed` objects and replaced `shaders`: those
|
|
178
|
+
are never written automatically, you put them into the source yourself. If everything is
|
|
179
|
+
empty, say so and stop.
|
|
180
|
+
2. `apply_changes_to_code`. It writes every change that has a source location. The result has
|
|
181
|
+
one entry per edit:
|
|
182
|
+
- `applied`: written to the file by exact AST replacement. Nothing more to do.
|
|
183
|
+
- `queued`: the server could not map it exactly (the value is computed, comes from a
|
|
184
|
+
variable or a spread). Finish it yourself, see below.
|
|
185
|
+
- `failed`: read `message` and report it.
|
|
186
|
+
- `unmapped` (a count): changes on objects with no source location. Write those yourself
|
|
187
|
+
from `get_changes`: find the element by the object's name, its type and its **original**
|
|
188
|
+
value, then change only that value.
|
|
189
|
+
3. For each `queued` edit: `get_edit_context` first, always, then either `apply_edit` with
|
|
190
|
+
`{ id, expression }` when the result is still one prop on that element, or edit the file
|
|
191
|
+
with your own tools and call `mark_edit_done` with `{ id, status: "done", note }`.
|
|
192
|
+
If it cannot or should not be applied: `mark_edit_done` with `status: "failed"` and a
|
|
193
|
+
one-line reason. Never leave an edit unreported.
|
|
194
|
+
4. `list_pending_edits` again to confirm nothing is left queued.
|
|
195
|
+
5. Tell the developer, per change: file, prop, old value to new value.
|
|
196
|
+
|
|
197
|
+
An edit record looks like this. `line` is 1-based and `column` is 0-based; both point at the
|
|
198
|
+
`<` of the JSX element.
|
|
199
|
+
|
|
200
|
+
```json
|
|
201
|
+
{
|
|
202
|
+
"id": "a1b2c3d4",
|
|
203
|
+
"file": "/abs/src/Scene.tsx",
|
|
204
|
+
"line": 28,
|
|
205
|
+
"column": 6,
|
|
206
|
+
"component": "Scene",
|
|
207
|
+
"prop": "position",
|
|
208
|
+
"oldValue": [4, 6, 2],
|
|
209
|
+
"newValue": [4.5, 7, 2],
|
|
210
|
+
"status": "queued",
|
|
211
|
+
"message": "`position` is computed in code (`[x, 6, 2]`), not a literal."
|
|
212
|
+
}
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
### Choosing the expression for a queued edit
|
|
216
|
+
|
|
217
|
+
Read `message` and the context, then keep the developer's intent:
|
|
218
|
+
|
|
219
|
+
| Source looks like | Do this |
|
|
220
|
+
| ----------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
221
|
+
| `position={[x, 6, 2]}` and only y/z changed | `apply_edit` with `expression: "[x, 7, 2]"` (keep the variable) |
|
|
222
|
+
| `position={[x, 6, 2]}` and x changed too | Find where `x` is defined. If it is a local constant used only here, change the constant with your own tools and `mark_edit_done`. If it is a prop or state, ask the user before replacing it with a number. |
|
|
223
|
+
| `intensity={dark ? 0.4 : 1.2}` | Change the branch that matches `oldValue`. If neither matches, ask. |
|
|
224
|
+
| `position={LIGHT_POS}` | Edit the constant where it is declared, then `mark_edit_done`. |
|
|
225
|
+
| `{...lightProps}` (prop comes from a spread) | Edit the object the spread comes from. Only add an explicit prop after the spread if the object is shared and must not change. |
|
|
226
|
+
| Value is animated in `useFrame` or by a library | The JSX prop is only the starting value. Tell the user; apply it only if they confirm. |
|
|
227
|
+
|
|
228
|
+
## 5. When the developer pastes a change list
|
|
229
|
+
|
|
230
|
+
The inspector has a **Copy for AI** button. It produces a message that starts with "I tuned my
|
|
231
|
+
three.js / React Three Fiber scene live in the Depthview inspector" and lists each change with
|
|
232
|
+
its file and line. That works without the MCP server. Treat the list as the task: for each
|
|
233
|
+
change open the file, find the element at that line (or by name, type and old value when there
|
|
234
|
+
is no file), and change only that value. The rules below apply the same way.
|
|
235
|
+
|
|
236
|
+
## React Three Fiber conventions
|
|
237
|
+
|
|
238
|
+
- Vectors are arrays: `position={[x, y, z]}`, `rotation={[x, y, z]}` in **radians**,
|
|
239
|
+
`scale={[x, y, z]}` or one number when uniform.
|
|
240
|
+
- Keep readable constants: write `-Math.PI / 2`, not `-1.571`, when the original used `Math.PI`
|
|
241
|
+
and that component did not change.
|
|
242
|
+
- Colours are strings: `color="#ffd8a8"`.
|
|
243
|
+
- Round new numbers to 3 decimals.
|
|
244
|
+
- Material props belong on the material element (`<meshStandardMaterial roughness={0.4} />`),
|
|
245
|
+
light and camera props on the light/camera element. A `material.*` path is a prop of the
|
|
246
|
+
material element; `uniform.<name>` is `uniforms-<name>-value` on a shader material, or the
|
|
247
|
+
value in its `uniforms` object.
|
|
248
|
+
- A bare boolean prop means true (`castShadow`); write `castShadow={false}` to turn it off.
|
|
249
|
+
- In plain three.js (no JSX) the same values are assignments: `light.intensity = 1.4`,
|
|
250
|
+
`mesh.position.set(x, y, z)`, `material.color.set('#ffd8a8')`.
|
|
251
|
+
|
|
252
|
+
## Rules
|
|
253
|
+
|
|
254
|
+
- **Never change unrelated code.** One edit changes one value. No reformatting, no renames,
|
|
255
|
+
no import clean-up, no "while I am here" fixes.
|
|
256
|
+
- Keep formatting and comments exactly as they are. `apply_edit` does this for you; when you
|
|
257
|
+
edit by hand, change only the characters of the value.
|
|
258
|
+
- Live values are the truth for what the developer sees; the source is the truth for what
|
|
259
|
+
ships. Do not report a live change as done until it is in the source (or the developer says
|
|
260
|
+
they only wanted to try it).
|
|
261
|
+
- Do not write a value into the source that you have not seen in `get_changes` or been given by
|
|
262
|
+
the developer. Do not invent edits.
|
|
263
|
+
- If a value is driven by animation, scroll or state, the JSX prop is only its starting value.
|
|
264
|
+
A live change may be overwritten on the next frame: if `get_object` shows the old value again
|
|
265
|
+
right after `set_value`, check `get_animated_values` and say so instead of retrying.
|
|
266
|
+
- Leave the page as you found it: `set_time` `resume` after a pause, `set_viewport`
|
|
267
|
+
`reset: true` after a resize or pixel-ratio test, `set_scroll` back where it was.
|
|
268
|
+
- Do not claim a performance gain without two measurements.
|
|
269
|
+
- Do not touch files outside the project, `node_modules`, or build output.
|
|
270
|
+
- If the element at `line`/`column` is not what the edit describes (the file changed since the
|
|
271
|
+
page loaded), find the element by `component` and `prop`/`oldValue`. If it is ambiguous, ask.
|
|
272
|
+
- After source edits the page hot-reloads and object ids may change. Call `find_objects` again
|
|
273
|
+
before the next `set_value`.
|
|
274
|
+
|
|
275
|
+
## Tools
|
|
276
|
+
|
|
277
|
+
| Tool | Use |
|
|
278
|
+
| ----------------------- | -------------------------------------------------------------- |
|
|
279
|
+
| `get_status` | Connected? Which page, what is selected, how many changes |
|
|
280
|
+
| `get_pairing_code` | The code to type into the inspector (stdio mode only) |
|
|
281
|
+
| `find_objects` | Search the live scene |
|
|
282
|
+
| `describe_scene` | Scene scale, camera focus, camera, lights, counts: call first |
|
|
283
|
+
| `get_object` | All values of one object, editable paths, bounds, source |
|
|
284
|
+
| `get_scene_snapshot` | The whole scene tree as JSON (large; prefer `find_objects`) |
|
|
285
|
+
| `take_screenshot` | See the result: `site`, `scene`, inspector; `compare` for both |
|
|
286
|
+
| `get_performance` | Frame rate, frame time, draw calls, triangles, passes |
|
|
287
|
+
| `get_resources` | Textures, geometries, materials by GPU memory |
|
|
288
|
+
| `get_errors` | Uncaught errors, console errors and warnings, failed shaders |
|
|
289
|
+
| `get_lighting` | Lights, shadow set-up, and the problems found |
|
|
290
|
+
| `get_animated_values` | Which values the site's code drives over time or on scroll |
|
|
291
|
+
| `get_camera_path` | Where the site camera is along the scroll |
|
|
292
|
+
| `get_shader` | The GLSL that runs, with line numbers and uniforms |
|
|
293
|
+
| `set_shader` | Try a new shader live; compile errors come back |
|
|
294
|
+
| `set_value` | Change one value on the live page |
|
|
295
|
+
| `set_values` | Change several values at once, one undo step |
|
|
296
|
+
| `add_object` | Add a copy, a primitive, a group or a light; returns its JSX |
|
|
297
|
+
| `remove_object` | Take an object out of the live scene |
|
|
298
|
+
| `set_scroll` | Scroll the site to a position |
|
|
299
|
+
| `set_time` | Hold, step or release the site's animation |
|
|
300
|
+
| `set_viewport` | Resize the window, set the pixel ratio; `reset: true` to undo |
|
|
301
|
+
| `select_object` | Show the developer which object you mean |
|
|
302
|
+
| `undo_change` | Take back the latest value change |
|
|
303
|
+
| `reset_changes` | Put everything back: values, objects, shaders |
|
|
304
|
+
| `get_changes` | Everything that differs from the loaded page, with source info |
|
|
305
|
+
| `apply_changes_to_code` | Write all value changes into the source |
|
|
306
|
+
| `list_pending_edits` | Edits the server could not apply exactly |
|
|
307
|
+
| `get_edit_context` | Source around a queued edit, and why it was queued |
|
|
308
|
+
| `apply_edit` | Apply a queued edit, optionally with your own expression |
|
|
309
|
+
| `mark_edit_done` | Report an edit you made with your own tools |
|