@volter/editor-live 0.5.93 → 0.5.95
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/BUNDLED_NOTICES +4 -4
- package/dist/editor.d.ts +12 -1
- package/dist/index.js +18 -0
- package/dist/index.js.map +2 -2
- package/package.json +3 -3
- package/src/editor.ts +18 -0
package/BUNDLED_NOTICES
CHANGED
|
@@ -3,9 +3,9 @@ Bundled license notices
|
|
|
3
3
|
These notices accompany code incorporated into this package. Separate npm dependencies retain their own licenses.
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
@volter/editor-project@0.5.
|
|
6
|
+
@volter/editor-project@0.5.95
|
|
7
7
|
Declared license: Apache-2.0
|
|
8
|
-
Source: the unmodified npm package @volter/editor-project@0.5.
|
|
8
|
+
Source: the unmodified npm package @volter/editor-project@0.5.95, from https://github.com/volter-ai/editor.git
|
|
9
9
|
|
|
10
10
|
--- packages/editor-project/LICENSE ---
|
|
11
11
|
|
|
@@ -213,9 +213,9 @@ Source: the unmodified npm package @volter/editor-project@0.5.93, from https://g
|
|
|
213
213
|
limitations under the License.
|
|
214
214
|
|
|
215
215
|
|
|
216
|
-
@volter/editor-sdk@0.5.
|
|
216
|
+
@volter/editor-sdk@0.5.95
|
|
217
217
|
Declared license: Apache-2.0
|
|
218
|
-
Source: the unmodified npm package @volter/editor-sdk@0.5.
|
|
218
|
+
Source: the unmodified npm package @volter/editor-sdk@0.5.95, from https://github.com/volter-ai/editor.git
|
|
219
219
|
|
|
220
220
|
--- packages/editor-sdk/LICENSE ---
|
|
221
221
|
|
package/dist/editor.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** Editor and document automation over the shared session command wire.
|
|
2
2
|
* Modeling executes in the editor tab; this client owns no model state. */
|
|
3
|
-
import type { ActiveDocumentCapture, AssetKind, AssetPreviewCapture, AssetPreviewOptions, AssetPreviewShotSetDefinition, AssetPreviewSource, CaptureDimensions, DocumentLookOutcome, EditorChromeCapture, EditorChromeCaptureOptions, EditorClient, EditorState, EditorView, EditorWorkspaceName, HistoryStep, InspectedFieldWrite, InspectedHierarchy, InspectedInspection, LabeledShotSetCapture, OpenedDocument, PresentedEditorView, ShadingMode, StructureOp, StructureOpOptions, StructureOpResult, ViewPreset, ViewportCapture } from '@volter/editor-sdk';
|
|
3
|
+
import type { ActiveDocumentCapture, AssetKind, AssetPreviewCapture, AssetPreviewOptions, AssetPreviewShotSetDefinition, AssetPreviewSource, CaptureDimensions, DocumentLookOutcome, StageFrameCostReading, EditorChromeCapture, EditorChromeCaptureOptions, EditorClient, EditorState, EditorView, EditorWorkspaceName, HistoryStep, InspectedFieldWrite, InspectedHierarchy, InspectedInspection, LabeledShotSetCapture, OpenedDocument, PresentedEditorView, ShadingMode, StructureOp, StructureOpOptions, StructureOpResult, ViewPreset, ViewportCapture } from '@volter/editor-sdk';
|
|
4
4
|
import { LiveEditorDocument } from './editor-document.js';
|
|
5
5
|
/** A panel `showPanel` can focus: the viewport tabs, the console, the build
|
|
6
6
|
* surface, or any key the editor's own static-panel registry holds
|
|
@@ -144,6 +144,17 @@ export declare class LiveEditor {
|
|
|
144
144
|
readonly seconds?: number;
|
|
145
145
|
readonly revolutions?: number;
|
|
146
146
|
}): Promise<DocumentLookOutcome>;
|
|
147
|
+
/**
|
|
148
|
+
* What a frame of the open 3D document's stage costs when nothing caps it: `frames` of the
|
|
149
|
+
* stage's own frame back to back, each waited out on the GPU (median, p95, min ms), the canvas
|
|
150
|
+
* with its device pixel ratio, what was drawn after culling against what the scene holds, and
|
|
151
|
+
* the draw mode. `stage` names another stage by its id (a split's second area,
|
|
152
|
+
* `<documentId>#area-2`).
|
|
153
|
+
*/
|
|
154
|
+
frameCost(options?: {
|
|
155
|
+
readonly frames?: number;
|
|
156
|
+
readonly stage?: string;
|
|
157
|
+
}): Promise<StageFrameCostReading>;
|
|
147
158
|
view(preset: ViewPreset): Promise<void>;
|
|
148
159
|
/**
|
|
149
160
|
* Switch the editor's NAMED WORKSPACE — `await editor.workspace('model')`.
|
package/dist/index.js
CHANGED
|
@@ -291,6 +291,10 @@ var EditorClient = class {
|
|
|
291
291
|
async orbitDocument(options) {
|
|
292
292
|
return this.command({ type: "document-orbit", ...options });
|
|
293
293
|
}
|
|
294
|
+
/** What a frame of a 3D document's stage costs, uncapped (`document-frame-cost`). */
|
|
295
|
+
async frameCostDocument(options) {
|
|
296
|
+
return this.command({ type: "document-frame-cost", ...options });
|
|
297
|
+
}
|
|
294
298
|
/** A slow full revolution around the open document's subject, at a constant rate. */
|
|
295
299
|
async turntableDocument(options) {
|
|
296
300
|
return this.command({ type: "document-turntable", ...options });
|
|
@@ -1472,6 +1476,16 @@ var LiveEditor = class {
|
|
|
1472
1476
|
async turntable(options) {
|
|
1473
1477
|
return this.#client.turntableDocument(options);
|
|
1474
1478
|
}
|
|
1479
|
+
/**
|
|
1480
|
+
* What a frame of the open 3D document's stage costs when nothing caps it: `frames` of the
|
|
1481
|
+
* stage's own frame back to back, each waited out on the GPU (median, p95, min ms), the canvas
|
|
1482
|
+
* with its device pixel ratio, what was drawn after culling against what the scene holds, and
|
|
1483
|
+
* the draw mode. `stage` names another stage by its id (a split's second area,
|
|
1484
|
+
* `<documentId>#area-2`).
|
|
1485
|
+
*/
|
|
1486
|
+
async frameCost(options) {
|
|
1487
|
+
return this.#client.frameCostDocument(options);
|
|
1488
|
+
}
|
|
1475
1489
|
async view(preset) {
|
|
1476
1490
|
await this.#client.viewPreset(preset);
|
|
1477
1491
|
}
|
|
@@ -1542,6 +1556,10 @@ var LiveEditor = class {
|
|
|
1542
1556
|
}
|
|
1543
1557
|
/** `kind` inferred from `path`'s extension when omitted (`inferAssetKind`) — pass it explicitly to override. */
|
|
1544
1558
|
async openAsset(path, kind) {
|
|
1559
|
+
if (kind === void 0 && path.toLowerCase().endsWith(".blend"))
|
|
1560
|
+
throw new Error(
|
|
1561
|
+
`${path} is a Blender Model document, not an asset: open it with editor.open("document:model:${path}").`
|
|
1562
|
+
);
|
|
1545
1563
|
await this.#client.openAsset(path, kind ?? inferAssetKind(path));
|
|
1546
1564
|
}
|
|
1547
1565
|
/**
|