depthview-mcp 0.1.0 → 0.2.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 CHANGED
@@ -8,7 +8,7 @@ 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
- [`plugins/claude-code`](../../plugins/claude-code/README.md):
11
+ [`plugins/claude-code`](https://github.com/himavamsi12/depthview/tree/main/plugins/claude-code):
12
12
 
13
13
  ```text
14
14
  /plugin marketplace add himavamsi12/depthview
@@ -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 `@depthview/r3f-bridge` so objects know which JSX element created them.
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
 
@@ -99,21 +99,24 @@ Live scene (the inspector must be open on the page):
99
99
 
100
100
  Measure, diagnose and try things live:
101
101
 
102
- | Tool | What it does |
103
- | --------------------- | -------------------------------------------------------------------- |
104
- | `get_performance` | Frame rate, frame time, draw calls, triangles, render passes |
105
- | `get_resources` | Textures, geometries and materials by GPU memory |
106
- | `get_errors` | Uncaught errors, console errors and warnings, failed shader programs |
107
- | `get_lighting` | Lights and shadow set-up, with the problems found |
108
- | `get_animated_values` | Which values the site's own code drives, over time or on scroll |
109
- | `get_camera_path` | The site camera along the scroll |
110
- | `get_shader` | The GLSL that runs, with line numbers |
111
- | `set_shader` | Try a shader live; compile errors come back, a broken one is undone |
112
- | `add_object` | Add a copy, a primitive, a group or a light; returns its JSX |
113
- | `remove_object` | Take an object out of the live scene |
114
- | `set_scroll` | Scroll the site to a position |
115
- | `set_time` | Hold, step or release the site's animation |
116
- | `set_viewport` | Resize the window, set the pixel ratio; `reset` to undo |
102
+ | Tool | What it does |
103
+ | ---------------------- | -------------------------------------------------------------------- |
104
+ | `get_performance` | Frame rate, frame time, draw calls, triangles, render passes |
105
+ | `get_resources` | Textures, geometries and materials by GPU memory |
106
+ | `get_errors` | Uncaught errors, console errors and warnings, failed shader programs |
107
+ | `get_lighting` | Lights and shadow set-up, with the problems found |
108
+ | `get_animated_values` | Which values the site's own code drives, over time or on scroll |
109
+ | `get_camera_path` | The site camera along the scroll |
110
+ | `edit_camera_path` | Edit the scroll path live: start, move/add/remove keys, preview |
111
+ | `get_camera_path_edit` | The edited path: keys, changes, JSON and code |
112
+ | `save_camera_path` | Write it into the project as `camera-path.json` |
113
+ | `get_shader` | The GLSL that runs, with line numbers |
114
+ | `set_shader` | Try a shader live; compile errors come back, a broken one is undone |
115
+ | `add_object` | Add a copy, a primitive, a group or a light; returns its JSX |
116
+ | `remove_object` | Take an object out of the live scene |
117
+ | `set_scroll` | Scroll the site to a position |
118
+ | `set_time` | Hold, step or release the site's animation |
119
+ | `set_viewport` | Resize the window, set the pixel ratio; `reset` to undo |
117
120
 
118
121
  `take_screenshot` takes a `view`: `site` (the page as a visitor sees it), `scene` (the
119
122
  inspector's 3D view) or the whole tab.
@@ -128,7 +131,7 @@ Not only Claude Code with the skill: any MCP client (Claude Desktop, Cursor, …
128
131
  `get_changes` and `apply_changes_to_code` say which step to take now. `set_value(s)` report
129
132
  `overwritten: true` when the site's own code moved the value back (it is animated).
130
133
  - **Prompts** (slash commands in the client): `pair`, `tune` (with a goal), `apply`,
131
- `performance`. In Claude Code: `/mcp__depthview__tune warmer light`.
134
+ `camera-path`, `performance`. In Claude Code: `/mcp__depthview__tune warmer light`.
132
135
  - **Resources**: `depthview://status`, `depthview://scene`, `depthview://selection`,
133
136
  `depthview://changes`.
134
137
 
package/dist/cli.js CHANGED
@@ -2,8 +2,8 @@
2
2
 
3
3
  // src/cli.ts
4
4
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
5
- import { existsSync, mkdirSync, readFileSync as readFileSync2, writeFileSync as writeFileSync2 } from "node:fs";
6
- import { dirname, join, resolve as resolve2, sep as sep2 } from "node:path";
5
+ import { existsSync as existsSync2, mkdirSync, readFileSync as readFileSync2, writeFileSync as writeFileSync2 } from "node:fs";
6
+ import { dirname as dirname2, join, resolve as resolve2, sep as sep2 } from "node:path";
7
7
  import { fileURLToPath } from "node:url";
8
8
 
9
9
  // src/mcp.ts
@@ -20,6 +20,8 @@ var INSTRUCTIONS = `Depthview connects you to a three.js / React Three Fiber sce
20
20
  5. Check every visible change with take_screenshot view:"site" (compare:true shows before and after). If a result says overwritten:true, the site's code animates that value: tell the developer instead of retrying.
21
21
  6. When it looks right: get_changes, then apply_changes_to_code, then finish every "queued" edit (get_edit_context, then apply_edit or mark_edit_done). Report file, prop and old to new value.
22
22
 
23
+ Scroll camera path: get_camera_path shows it; edit_camera_path edits it (the developer can also drag its handles); get_camera_path_edit returns the edited keys; save_camera_path writes camera-path.json, or rewrite the developer's own camera code with the keys.
24
+
23
25
  Never change unrelated code. Never write a value into the source that is not in get_changes or given by the developer. Tool results often end with "next": follow it.`;
24
26
  var PROMPTS = [
25
27
  {
@@ -46,6 +48,18 @@ Steps: get_status, describe_scene, then find the objects that matter (find_objec
46
48
  description: "Write every change made in the inspector (by you or by hand) into the source.",
47
49
  text: () => 'Write my Depthview changes into the code: get_changes, then apply_changes_to_code. For every edit that comes back "queued", call get_edit_context and finish it with apply_edit or your own edit plus mark_edit_done. Write changes without a source location yourself from get_changes. Then list_pending_edits to confirm nothing is left, and list per change: file, prop, old value to new value. Change nothing else.'
48
50
  },
51
+ {
52
+ name: "camera-path",
53
+ title: "Write the edited camera path into the code",
54
+ description: "Put the scroll camera path edited in Depthview into the project: as camera-path.json, or in your own camera code.",
55
+ text: () => `Write my edited Depthview camera path into the code.
56
+
57
+ 1. get_camera_path_edit. If it is not editing, tell me to edit the path first (Camera path > Edit camera path in the inspector) and stop.
58
+ 2. Find how my project moves the camera on scroll: search for useScroll / ScrollControls, ScrollTrigger or gsap timelines on camera.position, CatmullRomCurve3 or other curves, and useFrame code that sets camera.position or calls camera.lookAt. Also check for useCameraPath and camera-path.json.
59
+ 3. If the project already uses useCameraPath with a JSON file, call save_camera_path with that file and stop.
60
+ 4. Otherwise, change my camera code so it follows the keys: each key is a scroll percent with a camera position, a look-at target and a fov. Keep my code's structure (same library, same scroll source, same easing where possible): replace keyframe values, curve points or look-at targets with the new ones, adding or removing keyframes to match. If my code cannot express the path well, ask me whether to switch to useCameraPath(path) from depthview-r3f-bridge/camera-path with save_camera_path.
61
+ 5. Tell me per key what changed in which file, and ask me to check it by scrolling the site.`
62
+ },
49
63
  {
50
64
  name: "performance",
51
65
  title: "Check scene performance",
@@ -89,7 +103,7 @@ var promptMessage = (body) => ({
89
103
  function buildMcpServer(server, options) {
90
104
  const { core } = server;
91
105
  const mcp = new McpServer(
92
- { name: "depthview", version: "0.1.0" },
106
+ { name: "depthview", version: "0.2.0" },
93
107
  { instructions: INSTRUCTIONS }
94
108
  );
95
109
  mcp.registerTool(
@@ -242,7 +256,7 @@ function buildMcpServer(server, options) {
242
256
  mcp.registerTool(
243
257
  "get_object",
244
258
  {
245
- description: "Everything the inspector knows about one object: transform, light / camera / material values, shader uniforms, textures, its world-space bounding box in scene units (`worldBounds`: min, max, size, center; null for lights and cameras), and where its JSX element is in the source (`source`, `materialSource`) when the project uses @depthview/r3f-bridge. `editable` lists every path set_value accepts for it, with the current value. With no uuid or name: the object the developer has selected.",
259
+ description: "Everything the inspector knows about one object: transform, light / camera / material values, shader uniforms, textures, its world-space bounding box in scene units (`worldBounds`: min, max, size, center; null for lights and cameras), and where its JSX element is in the source (`source`, `materialSource`) when the project uses depthview-r3f-bridge. `editable` lists every path set_value accepts for it, with the current value. With no uuid or name: the object the developer has selected.",
246
260
  inputSchema: target
247
261
  },
248
262
  async (params) => live(
@@ -508,7 +522,67 @@ function buildMcpServer(server, options) {
508
522
  record: z.boolean().optional().describe("Record again even if a path exists.")
509
523
  }
510
524
  },
511
- async (params) => live("cameraPath", params, 6e4)
525
+ async (params) => live(
526
+ "cameraPath",
527
+ params,
528
+ 6e4,
529
+ () => 'To change this path: edit_camera_path with action "start" turns it into a few keys you (or the developer, by dragging in the view) can move.'
530
+ )
531
+ );
532
+ const vec32 = z.array(z.number().finite()).length(3);
533
+ mcp.registerTool(
534
+ "get_camera_path_edit",
535
+ {
536
+ description: "The scroll camera path as it is being edited in the inspector (by the developer dragging handles, or by you): `keys` (each: scroll `percent` 0-100, camera `position`, look-at `target`, `fov`, world space), the `original` keys from the recording, `changes` as readable lines, where it was saved (`savedTo`), the camera-path.json contents (`json`) and a TypeScript snippet (`code`). Between keys the camera follows a Catmull-Rom curve through the positions and through the targets.",
537
+ inputSchema: {}
538
+ },
539
+ async () => live(
540
+ "pathEdit",
541
+ {},
542
+ void 0,
543
+ (d) => d.editing ? `To put it into the project: save_camera_path (a JSON file for useCameraPath), or rewrite the developer's own scroll camera code with these keys (read it first; see the "camera-path" prompt).` : void 0
544
+ )
545
+ );
546
+ mcp.registerTool(
547
+ "edit_camera_path",
548
+ {
549
+ description: 'Edit the scroll camera path live, the same as dragging its handles in the inspector. action "start": turn the recorded path into editable keys (or pass `keys`). "set_key": move key `index` (`position`, `target`, `fov`, `percent`). "add_key": a new key at `percent` on the current curve (optionally with `position`/`target`). "remove_key": key `index`. "preview": the site camera follows the edited path (`on`, default true). "reset": back to the recording. "stop": end editing. `scroll` moves the page to a percent afterwards, to look at the result with take_screenshot view:"site". Returns the edit as get_camera_path_edit does.',
550
+ inputSchema: {
551
+ action: z.enum(["start", "set_key", "add_key", "remove_key", "preview", "reset", "stop"]),
552
+ index: z.number().int().min(0).optional(),
553
+ position: vec32.optional(),
554
+ target: vec32.optional(),
555
+ fov: z.number().min(1).max(179).optional(),
556
+ percent: z.number().min(0).max(100).optional(),
557
+ on: z.boolean().optional(),
558
+ scroll: z.number().min(0).max(100).optional(),
559
+ keys: z.array(
560
+ z.object({
561
+ percent: z.number().min(0).max(100),
562
+ position: vec32,
563
+ target: vec32,
564
+ fov: z.number().min(1).max(179)
565
+ })
566
+ ).max(200).optional()
567
+ }
568
+ },
569
+ async (params) => live(
570
+ "pathAction",
571
+ params,
572
+ 15e3,
573
+ (d) => d.editing === false ? void 0 : d.preview ? 'Look at it: set_scroll or scroll, then take_screenshot view:"site" compare:true.' : 'edit_camera_path action "preview" shows the edited path on the live site.'
574
+ )
575
+ );
576
+ mcp.registerTool(
577
+ "save_camera_path",
578
+ {
579
+ description: "Write the edited camera path into the project as JSON (default src/camera-path.json, or `file`, a .json path inside the project). The site then drives its camera with `useCameraPath(path)` from depthview-r3f-bridge/camera-path. Use this when the developer wants the file; to keep their own camera code, rewrite that code instead.",
580
+ inputSchema: { file: z.string().max(512).optional() }
581
+ },
582
+ async (params) => live("pathSave", params, 15e3, (d) => {
583
+ const file = String(d.file ?? "the file");
584
+ return `Saved ${file}. If the project does not use it yet: import path from './${file.split("/").pop()}' and call useCameraPath(path) inside <Canvas> in place of the old scroll camera code (ask the developer before removing their code).`;
585
+ })
512
586
  );
513
587
  mcp.registerTool(
514
588
  "add_object",
@@ -631,8 +705,8 @@ import { z as z3 } from "zod";
631
705
  // src/core.ts
632
706
  import { randomUUID } from "node:crypto";
633
707
  import { EventEmitter } from "node:events";
634
- import { readFileSync, realpathSync, writeFileSync } from "node:fs";
635
- import { isAbsolute, resolve, sep } from "node:path";
708
+ import { existsSync, readFileSync, realpathSync, statSync, writeFileSync } from "node:fs";
709
+ import { basename, dirname, isAbsolute, relative, resolve, sep } from "node:path";
636
710
  import { z as z2 } from "zod";
637
711
 
638
712
  // src/edits.ts
@@ -824,6 +898,18 @@ var editIntentSchema = z2.object({
824
898
  newValue: value
825
899
  });
826
900
  var SOURCE_FILE = /\.(jsx|tsx|js|ts|mjs)$/;
901
+ var vec3 = z2.tuple([z2.number().finite(), z2.number().finite(), z2.number().finite()]);
902
+ var cameraPathSchema = z2.object({
903
+ version: z2.literal(1),
904
+ keys: z2.array(
905
+ z2.object({
906
+ percent: z2.number().min(0).max(100),
907
+ position: vec3,
908
+ target: vec3,
909
+ fov: z2.number().min(1).max(179)
910
+ })
911
+ ).min(1).max(200)
912
+ });
827
913
  var DepthviewCore = class extends EventEmitter {
828
914
  root;
829
915
  edits = /* @__PURE__ */ new Map();
@@ -841,6 +927,35 @@ var DepthviewCore = class extends EventEmitter {
841
927
  if (!SOURCE_FILE.test(real)) throw new Error("Not a JavaScript/TypeScript source file");
842
928
  return real;
843
929
  }
930
+ /**
931
+ * Writes the edited camera path as JSON into the project. Default: src/camera-path.json when
932
+ * the project has a src folder, else camera-path.json. Only .json files, inside the root, in a
933
+ * folder that exists, never in node_modules.
934
+ */
935
+ writeCameraPath(path, file) {
936
+ const wanted = file && file.trim() ? file.trim() : existsSync(resolve(this.root, "src")) ? "src/camera-path.json" : "camera-path.json";
937
+ if (!/^[\w.-]+\.json$/.test(basename(wanted)))
938
+ throw new Error("The camera path file must be a .json file name (letters, digits, - _ .).");
939
+ const target = isAbsolute(wanted) ? wanted : resolve(this.root, wanted);
940
+ let folder;
941
+ try {
942
+ folder = realpathSync(dirname(target));
943
+ } catch {
944
+ throw new Error(`The folder ${relative(this.root, dirname(target)) || "."} does not exist.`);
945
+ }
946
+ if (folder !== this.root && !folder.startsWith(this.root + sep))
947
+ throw new Error("File is outside the project root");
948
+ if (folder.split(sep).includes("node_modules"))
949
+ throw new Error("Files in node_modules are not edited");
950
+ const out = resolve(folder, basename(target));
951
+ if (existsSync(out) && !statSync(out).isFile()) throw new Error("Not a file");
952
+ writeFileSync(out, `${JSON.stringify(cameraPathSchema.parse(path), null, 2)}
953
+ `);
954
+ this.cameraPath = { file: relative(this.root, out), savedAt: Date.now() };
955
+ return this.cameraPath.file;
956
+ }
957
+ /** Where the camera path was last saved. */
958
+ cameraPath = null;
844
959
  tryApply(edit, expression) {
845
960
  let path;
846
961
  try {
@@ -920,6 +1035,12 @@ var editsMessage = z3.object({
920
1035
  requestId: z3.string().max(64),
921
1036
  edits: z3.array(editIntentSchema).max(200)
922
1037
  });
1038
+ var pathFileMessage = z3.object({
1039
+ type: z3.literal("path_file"),
1040
+ requestId: z3.string().max(64),
1041
+ file: z3.string().max(512).optional(),
1042
+ path: cameraPathSchema
1043
+ });
923
1044
  var newCode = () => String(randomInt(0, 1e6)).padStart(6, "0");
924
1045
  var DepthviewServer = class {
925
1046
  constructor(options) {
@@ -1025,6 +1146,25 @@ var DepthviewServer = class {
1025
1146
  `${edit.status.padEnd(7)} ${edit.file.replace(this.core.root, ".")}:${edit.line} ${edit.prop}${edit.message ? ` (${edit.message})` : ""}`
1026
1147
  );
1027
1148
  send({ type: "edits_result", requestId: parsed.data.requestId, edits });
1149
+ } else if (msg.type === "path_file") {
1150
+ const parsed = pathFileMessage.safeParse(msg);
1151
+ const requestId = String(msg.requestId ?? "");
1152
+ if (!parsed.success) {
1153
+ send({ type: "path_file_result", requestId, ok: false, error: "Malformed camera path" });
1154
+ return;
1155
+ }
1156
+ try {
1157
+ const file = this.core.writeCameraPath(parsed.data.path, parsed.data.file);
1158
+ this.options.log(`camera path ${file} (${parsed.data.path.keys.length} keys)`);
1159
+ send({ type: "path_file_result", requestId, ok: true, file });
1160
+ } catch (err) {
1161
+ send({
1162
+ type: "path_file_result",
1163
+ requestId,
1164
+ ok: false,
1165
+ error: err instanceof Error ? err.message : String(err)
1166
+ });
1167
+ }
1028
1168
  } else if (msg.type === "snapshot") {
1029
1169
  if (msg.snapshot) this.core.snapshot = msg.snapshot;
1030
1170
  const waiter = this.snapshotWaiters.get(String(msg.requestId ?? ""));
@@ -1167,7 +1307,7 @@ function init(root) {
1167
1307
  const entry = installed ? { command: "npx", args: ["-y", "depthview-mcp", "--stdio"] } : { command: "node", args: [cli, "--stdio"] };
1168
1308
  const configPath = join(root, ".mcp.json");
1169
1309
  let config = {};
1170
- if (existsSync(configPath)) {
1310
+ if (existsSync2(configPath)) {
1171
1311
  try {
1172
1312
  config = JSON.parse(readFileSync2(configPath, "utf8"));
1173
1313
  } catch {
@@ -1180,9 +1320,9 @@ function init(root) {
1180
1320
  writeFileSync2(configPath, `${JSON.stringify(config, null, 2)}
1181
1321
  `);
1182
1322
  out(`wrote ${configPath}`);
1183
- const skill = join(dirname(cli), "..", "skill", "SKILL.md");
1323
+ const skill = join(dirname2(cli), "..", "skill", "SKILL.md");
1184
1324
  const skillPath = join(root, ".claude", "skills", "depthview", "SKILL.md");
1185
- mkdirSync(dirname(skillPath), { recursive: true });
1325
+ mkdirSync(dirname2(skillPath), { recursive: true });
1186
1326
  writeFileSync2(skillPath, readFileSync2(skill));
1187
1327
  out(`wrote ${skillPath}`);
1188
1328
  out("");
@@ -1191,7 +1331,7 @@ function init(root) {
1191
1331
  out(" 2. Open your dev site in Chrome and click the Depthview icon.");
1192
1332
  out(' 3. Ask Claude: "pair with Depthview". Type the code it gives into the side panel,');
1193
1333
  out(' under "AI agent & code sync".');
1194
- out(" For exact source edits, add @depthview/r3f-bridge to the project.");
1334
+ out(" For exact source edits, add depthview-r3f-bridge to the project.");
1195
1335
  }
1196
1336
  async function main() {
1197
1337
  if (process.argv.includes("--help") || process.argv.includes("-h")) {
package/package.json CHANGED
@@ -1,8 +1,14 @@
1
1
  {
2
2
  "name": "depthview-mcp",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "Local MCP server for Depthview: receives edits from the browser extension and writes them into your React Three Fiber source code.",
5
5
  "license": "MIT",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/himavamsi12/depthview.git",
9
+ "directory": "packages/mcp-server"
10
+ },
11
+ "homepage": "https://github.com/himavamsi12/depthview/tree/main/packages/mcp-server#readme",
6
12
  "type": "module",
7
13
  "bin": {
8
14
  "depthview-mcp": "./dist/cli.js"
package/skill/SKILL.md CHANGED
@@ -26,7 +26,7 @@ Call `get_status` first, always.
26
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
27
  | `paired: true`, `inspectorOpen: false` | Ask them to click the Depthview icon on their page and keep that tab in front. |
28
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. |
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
30
 
31
31
  The pairing code is used once. If pairing fails, call `get_status` again for the new code.
32
32
  If the `depthview` tools are missing, the project is not set up: tell the developer to run
@@ -138,6 +138,31 @@ Rules of thumb for `get_performance` (they are starting points, not laws):
138
138
  Prove a fix: measure, change, measure again, and report both numbers. To learn what one object
139
139
  costs, `remove_object` it, measure, then `reset_changes`.
140
140
 
141
+ ## The scroll camera path
142
+
143
+ `get_camera_path` records where the site camera is along the scroll. To change that path:
144
+
145
+ 1. `edit_camera_path` with `action: "start"` turns the recording into a few keys. The
146
+ developer can also do this in the inspector (Camera path > Edit camera path) and drag the
147
+ keys; their edits reach you the same way.
148
+ 2. Each key: scroll `percent` (0 top, 100 bottom), camera `position`, look-at `target`, `fov`,
149
+ in world space. Between keys the camera follows a smooth curve through the positions and
150
+ through the targets.
151
+ 3. Move keys with `action: "set_key"` (`index`, `position`, `target`, `fov`, `percent`), add one
152
+ with `"add_key"` at a `percent`, remove one with `"remove_key"`. Size moves to the scene
153
+ (`describe_scene`).
154
+ 4. `action: "preview"` puts the site camera on the edited path. Then `scroll` (in the same call)
155
+ or `set_scroll`, and `take_screenshot` with `view: "site"` to see what a visitor sees.
156
+ 5. To put it into the project, `get_camera_path_edit` first, then either:
157
+ - `save_camera_path` when the project uses (or the developer wants) `useCameraPath(path)`
158
+ from `depthview-r3f-bridge/camera-path` with a `camera-path.json`, or
159
+ - rewrite the developer's own scroll camera code with the keys (GSAP timeline values,
160
+ curve points, `useFrame` targets). Keep their library and structure; read the code first.
161
+ The `camera-path` prompt walks through it.
162
+
163
+ The inspector's preview does not change the site's code: nothing is written until you save or
164
+ edit the source.
165
+
141
166
  ## Shaders
142
167
 
143
168
  1. `get_shader` shows the GLSL that runs, with line numbers. When `kind` is `"compiled"` it is
@@ -289,6 +314,9 @@ is no file), and change only that value. The rules below apply the same way.
289
314
  | `get_lighting` | Lights, shadow set-up, and the problems found |
290
315
  | `get_animated_values` | Which values the site's code drives over time or on scroll |
291
316
  | `get_camera_path` | Where the site camera is along the scroll |
317
+ | `edit_camera_path` | Edit the scroll path: start, move/add/remove keys, preview |
318
+ | `get_camera_path_edit` | The edited path: keys, what changed, JSON and code |
319
+ | `save_camera_path` | Write the path into the project as camera-path.json |
292
320
  | `get_shader` | The GLSL that runs, with line numbers and uniforms |
293
321
  | `set_shader` | Try a new shader live; compile errors come back |
294
322
  | `set_value` | Change one value on the live page |