@snaptrude/plugin-core 0.9.14 → 0.9.16

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.
Files changed (51) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/api-manifest.json +527 -26
  3. package/dist/api/core/camera/index.d.ts +418 -0
  4. package/dist/api/core/camera/index.d.ts.map +1 -1
  5. package/dist/api/core/index.d.ts +4 -4
  6. package/dist/api/core/index.d.ts.map +1 -1
  7. package/dist/api/core/layers.d.ts +377 -255
  8. package/dist/api/core/layers.d.ts.map +1 -1
  9. package/dist/api/core/proposals/index.d.ts +4 -3
  10. package/dist/api/core/proposals/index.d.ts.map +1 -1
  11. package/dist/api/core/storeys/index.d.ts +12 -0
  12. package/dist/api/core/storeys/index.d.ts.map +1 -1
  13. package/dist/api/core/storeys/layers.d.ts +408 -0
  14. package/dist/api/core/storeys/layers.d.ts.map +1 -0
  15. package/dist/api/core/tags.d.ts +3 -3
  16. package/dist/api/design/create/bulk-items.d.ts +44 -0
  17. package/dist/api/design/create/bulk-items.d.ts.map +1 -1
  18. package/dist/api/design/create/index.d.ts +31 -3
  19. package/dist/api/design/create/index.d.ts.map +1 -1
  20. package/dist/api/design/selection/index.d.ts +2 -2
  21. package/dist/api/design/update/index.d.ts +73 -0
  22. package/dist/api/design/update/index.d.ts.map +1 -1
  23. package/dist/api/presentation/aiInspiration.d.ts +13 -13
  24. package/dist/api/presentation/camera.d.ts +265 -0
  25. package/dist/api/presentation/camera.d.ts.map +1 -0
  26. package/dist/api/presentation/index.d.ts +14 -0
  27. package/dist/api/presentation/index.d.ts.map +1 -1
  28. package/dist/api/presentation/placedViews.d.ts +1 -1
  29. package/dist/api/presentation/views.d.ts +3 -1
  30. package/dist/api/presentation/views.d.ts.map +1 -1
  31. package/dist/api/presentation/walkthroughs.d.ts +1350 -0
  32. package/dist/api/presentation/walkthroughs.d.ts.map +1 -0
  33. package/dist/index.cjs +3162 -2553
  34. package/dist/index.cjs.map +1 -1
  35. package/dist/index.js +3077 -2550
  36. package/dist/index.js.map +1 -1
  37. package/package.json +1 -1
  38. package/scripts/generate-manifest.test.mjs +14 -3
  39. package/src/api/core/camera/index.ts +400 -1
  40. package/src/api/core/index.ts +4 -4
  41. package/src/api/core/layers.ts +380 -173
  42. package/src/api/core/proposals/index.ts +4 -3
  43. package/src/api/core/storeys/index.ts +14 -0
  44. package/src/api/core/storeys/layers.ts +339 -0
  45. package/src/api/design/create/bulk-items.ts +68 -0
  46. package/src/api/design/create/index.ts +30 -4
  47. package/src/api/design/update/index.ts +80 -1
  48. package/src/api/presentation/camera.ts +289 -0
  49. package/src/api/presentation/index.ts +14 -0
  50. package/src/api/presentation/views.ts +3 -1
  51. package/src/api/presentation/walkthroughs.ts +1201 -0
package/api-manifest.json CHANGED
@@ -494,6 +494,30 @@
494
494
  "argsType": null,
495
495
  "resultType": "PluginCameraMode"
496
496
  },
497
+ {
498
+ "path": "core.camera.getNavigationSettings",
499
+ "namespace": "core.camera",
500
+ "summary": "Read the arrow-key navigation settings: whether the arrow keys walk the camera, the eye height used by `setPose`'s `standAt` and by walkthroughs that follow the floor, the walking speed, and whether walking stops at walls. Paired with {@linkcode PluginCameraApi.updateNavigationSettings}.",
501
+ "examplePrompts": [
502
+ "Is arrow-key navigation on?",
503
+ "What eye height does the camera use?\n\n# Example\n```ts\nconst { isKeyboardNavigationEnabled } =\nawait snaptrude.core.camera.getNavigationSettings()\n```"
504
+ ],
505
+ "argsType": null,
506
+ "resultType": "PluginCameraNavigationSettings"
507
+ },
508
+ {
509
+ "path": "core.camera.getPose",
510
+ "namespace": "core.camera",
511
+ "summary": "Read where the camera is and where it looks: the eye and target positions (world coordinates, internal `babylon` units), the view direction as yaw and pitch, the vertical field of view, the projection and the 2D/3D mode. Paired with {@linkcode PluginCameraApi.setPose}.",
512
+ "examplePrompts": [
513
+ "Where is the camera right now?",
514
+ "Remember this viewpoint so we can come back to it",
515
+ "Which way is the camera facing?",
516
+ "How high above the ground is the camera?\n\n# Example\n```ts\nconst pose = await snaptrude.core.camera.getPose()\nconsole.log(pose.eye, pose.yawInDegrees, pose.pitchInDegrees)\n```"
517
+ ],
518
+ "argsType": null,
519
+ "resultType": "PluginCameraPose"
520
+ },
497
521
  {
498
522
  "path": "core.camera.getProjection",
499
523
  "namespace": "core.camera",
@@ -519,6 +543,31 @@
519
543
  "argsType": "Vec3Handle",
520
544
  "resultType": "boolean"
521
545
  },
546
+ {
547
+ "path": "core.camera.move",
548
+ "namespace": "core.camera",
549
+ "summary": "Walk or fly the camera by a displacement in its own frame: `forward` along the level view direction, `right` to its side and `up` vertically, in internal `babylon` units. The view direction does not change. With `options.followsFloor` the camera keeps its height above the floor as it goes, climbing and descending stairs and ramps the way the arrow keys do. Stops a playing walkthrough and switches from 2D plan view to 3D first. View-state only: not write-gated, not undoable.",
550
+ "examplePrompts": [
551
+ "Walk forward 3 metres",
552
+ "Step to the right a little",
553
+ "Walk up the stairs ahead",
554
+ "Raise the camera by 2 metres\n\n# Example\n```ts\nconst metre = 1 / 0.254\nawait snaptrude.core.camera.move(\n{ forward: 3 * metre },\n{ followsFloor: true, durationInSeconds: 2 },\n)\n```"
555
+ ],
556
+ "argsType": "PluginCameraMoveDisplacement",
557
+ "resultType": "PluginCameraPose"
558
+ },
559
+ {
560
+ "path": "core.camera.rotate",
561
+ "namespace": "core.camera",
562
+ "summary": "Turn the camera in place by signed angles: `yawInDegrees` to the right (clockwise seen from above) and `pitchInDegrees` up. The eye does not move; the resulting pitch is kept within ±89°. Stops a playing walkthrough and switches from 2D plan view to 3D first. View-state only: not write-gated, not undoable.",
563
+ "examplePrompts": [
564
+ "Turn around",
565
+ "Look 45 degrees to the left",
566
+ "Tilt the camera down a bit\n\n# Example\n```ts\nawait snaptrude.core.camera.rotate(180, 0, { durationInSeconds: 1 })\n```"
567
+ ],
568
+ "argsType": "number",
569
+ "resultType": "PluginCameraPose"
570
+ },
522
571
  {
523
572
  "path": "core.camera.setMode",
524
573
  "namespace": "core.camera",
@@ -532,6 +581,19 @@
532
581
  "argsType": "PluginCameraMode",
533
582
  "resultType": "boolean"
534
583
  },
