Add Chromium-only Blender WebEngine parity work
This commit is contained in:
33
web/protocol/engine.ts
Normal file
33
web/protocol/engine.ts
Normal file
@@ -0,0 +1,33 @@
|
||||
import type { ErrorReport } from "./error";
|
||||
import type { ProgressEvent } from "./progress";
|
||||
import type { SceneSnapshotIR } from "./scene-ir";
|
||||
|
||||
export type EngineCommand =
|
||||
| { type: "init"; protocolVersion: number }
|
||||
| { type: "getSceneSnapshot"; sinceRevision?: number }
|
||||
| { type: "setFrame"; frame: number }
|
||||
| { type: "setObjectVisibility"; objectId: string; visible: boolean }
|
||||
| { type: "shutdown" };
|
||||
|
||||
export interface EngineRequest {
|
||||
requestId: string;
|
||||
expectedRevision: number;
|
||||
command: EngineCommand;
|
||||
}
|
||||
|
||||
export interface EngineCapabilities {
|
||||
engine: "mock" | "blender-wasm";
|
||||
protocolVersion: number;
|
||||
supportsBlend: boolean;
|
||||
supportsMeshEdit: boolean;
|
||||
}
|
||||
|
||||
export interface EngineResponse {
|
||||
requestId: string;
|
||||
ok: boolean;
|
||||
revision: number;
|
||||
capabilities?: EngineCapabilities;
|
||||
snapshot?: SceneSnapshotIR;
|
||||
progress?: ProgressEvent;
|
||||
reports?: ErrorReport[];
|
||||
}
|
||||
Reference in New Issue
Block a user