@snaptrude/plugin-core 0.9.15 → 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.
- package/CHANGELOG.md +6 -0
- package/api-manifest.json +300 -0
- package/dist/api/core/camera/index.d.ts +418 -0
- package/dist/api/core/camera/index.d.ts.map +1 -1
- package/dist/api/presentation/index.d.ts +9 -0
- package/dist/api/presentation/index.d.ts.map +1 -1
- package/dist/api/presentation/walkthroughs.d.ts +1350 -0
- package/dist/api/presentation/walkthroughs.d.ts.map +1 -0
- package/dist/index.cjs +662 -262
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +610 -262
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/api/core/camera/index.ts +400 -1
- package/src/api/presentation/index.ts +9 -0
- package/src/api/presentation/walkthroughs.ts +1201 -0
- package/api-manifest.full.json +0 -8930
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @snaptrude/plugin-core
|
|
2
2
|
|
|
3
|
+
## 0.9.16
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- e8d4ec3: Add camera pose and navigation APIs to `core.camera` (`getPose`, `setPose`, `move`, `rotate`, `getNavigationSettings`, `updateNavigationSettings`) and a new `presentation.walkthroughs` namespace for camera paths: create from keyframes, floor points or camera-move presets; edit walkthroughs and their keyframes; `sample`, `listIssues` and `capture` them; play them with `start`/`stop`/`getState`; and `export` them as a video onto the Present canvas as a job (`getJob`, `cancelJob`, `listJobs`).
|
|
8
|
+
|
|
3
9
|
## 0.9.15
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
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",
|
|
@@ -8115,6 +8189,232 @@
|
|
|
8115
8189
|
"argsType": "string",
|
|
8116
8190
|
"resultType": "PluginPresentationViewsUpdateSettingsResult"
|
|
8117
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
|
+
},
|
|
8118
8418
|
{
|
|
8119
8419
|
"path": "program.adjacency.compute",
|
|
8120
8420
|
"namespace": "program.adjacency",
|