584
+ {
585
+ "path": "core.camera.setPose",
586
+ "namespace": "core.camera",
587
+ "summary": "Place the camera, optionally easing there over `options.durationInSeconds`, and resolve once the new view has been drawn, so a capture that follows sees it without a fixed wait. `pose` is one of:",
588
+ "examplePrompts": [
589
+ "Stand in the living room at eye level facing the window",
590
+ "Move the camera to (40, 12, 30) looking at the entrance",
591
+ "Fly the camera smoothly over to the courtyard",
592
+ "Put me back at the viewpoint we saved earlier\n\n# Example\n```ts\nconst { camera } = snaptrude.core\nawait camera.setPose({ standAt: { x: 20, y: 0, z: 35 }, yawInDegrees: 90 })\nawait camera.setPose(\n{ eye: { x: 60, y: 25, z: 60 }, target: { x: 0, y: 5, z: 0 } },\n{ durationInSeconds: 1.5 },\n)\n```"
593
+ ],
594
+ "argsType": "PluginCameraPoseInput",
595
+ "resultType": "PluginCameraPose"
596
+ },
535
597
  {
536
598
  "path": "core.camera.setProjection",
537
599
  "namespace": "core.camera",
@@ -559,6 +621,18 @@
559
621
  "argsType": "PluginStandardView",
560
622
  "resultType": "boolean"
561
623
  },
624
+ {
625
+ "path": "core.camera.updateNavigationSettings",
626
+ "namespace": "core.camera",
627
+ "summary": "Change arrow-key navigation settings; only the fields given change. `isKeyboardNavigationEnabled` is the user's Project Settings switch and is saved on this device; the other settings last for the session. Write-gated: this changes the user's preferences, not just the view.",
628
+ "examplePrompts": [
629
+ "Turn off arrow-key navigation",
630
+ "Use a 1.6 m eye height",
631
+ "Make walking stop at walls\n\n# Example\n```ts\nawait snaptrude.core.camera.updateNavigationSettings({\neyeHeight: 1.6 / 0.254,\nisCollisionEnabled: true,\n})\n```"
632
+ ],
633
+ "argsType": "PluginCameraNavigationSettingsPatch",
634
+ "resultType": "PluginCameraNavigationSettings"
635
+ },
562
636
  {
563
637
  "path": "core.camera.zoomExtents",
564
638
  "namespace": "core.camera",
@@ -3249,14 +3323,55 @@
3249
3323
  "argsType": "UnderlayHandle",
3250
3324
  "resultType": "{ scaleFactor: number }"
3251
3325
  },
