@vgai/editor-sdk 0.5.41 → 0.5.42
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/package.json +2 -2
- package/src/client.ts +15 -0
- package/src/index.ts +2 -0
- package/src/types.ts +20 -1
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@vgai/editor-sdk",
|
|
3
3
|
"author": "Volter AI, Inc.",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
|
-
"version": "0.5.
|
|
5
|
+
"version": "0.5.42",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@types/three": "^0.180.0",
|
|
27
|
-
"@vgai/sdk": "0.5.
|
|
27
|
+
"@vgai/sdk": "0.5.42"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
30
|
"@vgai/engine": "*",
|
package/src/client.ts
CHANGED
|
@@ -16,6 +16,7 @@ import type {
|
|
|
16
16
|
GameplayRecordingCapture,
|
|
17
17
|
GameplayRecordingOptions,
|
|
18
18
|
GameplayRecordingStarted,
|
|
19
|
+
GameplayRecordingTimeline,
|
|
19
20
|
HelperVisibility,
|
|
20
21
|
InspectedFieldWrite,
|
|
21
22
|
InspectedHierarchy,
|
|
@@ -457,6 +458,15 @@ export class EditorClient {
|
|
|
457
458
|
return this.command<GameplayRecordingCapture>({ type: 'bridge-recording-stop' });
|
|
458
459
|
}
|
|
459
460
|
|
|
461
|
+
/** Read the active capture's monotonic media position. This is the only clock
|
|
462
|
+
* suitable for selecting intervals inside the finalized recording. */
|
|
463
|
+
async getGameplayRecordingTimeline(): Promise<GameplayRecordingTimeline> {
|
|
464
|
+
const timeline = await this.command<GameplayRecordingTimeline>({
|
|
465
|
+
type: 'bridge-recording-timeline',
|
|
466
|
+
});
|
|
467
|
+
return { startedAt: timeline.startedAt, elapsedMs: timeline.elapsedMs };
|
|
468
|
+
}
|
|
469
|
+
|
|
460
470
|
/**
|
|
461
471
|
* Capture an isolated, deterministic four-view preview through the editor's
|
|
462
472
|
* native Asset Lab. The SDK delegates rendering to the editor; it never
|
|
@@ -672,6 +682,11 @@ export class EditorClient {
|
|
|
672
682
|
return data.hierarchy;
|
|
673
683
|
}
|
|
674
684
|
|
|
685
|
+
/** Run the Hierarchy panel's own Expand All action. */
|
|
686
|
+
async expandHierarchyAll(): Promise<void> {
|
|
687
|
+
await this.command<Record<string, never>>({ type: 'expand-hierarchy-all' });
|
|
688
|
+
}
|
|
689
|
+
|
|
675
690
|
/**
|
|
676
691
|
* Write one editable path through the active Inspector's own IO.
|
|
677
692
|
*
|
package/src/index.ts
CHANGED
|
@@ -58,6 +58,7 @@ export type {
|
|
|
58
58
|
GameplayRecordingCapture,
|
|
59
59
|
GameplayRecordingOptions,
|
|
60
60
|
GameplayRecordingStarted,
|
|
61
|
+
GameplayRecordingTimeline,
|
|
61
62
|
HelperVisibility,
|
|
62
63
|
InspectedAction,
|
|
63
64
|
InspectedField,
|
|
@@ -74,6 +75,7 @@ export type {
|
|
|
74
75
|
InspectionSurface,
|
|
75
76
|
LabeledShotSetCapture,
|
|
76
77
|
PlayStarted,
|
|
78
|
+
PlayRecordingStatus,
|
|
77
79
|
PresentedEditorView,
|
|
78
80
|
ProjectInfo,
|
|
79
81
|
ProjectTemplate,
|
package/src/types.ts
CHANGED
|
@@ -141,11 +141,30 @@ export interface GameplayRecordingCapture extends GameplayRecordingStarted {
|
|
|
141
141
|
hidden: boolean;
|
|
142
142
|
}
|
|
143
143
|
|
|
144
|
+
/** A position on the active recorder's authoritative monotonic timeline.
|
|
145
|
+
* `startedAt` identifies the recording; `elapsedMs` shares the exact origin
|
|
146
|
+
* used to calculate the finalized capture's `durationMs`. */
|
|
147
|
+
export interface GameplayRecordingTimeline {
|
|
148
|
+
startedAt: string;
|
|
149
|
+
elapsedMs: number;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/** What Play can report while its recording is still open. Geometry, layers, media cadence, and
|
|
153
|
+
* final health are deliberately absent: those facts are only authoritative after Stop finalizes
|
|
154
|
+
* the capture. */
|
|
155
|
+
export interface PlayRecordingStatus {
|
|
156
|
+
path: string;
|
|
157
|
+
startedAt: string;
|
|
158
|
+
rotates: boolean;
|
|
159
|
+
logFile: string | null;
|
|
160
|
+
idleAutoStopMs: number;
|
|
161
|
+
}
|
|
162
|
+
|
|
144
163
|
/** What `play` reports back once the run is up and recording. */
|
|
145
164
|
export interface PlayStarted {
|
|
146
165
|
/** Absent only when the recorder could not start; play is up either way and
|
|
147
166
|
* the editor console carries the reason. */
|
|
148
|
-
recording?:
|
|
167
|
+
recording?: PlayRecordingStatus;
|
|
149
168
|
}
|
|
150
169
|
|
|
151
170
|
export type AssetPreviewView = 'front' | 'right' | 'top' | 'perspective';
|