@snaptrude/plugin-core 0.9.15 → 0.9.16-networks-20261008.1
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/dist/api/analysis/daylight.d.ts +5 -5
- package/dist/api/analysis/solar.d.ts +2 -2
- package/dist/api/core/camera/index.d.ts +418 -0
- package/dist/api/core/camera/index.d.ts.map +1 -1
- package/dist/api/design/bim.d.ts +209 -0
- package/dist/api/design/bim.d.ts.map +1 -0
- package/dist/api/design/catalog.d.ts +242 -0
- package/dist/api/design/catalog.d.ts.map +1 -0
- package/dist/api/design/create/bulk-items.d.ts +11 -3
- package/dist/api/design/create/bulk-items.d.ts.map +1 -1
- package/dist/api/design/create/index.d.ts +47 -20
- package/dist/api/design/create/index.d.ts.map +1 -1
- package/dist/api/design/family.d.ts +576 -12
- package/dist/api/design/family.d.ts.map +1 -1
- package/dist/api/design/index.d.ts +16 -0
- package/dist/api/design/index.d.ts.map +1 -1
- package/dist/api/design/networks.d.ts +1703 -0
- package/dist/api/design/networks.d.ts.map +1 -0
- package/dist/api/design/query/index.d.ts +30 -30
- package/dist/api/design/selection/index.d.ts +10 -10
- package/dist/api/design/types/index.d.ts +40 -24
- package/dist/api/design/types/index.d.ts.map +1 -1
- package/dist/api/design/update/index.d.ts +40 -3
- package/dist/api/design/update/index.d.ts.map +1 -1
- package/dist/api/presentation/aiInspiration.d.ts +10 -10
- 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 +3255 -2176
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3146 -2176
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/scripts/generate-manifest.mjs +5 -0
- package/src/api/core/camera/index.ts +400 -1
- package/src/api/design/bim.ts +121 -0
- package/src/api/design/catalog.ts +128 -0
- package/src/api/design/create/bulk-items.ts +6 -2
- package/src/api/design/create/index.ts +62 -32
- package/src/api/design/family.ts +448 -17
- package/src/api/design/index.ts +34 -4
- package/src/api/design/networks.ts +607 -0
- package/src/api/design/types/index.ts +31 -24
- package/src/api/design/update/index.ts +41 -3
- package/src/api/presentation/index.ts +9 -0
- package/src/api/presentation/walkthroughs.ts +1201 -0
- package/api-manifest.full.json +0 -8930
- package/api-manifest.json +0 -9318
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
|
|
@@ -149,8 +149,8 @@ export type PluginDaylightMetric = z.infer<typeof PluginDaylightMetric>;
|
|
|
149
149
|
export declare const PluginDaylightRunStatus: z.ZodEnum<{
|
|
150
150
|
complete: "complete";
|
|
151
151
|
failed: "failed";
|
|
152
|
-
running: "running";
|
|
153
152
|
cancelled: "cancelled";
|
|
153
|
+
running: "running";
|
|
154
154
|
}>;
|
|
155
155
|
export type PluginDaylightRunStatus = z.infer<typeof PluginDaylightRunStatus>;
|
|
156
156
|
/**
|
|
@@ -419,8 +419,8 @@ export type PluginDaylightSensorRecord = z.infer<typeof PluginDaylightSensorReco
|
|
|
419
419
|
*/
|
|
420
420
|
export declare const PluginDaylightAggregateScope: z.ZodEnum<{
|
|
421
421
|
storey: "storey";
|
|
422
|
-
space: "space";
|
|
423
422
|
project: "project";
|
|
423
|
+
space: "space";
|
|
424
424
|
}>;
|
|
425
425
|
export type PluginDaylightAggregateScope = z.infer<typeof PluginDaylightAggregateScope>;
|
|
426
426
|
/**
|
|
@@ -438,8 +438,8 @@ export type PluginDaylightAggregateScope = z.infer<typeof PluginDaylightAggregat
|
|
|
438
438
|
export declare const PluginDaylightAggregate: z.ZodObject<{
|
|
439
439
|
scope: z.ZodEnum<{
|
|
440
440
|
storey: "storey";
|
|
441
|
-
space: "space";
|
|
442
441
|
project: "project";
|
|
442
|
+
space: "space";
|
|
443
443
|
}>;
|
|
444
444
|
id: z.ZodNullable<z.ZodString>;
|
|
445
445
|
analysisAreaM2: z.ZodNumber;
|
|
@@ -521,8 +521,8 @@ export declare const PluginDaylightResults: z.ZodObject<{
|
|
|
521
521
|
status: z.ZodEnum<{
|
|
522
522
|
complete: "complete";
|
|
523
523
|
failed: "failed";
|
|
524
|
-
running: "running";
|
|
525
524
|
cancelled: "cancelled";
|
|
525
|
+
running: "running";
|
|
526
526
|
}>;
|
|
527
527
|
runId: z.ZodOptional<z.ZodString>;
|
|
528
528
|
sensors: z.ZodArray<z.ZodObject<{
|
|
@@ -540,8 +540,8 @@ export declare const PluginDaylightResults: z.ZodObject<{
|
|
|
540
540
|
aggregates: z.ZodArray<z.ZodObject<{
|
|
541
541
|
scope: z.ZodEnum<{
|
|
542
542
|
storey: "storey";
|
|
543
|
-
space: "space";
|
|
544
543
|
project: "project";
|
|
544
|
+
space: "space";
|
|
545
545
|
}>;
|
|
546
546
|
id: z.ZodNullable<z.ZodString>;
|
|
547
547
|
analysisAreaM2: z.ZodNumber;
|
|
@@ -70,8 +70,8 @@ export declare abstract class PluginAnalysisSolarApi {
|
|
|
70
70
|
export declare const PluginSolarRunStatus: z.ZodEnum<{
|
|
71
71
|
complete: "complete";
|
|
72
72
|
failed: "failed";
|
|
73
|
-
running: "running";
|
|
74
73
|
cancelled: "cancelled";
|
|
74
|
+
running: "running";
|
|
75
75
|
}>;
|
|
76
76
|
export type PluginSolarRunStatus = z.infer<typeof PluginSolarRunStatus>;
|
|
77
77
|
/**
|
|
@@ -198,8 +198,8 @@ export declare const PluginSolarSampleGridResult: z.ZodObject<{
|
|
|
198
198
|
status: z.ZodEnum<{
|
|
199
199
|
complete: "complete";
|
|
200
200
|
failed: "failed";
|
|
201
|
-
running: "running";
|
|
202
201
|
cancelled: "cancelled";
|
|
202
|
+
running: "running";
|
|
203
203
|
}>;
|
|
204
204
|
mode: z.ZodEnum<{
|
|
205
205
|
range: "range";
|
|
@@ -9,6 +9,13 @@ import { Vec3Handle } from "../../../handles";
|
|
|
9
9
|
* canvas view menu and the 2D/3D toggle. Like {@linkcode PluginZoomApi}, these
|
|
10
10
|
* are transient VIEW-STATE changes: they are not model edits, so they are not
|
|
11
11
|
* write-gated and are not undoable. Accessed via `snaptrude.core.camera`.
|
|
12
|
+
*
|
|
13
|
+
* Read and set the full camera pose (`getPose`/`setPose`), walk and turn it the
|
|
14
|
+
* way the arrow keys do (`move`/`rotate`), and read or change the arrow-key
|
|
15
|
+
* navigation settings (`getNavigationSettings`/`updateNavigationSettings`).
|
|
16
|
+
* Positions are world coordinates in internal `babylon` units (1 unit =
|
|
17
|
+
* 0.254 m, Y up); yaw is degrees clockwise from +z seen from above, pitch is
|
|
18
|
+
* degrees above level.
|
|
12
19
|
*/
|
|
13
20
|
export declare abstract class PluginCameraApi {
|
|
14
21
|
constructor();
|
|
@@ -168,6 +175,162 @@ export declare abstract class PluginCameraApi {
|
|
|
168
175
|
* ```
|
|
169
176
|
*/
|
|
170
177
|
abstract zoomSelection(): PluginApiReturn<boolean>;
|
|
178
|
+
/**
|
|
179
|
+
* Read where the camera is and where it looks: the eye and target positions
|
|
180
|
+
* (world coordinates, internal `babylon` units), the view direction as yaw
|
|
181
|
+
* and pitch, the vertical field of view, the projection and the 2D/3D mode.
|
|
182
|
+
* Paired with {@linkcode PluginCameraApi.setPose}.
|
|
183
|
+
*
|
|
184
|
+
* @returns The current {@linkcode PluginCameraPose}.
|
|
185
|
+
* @throws PRECONDITION_FAILED when there is no active camera.
|
|
186
|
+
*
|
|
187
|
+
* @examplePrompt Where is the camera right now?
|
|
188
|
+
* @examplePrompt Remember this viewpoint so we can come back to it
|
|
189
|
+
* @examplePrompt Which way is the camera facing?
|
|
190
|
+
* @examplePrompt How high above the ground is the camera?
|
|
191
|
+
*
|
|
192
|
+
* # Example
|
|
193
|
+
* ```ts
|
|
194
|
+
* const pose = await snaptrude.core.camera.getPose()
|
|
195
|
+
* console.log(pose.eye, pose.yawInDegrees, pose.pitchInDegrees)
|
|
196
|
+
* ```
|
|
197
|
+
*/
|
|
198
|
+
abstract getPose(): PluginApiReturn<PluginCameraPose>;
|
|
199
|
+
/**
|
|
200
|
+
* Place the camera, optionally easing there over `options.durationInSeconds`,
|
|
201
|
+
* and resolve once the new view has been drawn, so a capture that follows sees
|
|
202
|
+
* it without a fixed wait. `pose` is one of:
|
|
203
|
+
*
|
|
204
|
+
* - `{ eye, target }`: stand at `eye` looking at `target`, as
|
|
205
|
+
* {@linkcode PluginCameraApi.lookFrom} does with handles;
|
|
206
|
+
* - `{ eye, yawInDegrees, pitchInDegrees }`: stand at `eye` looking along a
|
|
207
|
+
* direction;
|
|
208
|
+
* - `{ standAt, yawInDegrees? }`: stand on the floor, stair, terrain or
|
|
209
|
+
* ground at or below `standAt`, at the user's eye height above it (the `I`
|
|
210
|
+
* key), facing `yawInDegrees` (the current yaw when omitted).
|
|
211
|
+
*
|
|
212
|
+
* Stops a playing walkthrough and switches from 2D plan view to 3D first.
|
|
213
|
+
* View-state only: not write-gated, not undoable.
|
|
214
|
+
*
|
|
215
|
+
* @param pose - Where to put the camera ({@linkcode PluginCameraPoseInput})
|
|
216
|
+
* @param options - `durationInSeconds`: ease over this long (0 to 10, default 0 jumps)
|
|
217
|
+
* @returns The camera's {@linkcode PluginCameraPose} once it has arrived.
|
|
218
|
+
* @throws PRECONDITION_FAILED when there is no active camera, while a
|
|
219
|
+
* walkthrough export is recording, or when `standAt` lies below the ground
|
|
220
|
+
* with nothing under it. VALIDATION when `eye` and `target` coincide or a
|
|
221
|
+
* pitch is beyond ±89°.
|
|
222
|
+
*
|
|
223
|
+
* @examplePrompt Stand in the living room at eye level facing the window
|
|
224
|
+
* @examplePrompt Move the camera to (40, 12, 30) looking at the entrance
|
|
225
|
+
* @examplePrompt Fly the camera smoothly over to the courtyard
|
|
226
|
+
* @examplePrompt Put me back at the viewpoint we saved earlier
|
|
227
|
+
*
|
|
228
|
+
* # Example
|
|
229
|
+
* ```ts
|
|
230
|
+
* const { camera } = snaptrude.core
|
|
231
|
+
* await camera.setPose({ standAt: { x: 20, y: 0, z: 35 }, yawInDegrees: 90 })
|
|
232
|
+
* await camera.setPose(
|
|
233
|
+
* { eye: { x: 60, y: 25, z: 60 }, target: { x: 0, y: 5, z: 0 } },
|
|
234
|
+
* { durationInSeconds: 1.5 },
|
|
235
|
+
* )
|
|
236
|
+
* ```
|
|
237
|
+
*/
|
|
238
|
+
abstract setPose(pose: PluginCameraPoseInput, options?: PluginCameraSetPoseOptions): PluginApiReturn<PluginCameraPose>;
|
|
239
|
+
/**
|
|
240
|
+
* Walk or fly the camera by a displacement in its own frame: `forward` along
|
|
241
|
+
* the level view direction, `right` to its side and `up` vertically, in
|
|
242
|
+
* internal `babylon` units. The view direction does not change. With
|
|
243
|
+
* `options.followsFloor` the camera keeps its height above the floor as it
|
|
244
|
+
* goes, climbing and descending stairs and ramps the way the arrow keys do.
|
|
245
|
+
* Stops a playing walkthrough and switches from 2D plan view to 3D first.
|
|
246
|
+
* View-state only: not write-gated, not undoable.
|
|
247
|
+
*
|
|
248
|
+
* @param displacement - {@linkcode PluginCameraMoveDisplacement}; omitted components are 0
|
|
249
|
+
* @param options - `followsFloor` (default `false`) and `durationInSeconds` (0 to 10, default 0)
|
|
250
|
+
* @returns The camera's {@linkcode PluginCameraPose} after the move.
|
|
251
|
+
* @throws PRECONDITION_FAILED when there is no active camera, or while a
|
|
252
|
+
* walkthrough export is recording.
|
|
253
|
+
*
|
|
254
|
+
* @examplePrompt Walk forward 3 metres
|
|
255
|
+
* @examplePrompt Step to the right a little
|
|
256
|
+
* @examplePrompt Walk up the stairs ahead
|
|
257
|
+
* @examplePrompt Raise the camera by 2 metres
|
|
258
|
+
*
|
|
259
|
+
* # Example
|
|
260
|
+
* ```ts
|
|
261
|
+
* const metre = 1 / 0.254
|
|
262
|
+
* await snaptrude.core.camera.move(
|
|
263
|
+
* { forward: 3 * metre },
|
|
264
|
+
* { followsFloor: true, durationInSeconds: 2 },
|
|
265
|
+
* )
|
|
266
|
+
* ```
|
|
267
|
+
*/
|
|
268
|
+
abstract move(displacement: PluginCameraMoveDisplacement, options?: PluginCameraMoveOptions): PluginApiReturn<PluginCameraPose>;
|
|
269
|
+
/**
|
|
270
|
+
* Turn the camera in place by signed angles: `yawInDegrees` to the right
|
|
271
|
+
* (clockwise seen from above) and `pitchInDegrees` up. The eye does not move;
|
|
272
|
+
* the resulting pitch is kept within ±89°. Stops a playing walkthrough and
|
|
273
|
+
* switches from 2D plan view to 3D first. View-state only: not write-gated,
|
|
274
|
+
* not undoable.
|
|
275
|
+
*
|
|
276
|
+
* @param yawInDegrees - Turn to the right by this much (negative turns left)
|
|
277
|
+
* @param pitchInDegrees - Tilt up by this much (negative tilts down; default 0)
|
|
278
|
+
* @param options - `durationInSeconds` (0 to 10, default 0)
|
|
279
|
+
* @returns The camera's {@linkcode PluginCameraPose} after turning.
|
|
280
|
+
* @throws PRECONDITION_FAILED when there is no active camera, or while a
|
|
281
|
+
* walkthrough export is recording.
|
|
282
|
+
*
|
|
283
|
+
* @examplePrompt Turn around
|
|
284
|
+
* @examplePrompt Look 45 degrees to the left
|
|
285
|
+
* @examplePrompt Tilt the camera down a bit
|
|
286
|
+
*
|
|
287
|
+
* # Example
|
|
288
|
+
* ```ts
|
|
289
|
+
* await snaptrude.core.camera.rotate(180, 0, { durationInSeconds: 1 })
|
|
290
|
+
* ```
|
|
291
|
+
*/
|
|
292
|
+
abstract rotate(yawInDegrees: number, pitchInDegrees?: number, options?: PluginCameraRotateOptions): PluginApiReturn<PluginCameraPose>;
|
|
293
|
+
/**
|
|
294
|
+
* Read the arrow-key navigation settings: whether the arrow keys walk the
|
|
295
|
+
* camera, the eye height used by `setPose`'s `standAt` and by walkthroughs
|
|
296
|
+
* that follow the floor, the walking speed, and whether walking stops at
|
|
297
|
+
* walls. Paired with {@linkcode PluginCameraApi.updateNavigationSettings}.
|
|
298
|
+
*
|
|
299
|
+
* @returns The current {@linkcode PluginCameraNavigationSettings}.
|
|
300
|
+
*
|
|
301
|
+
* @examplePrompt Is arrow-key navigation on?
|
|
302
|
+
* @examplePrompt What eye height does the camera use?
|
|
303
|
+
*
|
|
304
|
+
* # Example
|
|
305
|
+
* ```ts
|
|
306
|
+
* const { isKeyboardNavigationEnabled } =
|
|
307
|
+
* await snaptrude.core.camera.getNavigationSettings()
|
|
308
|
+
* ```
|
|
309
|
+
*/
|
|
310
|
+
abstract getNavigationSettings(): PluginApiReturn<PluginCameraNavigationSettings>;
|
|
311
|
+
/**
|
|
312
|
+
* Change arrow-key navigation settings; only the fields given change.
|
|
313
|
+
* `isKeyboardNavigationEnabled` is the user's Project Settings switch and is
|
|
314
|
+
* saved on this device; the other settings last for the session.
|
|
315
|
+
* Write-gated: this changes the user's preferences, not just the view.
|
|
316
|
+
*
|
|
317
|
+
* @param patch - The settings to change ({@linkcode PluginCameraNavigationSettingsPatch})
|
|
318
|
+
* @returns The {@linkcode PluginCameraNavigationSettings} after the change.
|
|
319
|
+
* @throws METHOD_NOT_PERMITTED when plugin writes are disabled.
|
|
320
|
+
*
|
|
321
|
+
* @examplePrompt Turn off arrow-key navigation
|
|
322
|
+
* @examplePrompt Use a 1.6 m eye height
|
|
323
|
+
* @examplePrompt Make walking stop at walls
|
|
324
|
+
*
|
|
325
|
+
* # Example
|
|
326
|
+
* ```ts
|
|
327
|
+
* await snaptrude.core.camera.updateNavigationSettings({
|
|
328
|
+
* eyeHeight: 1.6 / 0.254,
|
|
329
|
+
* isCollisionEnabled: true,
|
|
330
|
+
* })
|
|
331
|
+
* ```
|
|
332
|
+
*/
|
|
333
|
+
abstract updateNavigationSettings(patch: PluginCameraNavigationSettingsPatch): PluginApiReturn<PluginCameraNavigationSettings>;
|
|
171
334
|
}
|
|
172
335
|
/**
|
|
173
336
|
* A standard camera view: the five orthographic elevations (`top`/`front`/
|
|
@@ -258,4 +421,259 @@ export declare const PluginCameraSetProjectionArgs: z.ZodObject<{
|
|
|
258
421
|
}>;
|
|
259
422
|
}, z.core.$strip>;
|
|
260
423
|
export type PluginCameraSetProjectionArgs = z.infer<typeof PluginCameraSetProjectionArgs>;
|
|
424
|
+
/**
|
|
425
|
+
* The camera's pose — result of {@linkcode PluginCameraApi.getPose},
|
|
426
|
+
* {@linkcode PluginCameraApi.setPose}, {@linkcode PluginCameraApi.move} and
|
|
427
|
+
* {@linkcode PluginCameraApi.rotate}.
|
|
428
|
+
*
|
|
429
|
+
* | Property | Type | Description |
|
|
430
|
+
* |---|---|---|
|
|
431
|
+
* | `eye` | `{ x, y, z }` | Camera position (world, `babylon` units) |
|
|
432
|
+
* | `target` | `{ x, y, z }` | Point the camera looks at |
|
|
433
|
+
* | `yawInDegrees` | `number` | View direction, degrees clockwise from +z seen from above (-180 to 180) |
|
|
434
|
+
* | `pitchInDegrees` | `number` | View direction, degrees above level (negative looks down) |
|
|
435
|
+
* | `fieldOfViewInDegrees` | `number` | Vertical field of view |
|
|
436
|
+
* | `projection` | {@linkcode PluginCameraProjection} | `"perspective"` or `"orthographic"` |
|
|
437
|
+
* | `mode` | {@linkcode PluginCameraMode} | `"2d"` or `"3d"` |
|
|
438
|
+
*/
|
|
439
|
+
export declare const PluginCameraPose: z.ZodObject<{
|
|
440
|
+
eye: z.ZodObject<{
|
|
441
|
+
x: z.ZodNumber;
|
|
442
|
+
y: z.ZodNumber;
|
|
443
|
+
z: z.ZodNumber;
|
|
444
|
+
}, z.core.$strip>;
|
|
445
|
+
target: z.ZodObject<{
|
|
446
|
+
x: z.ZodNumber;
|
|
447
|
+
y: z.ZodNumber;
|
|
448
|
+
z: z.ZodNumber;
|
|
449
|
+
}, z.core.$strip>;
|
|
450
|
+
yawInDegrees: z.ZodNumber;
|
|
451
|
+
pitchInDegrees: z.ZodNumber;
|
|
452
|
+
fieldOfViewInDegrees: z.ZodNumber;
|
|
453
|
+
projection: z.ZodEnum<{
|
|
454
|
+
perspective: "perspective";
|
|
455
|
+
orthographic: "orthographic";
|
|
456
|
+
}>;
|
|
457
|
+
mode: z.ZodEnum<{
|
|
458
|
+
"2d": "2d";
|
|
459
|
+
"3d": "3d";
|
|
460
|
+
}>;
|
|
461
|
+
}, z.core.$strip>;
|
|
462
|
+
export type PluginCameraPose = z.infer<typeof PluginCameraPose>;
|
|
463
|
+
/**
|
|
464
|
+
* Where {@linkcode PluginCameraApi.setPose} puts the camera — exactly one of:
|
|
465
|
+
*
|
|
466
|
+
* | Shape | Meaning |
|
|
467
|
+
* |---|---|
|
|
468
|
+
* | `{ eye, target }` | Stand at `eye` looking at `target` |
|
|
469
|
+
* | `{ eye, yawInDegrees, pitchInDegrees }` | Stand at `eye` looking along a direction (pitch within ±89°) |
|
|
470
|
+
* | `{ standAt, yawInDegrees? }` | Stand at eye height on the floor, stair, terrain or ground at or below `standAt`, facing `yawInDegrees` (default: current yaw) |
|
|
471
|
+
*
|
|
472
|
+
* Points are plain `{ x, y, z }` world coordinates in `babylon` units.
|
|
473
|
+
*/
|
|
474
|
+
export declare const PluginCameraPoseInput: z.ZodUnion<readonly [z.ZodObject<{
|
|
475
|
+
eye: z.ZodObject<{
|
|
476
|
+
x: z.ZodNumber;
|
|
477
|
+
y: z.ZodNumber;
|
|
478
|
+
z: z.ZodNumber;
|
|
479
|
+
}, z.core.$strip>;
|
|
480
|
+
target: z.ZodObject<{
|
|
481
|
+
x: z.ZodNumber;
|
|
482
|
+
y: z.ZodNumber;
|
|
483
|
+
z: z.ZodNumber;
|
|
484
|
+
}, z.core.$strip>;
|
|
485
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
486
|
+
eye: z.ZodObject<{
|
|
487
|
+
x: z.ZodNumber;
|
|
488
|
+
y: z.ZodNumber;
|
|
489
|
+
z: z.ZodNumber;
|
|
490
|
+
}, z.core.$strip>;
|
|
491
|
+
yawInDegrees: z.ZodNumber;
|
|
492
|
+
pitchInDegrees: z.ZodNumber;
|
|
493
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
494
|
+
standAt: z.ZodObject<{
|
|
495
|
+
x: z.ZodNumber;
|
|
496
|
+
y: z.ZodNumber;
|
|
497
|
+
z: z.ZodNumber;
|
|
498
|
+
}, z.core.$strip>;
|
|
499
|
+
yawInDegrees: z.ZodOptional<z.ZodNumber>;
|
|
500
|
+
}, z.core.$strict>]>;
|
|
501
|
+
export type PluginCameraPoseInput = z.infer<typeof PluginCameraPoseInput>;
|
|
502
|
+
/**
|
|
503
|
+
* Options for {@linkcode PluginCameraApi.setPose}.
|
|
504
|
+
*
|
|
505
|
+
* | Property | Type | Description |
|
|
506
|
+
* |---|---|---|
|
|
507
|
+
* | `durationInSeconds` | `number \| undefined` | Ease to the pose over this long (0 to 10; default 0 jumps) |
|
|
508
|
+
*/
|
|
509
|
+
export declare const PluginCameraSetPoseOptions: z.ZodObject<{
|
|
510
|
+
durationInSeconds: z.ZodOptional<z.ZodNumber>;
|
|
511
|
+
}, z.core.$strict>;
|
|
512
|
+
export type PluginCameraSetPoseOptions = z.infer<typeof PluginCameraSetPoseOptions>;
|
|
513
|
+
/**
|
|
514
|
+
* Arguments for {@linkcode PluginCameraApi.setPose}.
|
|
515
|
+
*/
|
|
516
|
+
export declare const PluginCameraSetPoseArgs: z.ZodObject<{
|
|
517
|
+
pose: z.ZodUnion<readonly [z.ZodObject<{
|
|
518
|
+
eye: z.ZodObject<{
|
|
519
|
+
x: z.ZodNumber;
|
|
520
|
+
y: z.ZodNumber;
|
|
521
|
+
z: z.ZodNumber;
|
|
522
|
+
}, z.core.$strip>;
|
|
523
|
+
target: z.ZodObject<{
|
|
524
|
+
x: z.ZodNumber;
|
|
525
|
+
y: z.ZodNumber;
|
|
526
|
+
z: z.ZodNumber;
|
|
527
|
+
}, z.core.$strip>;
|
|
528
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
529
|
+
eye: z.ZodObject<{
|
|
530
|
+
x: z.ZodNumber;
|
|
531
|
+
y: z.ZodNumber;
|
|
532
|
+
z: z.ZodNumber;
|
|
533
|
+
}, z.core.$strip>;
|
|
534
|
+
yawInDegrees: z.ZodNumber;
|
|
535
|
+
pitchInDegrees: z.ZodNumber;
|
|
536
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
537
|
+
standAt: z.ZodObject<{
|
|
538
|
+
x: z.ZodNumber;
|
|
539
|
+
y: z.ZodNumber;
|
|
540
|
+
z: z.ZodNumber;
|
|
541
|
+
}, z.core.$strip>;
|
|
542
|
+
yawInDegrees: z.ZodOptional<z.ZodNumber>;
|
|
543
|
+
}, z.core.$strict>]>;
|
|
544
|
+
options: z.ZodOptional<z.ZodObject<{
|
|
545
|
+
durationInSeconds: z.ZodOptional<z.ZodNumber>;
|
|
546
|
+
}, z.core.$strict>>;
|
|
547
|
+
}, z.core.$strip>;
|
|
548
|
+
export type PluginCameraSetPoseArgs = z.infer<typeof PluginCameraSetPoseArgs>;
|
|
549
|
+
/**
|
|
550
|
+
* A displacement in the camera's own frame, for {@linkcode PluginCameraApi.move}
|
|
551
|
+
* (`babylon` units; omitted components are 0).
|
|
552
|
+
*
|
|
553
|
+
* | Property | Type | Description |
|
|
554
|
+
* |---|---|---|
|
|
555
|
+
* | `forward` | `number \| undefined` | Along the level view direction (negative walks back) |
|
|
556
|
+
* | `right` | `number \| undefined` | To the camera's right (negative steps left) |
|
|
557
|
+
* | `up` | `number \| undefined` | Vertically (negative descends) |
|
|
558
|
+
*/
|
|
559
|
+
export declare const PluginCameraMoveDisplacement: z.ZodObject<{
|
|
560
|
+
forward: z.ZodOptional<z.ZodNumber>;
|
|
561
|
+
right: z.ZodOptional<z.ZodNumber>;
|
|
562
|
+
up: z.ZodOptional<z.ZodNumber>;
|
|
563
|
+
}, z.core.$strict>;
|
|
564
|
+
export type PluginCameraMoveDisplacement = z.infer<typeof PluginCameraMoveDisplacement>;
|
|
565
|
+
/**
|
|
566
|
+
* Options for {@linkcode PluginCameraApi.move}.
|
|
567
|
+
*
|
|
568
|
+
* | Property | Type | Description |
|
|
569
|
+
* |---|---|---|
|
|
570
|
+
* | `followsFloor` | `boolean \| undefined` | Keep the height above the floor, climbing stairs and ramps (default `false`) |
|
|
571
|
+
* | `durationInSeconds` | `number \| undefined` | Walk over this long (0 to 10; default 0 jumps) |
|
|
572
|
+
*/
|
|
573
|
+
export declare const PluginCameraMoveOptions: z.ZodObject<{
|
|
574
|
+
followsFloor: z.ZodOptional<z.ZodBoolean>;
|
|
575
|
+
durationInSeconds: z.ZodOptional<z.ZodNumber>;
|
|
576
|
+
}, z.core.$strict>;
|
|
577
|
+
export type PluginCameraMoveOptions = z.infer<typeof PluginCameraMoveOptions>;
|
|
578
|
+
/**
|
|
579
|
+
* Arguments for {@linkcode PluginCameraApi.move}.
|
|
580
|
+
*/
|
|
581
|
+
export declare const PluginCameraMoveArgs: z.ZodObject<{
|
|
582
|
+
displacement: z.ZodObject<{
|
|
583
|
+
forward: z.ZodOptional<z.ZodNumber>;
|
|
584
|
+
right: z.ZodOptional<z.ZodNumber>;
|
|
585
|
+
up: z.ZodOptional<z.ZodNumber>;
|
|
586
|
+
}, z.core.$strict>;
|
|
587
|
+
options: z.ZodOptional<z.ZodObject<{
|
|
588
|
+
followsFloor: z.ZodOptional<z.ZodBoolean>;
|
|
589
|
+
durationInSeconds: z.ZodOptional<z.ZodNumber>;
|
|
590
|
+
}, z.core.$strict>>;
|
|
591
|
+
}, z.core.$strip>;
|
|
592
|
+
export type PluginCameraMoveArgs = z.infer<typeof PluginCameraMoveArgs>;
|
|
593
|
+
/**
|
|
594
|
+
* Options for {@linkcode PluginCameraApi.rotate}.
|
|
595
|
+
*
|
|
596
|
+
* | Property | Type | Description |
|
|
597
|
+
* |---|---|---|
|
|
598
|
+
* | `durationInSeconds` | `number \| undefined` | Turn over this long (0 to 10; default 0 jumps) |
|
|
599
|
+
*/
|
|
600
|
+
export declare const PluginCameraRotateOptions: z.ZodObject<{
|
|
601
|
+
durationInSeconds: z.ZodOptional<z.ZodNumber>;
|
|
602
|
+
}, z.core.$strict>;
|
|
603
|
+
export type PluginCameraRotateOptions = z.infer<typeof PluginCameraRotateOptions>;
|
|
604
|
+
/**
|
|
605
|
+
* Arguments for {@linkcode PluginCameraApi.rotate}.
|
|
606
|
+
*/
|
|
607
|
+
export declare const PluginCameraRotateArgs: z.ZodObject<{
|
|
608
|
+
yawInDegrees: z.ZodNumber;
|
|
609
|
+
pitchInDegrees: z.ZodOptional<z.ZodNumber>;
|
|
610
|
+
options: z.ZodOptional<z.ZodObject<{
|
|
611
|
+
durationInSeconds: z.ZodOptional<z.ZodNumber>;
|
|
612
|
+
}, z.core.$strict>>;
|
|
613
|
+
}, z.core.$strip>;
|
|
614
|
+
export type PluginCameraRotateArgs = z.infer<typeof PluginCameraRotateArgs>;
|
|
615
|
+
/**
|
|
616
|
+
* How fast the arrow keys walk: the Slow / Normal / Fast navigation setting.
|
|
617
|
+
*/
|
|
618
|
+
export declare const PluginCameraWalkSpeed: z.ZodEnum<{
|
|
619
|
+
normal: "normal";
|
|
620
|
+
slow: "slow";
|
|
621
|
+
fast: "fast";
|
|
622
|
+
}>;
|
|
623
|
+
export type PluginCameraWalkSpeed = z.infer<typeof PluginCameraWalkSpeed>;
|
|
624
|
+
/**
|
|
625
|
+
* The arrow-key navigation settings — result of
|
|
626
|
+
* {@linkcode PluginCameraApi.getNavigationSettings} and
|
|
627
|
+
* {@linkcode PluginCameraApi.updateNavigationSettings}.
|
|
628
|
+
*
|
|
629
|
+
* | Property | Type | Description |
|
|
630
|
+
* |---|---|---|
|
|
631
|
+
* | `isKeyboardNavigationEnabled` | `boolean` | Whether the arrow keys walk the camera (Project Settings) |
|
|
632
|
+
* | `eyeHeight` | `number` | Eye height above the floor, `babylon` units |
|
|
633
|
+
* | `walkSpeed` | {@linkcode PluginCameraWalkSpeed} | Arrow-key walking speed |
|
|
634
|
+
* | `isCollisionEnabled` | `boolean` | Whether walking stops at walls |
|
|
635
|
+
*/
|
|
636
|
+
export declare const PluginCameraNavigationSettings: z.ZodObject<{
|
|
637
|
+
isKeyboardNavigationEnabled: z.ZodBoolean;
|
|
638
|
+
eyeHeight: z.ZodNumber;
|
|
639
|
+
walkSpeed: z.ZodEnum<{
|
|
640
|
+
normal: "normal";
|
|
641
|
+
slow: "slow";
|
|
642
|
+
fast: "fast";
|
|
643
|
+
}>;
|
|
644
|
+
isCollisionEnabled: z.ZodBoolean;
|
|
645
|
+
}, z.core.$strip>;
|
|
646
|
+
export type PluginCameraNavigationSettings = z.infer<typeof PluginCameraNavigationSettings>;
|
|
647
|
+
/**
|
|
648
|
+
* The settings to change in {@linkcode PluginCameraApi.updateNavigationSettings};
|
|
649
|
+
* omitted fields keep their value. `eyeHeight` is in `babylon` units, between
|
|
650
|
+
* 0.8 m and 2.5 m (3.15 to 9.84 units).
|
|
651
|
+
*/
|
|
652
|
+
export declare const PluginCameraNavigationSettingsPatch: z.ZodObject<{
|
|
653
|
+
isKeyboardNavigationEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
654
|
+
eyeHeight: z.ZodOptional<z.ZodNumber>;
|
|
655
|
+
walkSpeed: z.ZodOptional<z.ZodEnum<{
|
|
656
|
+
normal: "normal";
|
|
657
|
+
slow: "slow";
|
|
658
|
+
fast: "fast";
|
|
659
|
+
}>>;
|
|
660
|
+
isCollisionEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
661
|
+
}, z.core.$strict>;
|
|
662
|
+
export type PluginCameraNavigationSettingsPatch = z.infer<typeof PluginCameraNavigationSettingsPatch>;
|
|
663
|
+
/**
|
|
664
|
+
* Arguments for {@linkcode PluginCameraApi.updateNavigationSettings}.
|
|
665
|
+
*/
|
|
666
|
+
export declare const PluginCameraUpdateNavigationSettingsArgs: z.ZodObject<{
|
|
667
|
+
patch: z.ZodObject<{
|
|
668
|
+
isKeyboardNavigationEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
669
|
+
eyeHeight: z.ZodOptional<z.ZodNumber>;
|
|
670
|
+
walkSpeed: z.ZodOptional<z.ZodEnum<{
|
|
671
|
+
normal: "normal";
|
|
672
|
+
slow: "slow";
|
|
673
|
+
fast: "fast";
|
|
674
|
+
}>>;
|
|
675
|
+
isCollisionEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
676
|
+
}, z.core.$strict>;
|
|
677
|
+
}, z.core.$strip>;
|
|
678
|
+
export type PluginCameraUpdateNavigationSettingsArgs = z.infer<typeof PluginCameraUpdateNavigationSettingsArgs>;
|
|
261
679
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/core/camera/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAChD,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/core/camera/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAChD,OAAO,EAAkB,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAE7D;;;;;;;;;;;;;;;GAeG;AACH,8BAAsB,eAAe;;IAGnC;;;;;;;;;;;;;;;;;;OAkBG;aACa,QAAQ,CACtB,GAAG,EAAE,UAAU,EACf,MAAM,EAAE,UAAU,GACjB,eAAe,CAAC,OAAO,CAAC;IAE3B;;;;;;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