3326
+ {
3327
+ "path": "core.layers.assign",
3328
+ "namespace": "core.layers",
3329
+ "summary": "Move objects onto a layer (picking a layer in the object properties panel).",
3330
+ "examplePrompts": [
3331
+ "Move the selected objects to the BIM layer",
3332
+ "Move the selected objects to the Furniture layer",
3333
+ "Assign the generated walls to the Structure layer",
3334
+ "Put these masses on layer 3f2a…\n\n# Example\n```ts\nconst { assigned, skipped } = await snaptrude.core.layers.assign(ids, layerId)\n```"
3335
+ ],
3336
+ "argsType": "ComponentHandle[]",
3337
+ "resultType": "PluginCoreLayersAssignResult"
3338
+ },
3339
+ {
3340
+ "path": "core.layers.create",
3341
+ "namespace": "core.layers",
3342
+ "summary": "Create a new layer in the Layers panel (the panel's \"Add new layer\" button followed by naming it).",
3343
+ "examplePrompts": [
3344
+ "Create a new layer called Furniture",
3345
+ "Add a layer called Landscape",
3346
+ "Add a layer named Landscape to the Layers panel",
3347
+ "Make a new layer for the facade elements",
3348
+ "Create layers named Structure and Services\n\n# Example\n```ts\nconst layer = await snaptrude.core.layers.create(\"Furniture\")\nawait snaptrude.core.layers.setActive(layer.id)\n```"
3349
+ ],
3350
+ "argsType": "string",
3351
+ "resultType": "PluginCoreLayersCreateResult"
3352
+ },
3353
+ {
3354
+ "path": "core.layers.delete",
3355
+ "namespace": "core.layers",
3356
+ "summary": "Delete a layer (the panel row's \"Delete layer\").",
3357
+ "examplePrompts": [
3358
+ "Delete the Furniture layer and everything on it",
3359
+ "Delete the Furniture layer and move its objects to Default",
3360
+ "Remove layer 3f2a… and move its objects to the default layer",
3361
+ "Merge the Services layer into Structure and delete it",
3362
+ "Delete every empty layer\n\n# Example\n```ts\nawait snaptrude.core.layers.delete(layerId, { deleteObjects: true })\nconst { layers } = await snaptrude.core.layers.list()\nconst def = layers.find((l) => l.isDefault)!\nawait snaptrude.core.layers.delete(otherId, { targetLayerId: def.id })\n```"
3363
+ ],
3364
+ "argsType": "string",
3365
+ "resultType": "PluginCoreLayersDeleteResult"
3366
+ },
3252
3367
  {
3253
3368
  "path": "core.layers.get",
3254
3369
  "namespace": "core.layers",
3255
- "summary": "Get a single drawing layer by id.",
3370
+ "summary": "Get one Layers-panel layer by id, including layers owned by other design options.",
3256
3371
  "examplePrompts": [
3257
- "Get the drawing layer with id ly_5",
3258
- "Is layer ly_5 hidden or locked?",
3259
- "Look up a single drawing layer by its id\n\n# Example\n```ts\nconst layer = await snaptrude.core.layers.get(\"ly_5\")\nif (layer) console.log(layer.name, layer.hidden, layer.locked)\n```"
3372
+ "Get the Layers-panel layer with id 3f2a…",
3373
+ "Is the Furniture layer locked or hidden?",
3374
+ "How many objects are on layer 3f2a…?\n\n# Example\n```ts\nconst layer = await snaptrude.core.layers.get(layerId)\nif (layer) console.log(layer.name, layer.objectCount)\n```"
3260
3375
  ],
3261
3376
  "argsType": "string",
3262
3377
  "resultType": "PluginCoreLayersGetResult"
@@ -3264,35 +3379,51 @@
3264
3379
  {
3265
3380
  "path": "core.layers.getActive",
3266
3381
  "namespace": "core.layers",
3267
- "summary": "Get the active drawing layer of a storey.",
3382
+ "summary": "Get the active Layers-panel layer: the one new objects land on.",
3268
3383
  "examplePrompts": [
3269
- "Which drawing layer is active on this storey?",
3270
- "Get the current layer on storey st_2",
3271
- "What layer am I drawing on?\n\n# Example\n```ts\nconst active = await snaptrude.core.layers.getActive(\"st_2\")\nif (active) console.log(active.name)\n```"
3384
+ "Which layer is active?",
3385
+ "Which layer in the Layers panel is active?",
3386
+ "What layer will new objects go on?",
3387
+ "Which layer are new walls and masses being added to?\n\n# Example\n```ts\nconst active = await snaptrude.core.layers.getActive()\nif (active) console.log(active.name)\n```"
3272
3388
  ],
3273
- "argsType": "string",
3389
+ "argsType": null,
3274
3390
  "resultType": "PluginCoreLayersGetActiveResult"
3275
3391
  },
3276
3392
  {
3277
3393
  "path": "core.layers.list",
3278
3394
  "namespace": "core.layers",
3279
- "summary": "List the drawing layers of a storey.",
3395
+ "summary": "List the layers in the Layers panel: the active design option's layers, default layer first, then in creation order.",
3280
3396
  "examplePrompts": [
3281
- "List the drawing layers on this storey",
3282
- "Show all the PDF underlays on storey st_2",
3283
- "What CAD layers are on the ground floor?\n\n# Example\n```ts\nconst { layers } = await snaptrude.core.layers.list(\"st_2\")\nfor (const l of layers) console.log(l.name, l.layerType, l.hidden)\n```"
3397
+ "List all the layers in the Layers panel",
3398
+ "Show me the layers in the left sidebar",
3399
+ "What layers does this project have?",
3400
+ "Show every layer with whether it is locked or hidden",
3401
+ "Which layer is the default layer?",
3402
+ "Which layers are empty?\n\n# Example\n```ts\nconst { layers } = await snaptrude.core.layers.list()\nfor (const l of layers) console.log(l.name, l.objectCount, l.locked, l.hidden)\n```"
3284
3403
  ],
3285
- "argsType": "string",
3404
+ "argsType": null,
3286
3405
  "resultType": "PluginCoreLayersListResult"
3287
3406
  },
3407
+ {
3408
+ "path": "core.layers.rename",
3409
+ "namespace": "core.layers",
3410
+ "summary": "Rename a layer (the panel row's \"Rename layer\").",
3411
+ "examplePrompts": [
3412
+ "Rename the Furniture layer to Loose furniture",
3413
+ "Rename layer 3f2a… to Existing building",
3414
+ "Change the name of the Landscape layer\n\n# Example\n```ts\nawait snaptrude.core.layers.rename(layerId, \"Loose furniture\")\n```"
3415
+ ],
3416
+ "argsType": "string",
3417
+ "resultType": "PluginCoreLayersRenameResult"
3418
+ },
3288
3419
  {
3289
3420
  "path": "core.layers.setActive",
3290
3421
  "namespace": "core.layers",
3291
- "summary": "Make a drawing layer the active layer of its storey.",
3422
+ "summary": "Make a layer the active layer (clicking its row in the Layers panel).",
3292
3423
  "examplePrompts": [
3293
- "Draw on layer ly_5",
3294
- "Make this the active layer",
3295
- "Switch the active layer to the CAD underlay\n\n# Example\n```ts\nawait snaptrude.core.layers.setActive(\"ly_5\")\n```"
3424
+ "Put new objects on the Furniture layer",
3425
+ "Make the Structure layer the active layer in the Layers panel",
3426
+ "Switch the active layer to Landscape\n\n# Example\n```ts\nawait snaptrude.core.layers.setActive(layerId)\n```"
3296
3427
  ],
3297
3428
  "argsType": "string",
3298
3429
  "resultType": "PluginCoreLayersSetActiveResult"
@@ -3300,11 +3431,12 @@
3300
3431
  {
3301
3432
  "path": "core.layers.update",
3302
3433
  "namespace": "core.layers",
3303
- "summary": "Update a drawing layer's visibility.",
3434
+ "summary": "Lock/unlock or show/hide a layer (the panel row's padlock and eye).",
3304
3435
  "examplePrompts": [
3305
- "Hide the PDF underlay layer",
3306
- "Show the CAD layer again",
3307
- "Hide layer ly_5\n\n# Example\n```ts\nconst layer = await snaptrude.core.layers.update(\"ly_5\", true)\n```"
3436
+ "Lock the Default layer",
3437
+ "Lock the Structure layer",
3438
+ "Hide the Landscape layer in the Layers panel",
3439
+ "Unlock layer 3f2a… and show it again\n\n# Example\n```ts\nawait snaptrude.core.layers.update(layerId, { locked: true, hidden: false })\n```"
3308
3440
  ],
3309
3441
  "argsType": "string",
3310
3442
  "resultType": "PluginCoreLayersUpdateResult"
@@ -4034,6 +4166,66 @@
4034
4166
  "argsType": null,
4035
4167
  "resultType": "number"
4036
4168
  },
4169
+ {
4170
+ "path": "core.storeys.layers.get",
4171
+ "namespace": "core.storeys.layers",
4172
+ "summary": "Get a single storey layer by id.",
4173
+ "examplePrompts": [
4174
+ "Get the storey drawing layer with id ly_5",
4175
+ "Is storey layer ly_5 hidden?",
4176
+ "Look up a storey underlay layer by id\n\n# Example\n```ts\nconst layer = await snaptrude.core.storeys.layers.get(\"ly_5\")\nif (layer) console.log(layer.name, layer.hidden, layer.locked)\n```"
4177
+ ],
4178
+ "argsType": "string",
4179
+ "resultType": "PluginCoreStoreysLayersGetResult"
4180
+ },
4181
+ {
4182
+ "path": "core.storeys.layers.getActive",
4183
+ "namespace": "core.storeys.layers",
4184
+ "summary": "Get the active storey layer of a storey.",
4185
+ "examplePrompts": [
4186
+ "Which sketch surface (Wall/Rough) is active on this storey?",
4187
+ "Get the active storey drawing layer on st_2",
4188
+ "Which storey layer is new sketch geometry drawn onto?\n\n# Example\n```ts\nconst active = await snaptrude.core.storeys.layers.getActive(\"st_2\")\nif (active) console.log(active.name)\n```"
4189
+ ],
4190
+ "argsType": "string",
4191
+ "resultType": "PluginCoreStoreysLayersGetActiveResult"
4192
+ },
4193
+ {
4194
+ "path": "core.storeys.layers.list",
4195
+ "namespace": "core.storeys.layers",
4196
+ "summary": "List the storey layers of a storey.",
4197
+ "examplePrompts": [
4198
+ "List the sketch surfaces and underlays on this storey",
4199
+ "Show all the PDF underlays on storey st_2",
4200
+ "What CAD layers are on the ground floor?\n\n# Example\n```ts\nconst { layers } = await snaptrude.core.storeys.layers.list(\"st_2\")\nfor (const l of layers) console.log(l.name, l.layerType, l.hidden)\n```"
4201
+ ],
4202
+ "argsType": "string",
4203
+ "resultType": "PluginCoreStoreysLayersListResult"
4204
+ },
4205
+ {
4206
+ "path": "core.storeys.layers.setActive",
4207
+ "namespace": "core.storeys.layers",
4208
+ "summary": "Make a storey layer the active layer of its storey.",
4209
+ "examplePrompts": [
4210
+ "Switch this storey's sketch surface to the Rough layer",
4211
+ "Make storey layer ly_5 the active sketch surface",
4212
+ "Switch the active storey layer to the CAD underlay\n\n# Example\n```ts\nawait snaptrude.core.storeys.layers.setActive(\"ly_5\")\n```"
4213
+ ],
4214
+ "argsType": "string",
4215
+ "resultType": "PluginCoreStoreysLayersSetActiveResult"
4216
+ },
4217
+ {
4218
+ "path": "core.storeys.layers.update",
4219
+ "namespace": "core.storeys.layers",
4220
+ "summary": "Update a storey layer's visibility.",
4221
+ "examplePrompts": [
4222
+ "Hide the PDF underlay layer",
4223
+ "Show the CAD underlay again",
4224
+ "Hide storey layer ly_5\n\n# Example\n```ts\nconst layer = await snaptrude.core.storeys.layers.update(\"ly_5\", true)\n```"
4225
+ ],
4226
+ "argsType": "string",
4227
+ "resultType": "PluginCoreStoreysLayersUpdateResult"
4228
+ },
4037
4229
  {
4038
4230
  "path": "core.storeys.list",
4039
4231
  "namespace": "core.storeys",
@@ -4761,17 +4953,18 @@
4761
4953
  {
4762
4954
  "path": "design.create.wallRuns",
4763
4955
  "namespace": "design.create",
4764
- "summary": "Create **many wall runs** in one undoable operation (bulk plural of {@linkcode walls}). Each item is one full run — a wall per curve in that item's profile chain, mitred at shared endpoints. Junctions resolve within a run, not between runs. Each item carries its own dimensions, `wallType` and `storey`, so a single call can build a whole floor plate or several storeys at once. Validate-all-or-throw; one command.",
4956
+ "summary": "Create **many wall runs** in one undoable operation (bulk plural of {@linkcode walls}). Each item is one full run — a wall per curve in that item's profile chain, mitred at shared endpoints. Junctions resolve within a run, not between runs. Each item carries its own dimensions, `wallType` and `storey`, so a single call can build a whole floor plate or several storeys at once. Per-curve `topProfiles` make raked or gabled walls (see {@linkcode PluginWallTopProfile}). Validate-all-or-throw; one command.",
4765
4957
  "examplePrompts": [
4766
4958
  "Draw all the walls of this floor plan at once",
4767
4959
  "Build every room's perimeter in one operation",
4768
4960
  "Bulk create wall runs from these centerlines",
4769
4961
  "Create the walls for both storeys in a single undo step",
4770
- "Turn these polylines into 200mm brick walls together"
4962
+ "Turn these polylines into 200mm brick walls together",
4963
+ "Import these raked walls with their top profiles in one go"
4771
4964
  ],
4772
4965
  "argsType": "PluginCreateWallRunItem[]",
4773
4966
  "resultType": "ComponentHandle[][]",
4774
- "performance": "Bulk creator — the whole batch is ONE host round-trip and ONE undo entry. Always prefer this over calling `design.create.walls` in a loop: build the full `items[]` array first (all profiles up front), then make one call. # Example ```ts const v = snaptrude.core.math.vec3 const ground = await snaptrude.core.geom.create.profileFromLinePoints([ await v.new(0, 0, 0), await v.new(8, 0, 0), await v.new(8, 0, 6), ]) const upper = await snaptrude.core.geom.create.profileFromLinePoints([ await v.new(0, 0, 0), await v.new(8, 0, 0), ]) const [groundWalls, upperWalls] = await snaptrude.design.create.wallRuns([ { profile: ground, height: 3, thickness: 0.2 }, { profile: upper, height: 3, storey: 2 }, ]) console.log(groundWalls.length, \"walls on the ground floor\") ```"
4967
+ "performance": "Bulk creator — the whole batch is ONE host round-trip and ONE undo entry. Always prefer this over calling `design.create.walls` in a loop: build the full `items[]` array first (all profiles up front), then make one call. # Example ```ts const v = snaptrude.core.math.vec3 const ground = await snaptrude.core.geom.create.profileFromLinePoints([ await v.new(0, 0, 0), await v.new(8, 0, 0), await v.new(8, 0, 6), ]) const upper = await snaptrude.core.geom.create.profileFromLinePoints([ await v.new(0, 0, 0), await v.new(8, 0, 0), ]) const [groundWalls, upperWalls] = await snaptrude.design.create.wallRuns([ { profile: ground, height: 3, thickness: 0.2 }, { profile: upper, height: 3, storey: 2 }, // one gable wall: 3m at both ends, 5m ridge in the middle { profile: upper, thickness: 0.2, storey: 3, topProfiles: [[{ along: 0, height: 3 }, { along: 0.5, height: 5 }, { along: 1, height: 3 }]] }, ]) console.log(groundWalls.length, \"walls on the ground floor\") ```"
4775
4968
  },
4776
4969
  {
4777
4970
  "path": "design.create.walls",
@@ -4784,7 +4977,10 @@
4784
4977
  "Turn this polyline sketch into walls",
4785
4978
  "Add walls with mitred corners along the path",
4786
4979
  "Draw brick walls with plaster along this outline",
4787
- "Build the perimeter in exposed concrete walls\n\n# Example\n```ts\nconst v = snaptrude.core.math.vec3\nconst centerlines = await snaptrude.core.geom.create.profileFromLinePoints([\nawait v.new(0, 0, 0),\nawait v.new(8, 0, 0),\nawait v.new(8, 0, 6),\n])\nconst walls = await snaptrude.design.create.walls(centerlines, 3, 0.2)\n// …built as a specific wall type (layers/material/thickness from the type):\nconst [brick] = await snaptrude.design.types.list(\"wall\")\nconst brickWalls = await snaptrude.design.create.walls(\ncenterlines, 3, undefined, brick.label,\n)\n```"
4980
+ "Build the perimeter in exposed concrete walls",
4981
+ "Create a raked wall that slopes from 3m to 5m",
4982
+ "Build a gable end wall with the ridge in the middle",
4983
+ "Draw a wall with a sloped top edge\n\n# Example\n```ts\nconst v = snaptrude.core.math.vec3\nconst centerlines = await snaptrude.core.geom.create.profileFromLinePoints([\nawait v.new(0, 0, 0),\nawait v.new(8, 0, 0),\nawait v.new(8, 0, 6),\n])\nconst walls = await snaptrude.design.create.walls(centerlines, 3, 0.2)\n// …built as a specific wall type (layers/material/thickness from the type):\nconst [brick] = await snaptrude.design.types.list(\"wall\")\nconst brickWalls = await snaptrude.design.create.walls(\ncenterlines, 3, undefined, brick.label,\n)\n// …a raked wall (3m at the start, 5m at the end) on a single centerline:\nconst run = await snaptrude.core.geom.create.profileFromCurves([\nawait snaptrude.core.geom.create.line(await v.new(0, 0, 10), await v.new(8, 0, 10)),\n])\nconst [raked] = await snaptrude.design.create.walls(run, undefined, 0.2, undefined, undefined, [\n[{ along: 0, height: 3 }, { along: 1, height: 5 }],\n])\n```"
4788
4984
  ],
4789
4985
  "argsType": "ProfileHandle",
4790
4986
  "resultType": "ComponentHandle[]",
@@ -6489,6 +6685,21 @@
6489
6685
  "argsType": "ComponentHandle",
6490
6686
  "resultType": "boolean"
6491
6687
  },
6688
+ {
6689
+ "path": "design.update.setObjectType",
6690
+ "namespace": "design.update",
6691
+ "summary": "Change the **object type** of one or more masses — turn a mass into a real wall, roof, slab or floor: the properties panel's Object Type dropdown, headless. The geometry is kept exactly as it is (a wedge stays a wedge; nothing is flattened to a default thickness), so a sloped mass built with `design.create.massFromBrep` becomes a sloped roof or a raked wall. The component keeps its handle, label and storey; it gains the target type's construction layers and properties, and the type's default material when the mass still wore the default. One undoable operation for the whole list; undo turns them back into masses.",
6692
+ "examplePrompts": [
6693
+ "Convert this mass into a wall",
6694
+ "Turn the sloped mass into a roof",
6695
+ "Make these masses real slabs",
6696
+ "Change the object type of the selection to wall",
6697
+ "Convert the wedge I built into a raked wall",
6698
+ "Turn this mass into a floor\n\n# Example\n```ts\nconst brep = await snaptrude.core.geom.create.brepFromFaces(wedgeFaces)\nconst wedge = await snaptrude.design.create.massFromBrep(brep, \"Gable end\")\nconst { affected } = await snaptrude.design.update.setObjectType([wedge], \"wall\")\nconsole.log(await snaptrude.design.query.getEntityType(affected[0])) // \"wall\"\n```"
6699
+ ],
6700
+ "argsType": "ComponentHandle[]",
6701
+ "resultType": "PluginDesignChangeResult"
6702
+ },
6492
6703
  {
6493
6704
  "path": "design.update.setStorey",
6494
6705
  "namespace": "design.update",
@@ -7198,6 +7409,70 @@
7198
7409
  "argsType": "string",
7199
7410
  "resultType": "PluginPresentationAnnotateTextResult"
7200
7411
  },
7412
+ {
7413
+ "path": "presentation.camera.capture",
7414
+ "namespace": "presentation.camera",
7415
+ "summary": "Screenshot what the Present canvas currently shows.",
7416
+ "examplePrompts": [
7417
+ "Take a screenshot of the Present canvas",
7418
+ "Capture what I am looking at in Present mode",
7419
+ "Screenshot the presentation canvas as a JPEG",
7420
+ "Grab a high-res image of the current sheet view\n\n# Example\n```ts\nconst { image, width, height } = await snaptrude.presentation.camera.capture({\nformat: \"png\",\npixelRatio: 2,\n})\n```"
7421
+ ],
7422
+ "argsType": "{\n format?: PluginPresentationImageFormat\n pixelRatio?: number\n }",
7423
+ "resultType": "PluginPresentationCameraCaptureResult"
7424
+ },
7425
+ {
7426
+ "path": "presentation.camera.get",
7427
+ "namespace": "presentation.camera",
7428
+ "summary": "Read the Present camera: pan, zoom, the visible page-space rectangle and the sheet under the centre of the view.",
7429
+ "examplePrompts": [
7430
+ "Where is the Present canvas camera?",
7431
+ "What zoom level is Present mode at?",
7432
+ "Which sheet is on screen right now?",
7433
+ "Read the visible area of the presentation canvas\n\n# Example\n```ts\nconst { zoom, sheetId } = await snaptrude.presentation.camera.get()\n```"
7434
+ ],
7435
+ "argsType": null,
7436
+ "resultType": "PluginPresentationCameraState"
7437
+ },
7438
+ {
7439
+ "path": "presentation.camera.set",
7440
+ "namespace": "presentation.camera",
7441
+ "summary": "Pan and/or zoom the Present canvas. Fields left out keep their current value, so `{ zoom: 2 }` changes only the zoom (the page point at the viewport's top-left corner stays put) and `{ x, y }` pans at the current zoom. `zoom` is clamped to the editor's range (1% to 1000%); the requested `x`/`y` are always honoured. Immediate (no animation). View-state only — not undoable.",
7442
+ "examplePrompts": [
7443
+ "Zoom the Present canvas to 50%",
7444
+ "Pan the presentation canvas to the right",
7445
+ "Restore the Present camera I saved earlier",
7446
+ "Set the Present zoom to 200% without moving\n\n# Example\n```ts\nconst saved = await snaptrude.presentation.camera.get()\nawait snaptrude.presentation.camera.set({ zoom: 0.5 })\n// …later, restore the exact framing\nawait snaptrude.presentation.camera.set({ x: saved.x, y: saved.y, zoom: saved.zoom })\n```"
7447
+ ],
7448
+ "argsType": "{\n x?: number\n y?: number\n zoom?: number\n }",
7449
+ "resultType": "PluginPresentationCameraState"
7450
+ },
7451
+ {
7452
+ "path": "presentation.camera.zoomTo",
7453
+ "namespace": "presentation.camera",
7454
+ "summary": "Frame one shape on the Present canvas: a sheet, a placed view, a keyed shape or an annotation — any id the other `presentation` namespaces hand out. Pair with {@linkcode PluginPresentationCameraApi.capture} to screenshot a single sheet or placed view as it appears on screen. Immediate, unlike `sheets.setActive`, which animates its move over half a second. View-state only — not undoable.",
7455
+ "examplePrompts": [
7456
+ "Zoom in on sheet 2 in Present mode",
7457
+ "Frame this placed view on the Present canvas",
7458
+ "Go to the cover sheet and screenshot it",
7459
+ "Centre the presentation view on that table\n\n# Example\n```ts\nconst { sheets } = await snaptrude.presentation.sheets.list()\nawait snaptrude.presentation.camera.zoomTo(sheets[1].id)\nconst { image } = await snaptrude.presentation.camera.capture()\n```"
7460
+ ],
7461
+ "argsType": "string",
7462
+ "resultType": "PluginPresentationCameraState"
7463
+ },
7464
+ {
7465
+ "path": "presentation.camera.zoomToFit",
7466
+ "namespace": "presentation.camera",
7467
+ "summary": "Frame everything on the Present canvas — every sheet and loose shape — the Present-mode \"zoom to fit\". View-state only — not undoable.",
7468
+ "examplePrompts": [
7469
+ "Zoom out to see all the sheets",
7470
+ "Fit the whole presentation in the Present view",
7471
+ "Zoom to fit in Present mode\n\n# Example\n```ts\nawait snaptrude.presentation.camera.zoomToFit()\n```"
7472
+ ],
7473
+ "argsType": null,
7474
+ "resultType": "PluginPresentationCameraState"
7475
+ },
7201
7476
  {
7202
7477
  "path": "presentation.diagrams.generateProgram",
7203
7478
  "namespace": "presentation.diagrams",
@@ -7914,6 +8189,232 @@
7914
8189
  "argsType": "string",
7915
8190
  "resultType": "PluginPresentationViewsUpdateSettingsResult"
7916
8191
  },
8192
+ {
8193
+ "path": "presentation.walkthroughs.cancelJob",
8194
+ "namespace": "presentation.walkthroughs",
8195
+ "summary": "Cancel an export job. The recording stops and nothing is placed; a job that has already finished is returned unchanged. Write-gated.",
8196
+ "examplePrompts": [
8197
+ "Cancel the video export\n\n# Example\n```ts\nawait snaptrude.presentation.walkthroughs.cancelJob(jobId)\n```"
8198
+ ],
8199
+ "argsType": "string",
8200
+ "resultType": "PluginWalkthroughExportJob"
8201
+ },
8202
+ {
8203
+ "path": "presentation.walkthroughs.capture",
8204
+ "namespace": "presentation.walkthroughs",
8205
+ "summary": "Capture frames of a walkthrough as one contact-sheet image: a grid of views at evenly spaced moments (or at `options.timesInSeconds`), read left to right and top to bottom. The camera goes back to where it was afterwards. Switches from 2D plan view to 3D first.",
8206
+ "examplePrompts": [
8207
+ "Show me what the walkthrough looks like",
8208
+ "Capture six frames of the fly-over\n\n# Example\n```ts\nconst { image } = await snaptrude.presentation.walkthroughs.capture(walkthroughId, {\ncount: 6,\n})\n```"
8209
+ ],
8210
+ "argsType": "string",
8211
+ "resultType": "PluginWalkthroughCaptureResult"
8212
+ },
8213
+ {
8214
+ "path": "presentation.walkthroughs.create",
8215
+ "namespace": "presentation.walkthroughs",
8216
+ "summary": "Create a walkthrough from full keyframes: where the camera stands at each and how it looks there (ahead along the path, at a target, or in a fixed direction). A keyframe that follows the floor stands at the walkthrough's eye height above the floor, stair, terrain or ground at or below its `eye`, and the path between two such keyframes climbs stairs and ramps. The new walkthrough opens in the walkthrough dock. Write-gated; one undo step.",
8217
+ "examplePrompts": [
8218
+ "Make a walkthrough through these three viewpoints",
8219
+ "Create a camera path that looks at the atrium the whole way\n\n# Example\n```ts\nconst walkthrough = await snaptrude.presentation.walkthroughs.create(\n[\n{ eye: { x: 0, y: 30, z: 80 }, look: { mode: \"target\", target: { x: 0, y: 10, z: 0 } } },\n{ eye: { x: 60, y: 30, z: 0 }, look: { mode: \"target\", target: { x: 0, y: 10, z: 0 } } },\n],\n{ name: \"Approach\", durationInSeconds: 10 },\n)\n```"
8220
+ ],
8221
+ "argsType": "PluginWalkthroughKeyframeInput[]",
8222
+ "resultType": "PluginWalkthrough"
8223
+ },
8224
+ {
8225
+ "path": "presentation.walkthroughs.createFromPoints",
8226
+ "namespace": "presentation.walkthroughs",
8227
+ "summary": "Create a walkthrough that walks through points on the floor, the way the Walkthrough tool draws a route: the camera stands at eye height above the floor, stair, terrain or ground at each point, climbs stairs and ramps between them, and looks ahead along the path, or at `options.lookAt` the whole way. Write-gated; one undo step.",
8228
+ "examplePrompts": [
8229
+ "Walk from the entrance through the lobby to the stairs",
8230
+ "Make a walkthrough that visits every room on this floor",
8231
+ "Create a loop around the courtyard\n\n# Example\n```ts\nawait snaptrude.presentation.walkthroughs.createFromPoints(\n[{ x: 0, y: 0, z: 0 }, { x: 40, y: 0, z: 0 }, { x: 40, y: 0, z: 30 }],\n{ name: \"Ground floor tour\" },\n)\n```"
8232
+ ],
8233
+ "argsType": "Vec3Components[]",
8234
+ "resultType": "PluginWalkthrough"
8235
+ },
8236
+ {
8237
+ "path": "presentation.walkthroughs.createFromPreset",
8238
+ "namespace": "presentation.walkthroughs",
8239
+ "summary": "Create a walkthrough from a camera move around a subject, as the Walkthrough button's menu does: `orbit` circles it facing its middle, `flyOver` passes above it looking ahead and down, `pushIn` and `pullBack` move toward and away from it, and `rise` cranes up from eye level. The subject is `options.subject`, else the selection, else the visible model without its terrain; the move is sized to fit it in view and starts on the side the camera is on. While the walkthrough is still a preset, {@linkcode PluginPresentationWalkthroughsApi.update} can change its distance, height and direction; editing a keyframe makes it ordinary. Write-gated; one undo step.",
8240
+ "examplePrompts": [
8241
+ "Orbit around the selected building",
8242
+ "Make a drone fly-over of the site",
8243
+ "Push in slowly toward the entrance",
8244
+ "Crane up to reveal the whole campus\n\n# Example\n```ts\nawait snaptrude.presentation.walkthroughs.createFromPreset(\"orbit\", {\nsubject: [towerId],\nheightInDegrees: 35,\ndurationInSeconds: 20,\n})\n```"
8245
+ ],
8246
+ "argsType": "PluginWalkthroughPresetKind",
8247
+ "resultType": "PluginWalkthrough"
8248
+ },
8249
+ {
8250
+ "path": "presentation.walkthroughs.createKeyframe",
8251
+ "namespace": "presentation.walkthroughs",
8252
+ "summary": "Add a keyframe to a walkthrough at `index` (0 to the keyframe count; default: the end). A preset walkthrough becomes ordinary. Write-gated; one undo step.",
8253
+ "examplePrompts": [
8254
+ "Add a stop in the kitchen after the second point\n\n# Example\n```ts\nawait snaptrude.presentation.walkthroughs.createKeyframe(\nwalkthroughId,\n{ eye: { x: 12, y: 0, z: 30 }, followsFloor: true, holdInSeconds: 2 },\n2,\n)\n```"
8255
+ ],
8256
+ "argsType": "string",
8257
+ "resultType": "PluginWalkthrough"
8258
+ },
8259
+ {
8260
+ "path": "presentation.walkthroughs.delete",
8261
+ "namespace": "presentation.walkthroughs",
8262
+ "summary": "Delete a walkthrough. Write-gated; one undo step.",
8263
+ "examplePrompts": [
8264
+ "Delete the old walkthrough\n\n# Example\n```ts\nawait snaptrude.presentation.walkthroughs.delete(walkthroughId)\n```"
8265
+ ],
8266
+ "argsType": "string",
8267
+ "resultType": "boolean"
8268
+ },
8269
+ {
8270
+ "path": "presentation.walkthroughs.deleteKeyframe",
8271
+ "namespace": "presentation.walkthroughs",
8272
+ "summary": "Remove a keyframe; the path then runs straight from the keyframe before it to the one after. Removing the last keyframe deletes the walkthrough. A preset walkthrough becomes ordinary. Write-gated; one undo step.",
8273
+ "examplePrompts": [
8274
+ "Remove the third stop from the walkthrough\n\n# Example\n```ts\nawait snaptrude.presentation.walkthroughs.deleteKeyframe(walkthroughId, keyframeId)\n```"
8275
+ ],
8276
+ "argsType": "string",
8277
+ "resultType": "PluginWalkthrough | null"
8278
+ },
8279
+ {
8280
+ "path": "presentation.walkthroughs.export",
8281
+ "namespace": "presentation.walkthroughs",
8282
+ "summary": "Record a walkthrough as a video and place it on the Present canvas, as an asynchronous job: this resolves at once with the queued job, and {@linkcode PluginPresentationWalkthroughsApi.getJob} reports it until it completes, fails or is cancelled. Recording plays the walkthrough in real time at the chosen size, so it takes about as long as the walkthrough plus the upload; the editor switches to Present mode to place the video, which keeps playing muted in a loop there. Only one export runs at a time. Write-gated.",
8283
+ "examplePrompts": [
8284
+ "Export the walkthrough as a video",
8285
+ "Put a 1080p video of the orbit on a sheet\n\n# Example\n```ts\nconst walkthroughs = snaptrude.presentation.walkthroughs\nlet job = await walkthroughs.export(walkthroughId, { quality: \"1080p\" })\nwhile (job.status === \"queued\" || job.status === \"running\") {\nawait new Promise((resolve) => setTimeout(resolve, 2000))\njob = (await walkthroughs.getJob(job.jobId))!\n}\nconsole.log(job.result?.shapeId)\n```"
8286
+ ],
8287
+ "argsType": "string",
8288
+ "resultType": "PluginWalkthroughExportJob"
8289
+ },
8290
+ {
8291
+ "path": "presentation.walkthroughs.get",
8292
+ "namespace": "presentation.walkthroughs",
8293
+ "summary": "Get one walkthrough by id.",
8294
+ "examplePrompts": [
8295
+ "Show me the keyframes of the orbit walkthrough",
8296
+ "How long does this walkthrough take?\n\n# Example\n```ts\nconst walkthrough = await snaptrude.presentation.walkthroughs.get(walkthroughId)\nconsole.log(walkthrough?.durationInSeconds)\n```"
8297
+ ],
8298
+ "argsType": "string",
8299
+ "resultType": "PluginWalkthrough | null"
8300
+ },
8301
+ {
8302
+ "path": "presentation.walkthroughs.getJob",
8303
+ "namespace": "presentation.walkthroughs",
8304
+ "summary": "Get an export job by id.",
8305
+ "examplePrompts": [
8306
+ "Is the video export done yet?\n\n# Example\n```ts\nconst job = await snaptrude.presentation.walkthroughs.getJob(jobId)\n```"
8307
+ ],
8308
+ "argsType": "string",
8309
+ "resultType": "PluginWalkthroughExportJob | null"
8310
+ },
8311
+ {
8312
+ "path": "presentation.walkthroughs.getState",
8313
+ "namespace": "presentation.walkthroughs",
8314
+ "summary": "Read the playback state: which walkthrough is playing or paused, and how far through it.",
8315
+ "examplePrompts": [
8316
+ "Is the walkthrough still playing?\n\n# Example\n```ts\nconst { status, timeInSeconds } = await snaptrude.presentation.walkthroughs.getState()\n```"
8317
+ ],
8318
+ "argsType": null,
8319
+ "resultType": "PluginWalkthroughPlaybackState"
8320
+ },
8321
+ {
8322
+ "path": "presentation.walkthroughs.list",
8323
+ "namespace": "presentation.walkthroughs",
8324
+ "summary": "List the open project's walkthroughs, oldest first.",
8325
+ "examplePrompts": [
8326
+ "Which walkthroughs are there?",
8327
+ "List the camera paths in this project\n\n# Example\n```ts\nconst { walkthroughs } = await snaptrude.presentation.walkthroughs.list()\n```"
8328
+ ],
8329
+ "argsType": null,
8330
+ "resultType": "PluginWalkthroughsListResult"
8331
+ },
8332
+ {
8333
+ "path": "presentation.walkthroughs.listIssues",
8334
+ "namespace": "presentation.walkthroughs",
8335
+ "summary": "Find places where a walkthrough's camera passes through the model: through anything walking would stop at, such as a wall, glazing, a column, a slab or a roof, which would show the inside of the geometry on screen. Doors, furniture and room masses don't count, as walking passes through them. Each issue gives the first moment and point of one pass. The camera itself does not move.",
8336
+ "examplePrompts": [
8337
+ "Does the walkthrough go through any walls?",
8338
+ "Check the camera path for clashes and fix them\n\n# Example\n```ts\nconst { issues } = await snaptrude.presentation.walkthroughs.listIssues(walkthroughId)\nfor (const issue of issues) console.log(issue.timeInSeconds, issue.componentId)\n```"
8339
+ ],
8340
+ "argsType": "string",
8341
+ "resultType": "PluginWalkthroughListIssuesResult"
8342
+ },
8343
+ {
8344
+ "path": "presentation.walkthroughs.listJobs",
8345
+ "namespace": "presentation.walkthroughs",
8346
+ "summary": "List export jobs, newest first: running ones and those that finished in the last 30 minutes.",
8347
+ "examplePrompts": [
8348
+ "Which video exports are running?\n\n# Example\n```ts\nconst { jobs } = await snaptrude.presentation.walkthroughs.listJobs()\n```"
8349
+ ],
8350
+ "argsType": null,
8351
+ "resultType": "PluginWalkthroughListJobsResult"
8352
+ },
8353
+ {
8354
+ "path": "presentation.walkthroughs.reorderKeyframe",
8355
+ "namespace": "presentation.walkthroughs",
8356
+ "summary": "Move a keyframe to position `index` in the walkthrough's order (the `presentation.sheets.reorder` convention). A preset walkthrough becomes ordinary. Write-gated; one undo step.",
8357
+ "examplePrompts": [
8358
+ "Visit the terrace before the living room\n\n# Example\n```ts\nawait snaptrude.presentation.walkthroughs.reorderKeyframe(walkthroughId, keyframeId, 0)\n```"
8359
+ ],
8360
+ "argsType": "string",
8361
+ "resultType": "PluginWalkthrough"
8362
+ },
8363
+ {
8364
+ "path": "presentation.walkthroughs.sample",
8365
+ "namespace": "presentation.walkthroughs",
8366
+ "summary": "Sample where the camera is and which way it looks at given moments of a walkthrough's playback, without moving the camera.",
8367
+ "examplePrompts": [
8368
+ "Where is the camera halfway through the walkthrough?",
8369
+ "Check how high the camera flies over the roof\n\n# Example\n```ts\nconst walkthrough = await snaptrude.presentation.walkthroughs.get(walkthroughId)\nconst { samples } = await snaptrude.presentation.walkthroughs.sample(walkthroughId, [\n0,\nwalkthrough!.durationInSeconds / 2,\n])\n```"
8370
+ ],
8371
+ "argsType": "string",
8372
+ "resultType": "PluginWalkthroughSampleResult"
8373
+ },
8374
+ {
8375
+ "path": "presentation.walkthroughs.start",
8376
+ "namespace": "presentation.walkthroughs",
8377
+ "summary": "Play a walkthrough in the viewport, from the start or `options.fromTimeInSeconds`. Arrow-key navigation pauses while it plays; {@linkcode PluginPresentationWalkthroughsApi.stop} puts the camera back where it was. Switches from 2D plan view to 3D first. Resolves once playback has started; a walkthrough that is already playing keeps playing.",
8378
+ "examplePrompts": [
8379
+ "Play the walkthrough",
8380
+ "Show me the orbit\n\n# Example\n```ts\nawait snaptrude.presentation.walkthroughs.start(walkthroughId)\n```"
8381
+ ],
8382
+ "argsType": "string",
8383
+ "resultType": "PluginWalkthroughPlaybackState"
8384
+ },
8385
+ {
8386
+ "path": "presentation.walkthroughs.stop",
8387
+ "namespace": "presentation.walkthroughs",
8388
+ "summary": "Stop playback and put the camera back where it was before it started. A no-op when nothing is playing.",
8389
+ "examplePrompts": [
8390
+ "Stop the walkthrough\n\n# Example\n```ts\nawait snaptrude.presentation.walkthroughs.stop()\n```"
8391
+ ],
8392
+ "argsType": null,
8393
+ "resultType": "PluginWalkthroughPlaybackState"
8394
+ },
8395
+ {
8396
+ "path": "presentation.walkthroughs.update",
8397
+ "namespace": "presentation.walkthroughs",
8398
+ "summary": "Change a walkthrough: only the fields given change. Speed and duration are two ways to set one thing, so give at most one of them. `preset` changes a preset walkthrough's camera move and makes its keyframes again, keeping its duration; changing `isLoop` of a preset walkthrough makes it ordinary. Write-gated; one undo step.",
8399
+ "examplePrompts": [
8400
+ "Slow the walkthrough down to 30 seconds",
8401
+ "Rename it to \"Evening approach\"",
8402
+ "Make the orbit go the other way round and higher up\n\n# Example\n```ts\nawait snaptrude.presentation.walkthroughs.update(walkthroughId, {\ndurationInSeconds: 30,\nisRepeating: true,\n})\n```"
8403
+ ],
8404
+ "argsType": "string",
8405
+ "resultType": "PluginWalkthrough"
8406
+ },
8407
+ {
8408
+ "path": "presentation.walkthroughs.updateKeyframe",
8409
+ "namespace": "presentation.walkthroughs",
8410
+ "summary": "Change a keyframe: only the fields given change. A preset walkthrough becomes ordinary. Write-gated; one undo step.",
8411
+ "examplePrompts": [
8412
+ "Pause for three seconds at the second point",
8413
+ "Make the last point look at the fireplace\n\n# Example\n```ts\nawait snaptrude.presentation.walkthroughs.updateKeyframe(walkthroughId, keyframeId, {\nlook: { mode: \"target\", target: { x: 5, y: 4, z: 10 } },\n})\n```"
8414
+ ],
8415
+ "argsType": "string",
8416
+ "resultType": "PluginWalkthrough"
8417
+ },
7917
8418
  {
7918
8419
  "path": "program.adjacency.compute",
7919
8420
  "namespace": "program.adjacency",