feat(web): switch to implementation-first capability wave
This commit is contained in:
@@ -22,6 +22,7 @@ import type { RenderCapabilityRequest } from "../../../protocol/render-capabilit
|
||||
import type { CapabilityGateResult } from "../../../protocol/capability-gates";
|
||||
import { applyMeshGeometryDelta } from "../../../protocol/mesh-geometry-delta";
|
||||
import { createWorkerFault, type WorkerFault } from "../../../protocol/worker-fault";
|
||||
import { getWebEngineCommandCapability } from "../../../protocol/web-engine-capabilities";
|
||||
import type {
|
||||
PaintStrokeSessionBeginIR,
|
||||
PaintStrokeSessionCancelIR,
|
||||
@@ -106,6 +107,9 @@ export class WebEngineClient {
|
||||
}
|
||||
|
||||
async applyCommand(payload: WebEngineEditCommand): Promise<BlendOpenResult & { delta: SceneDelta; shaderCompile?: ShaderCompileReport }> {
|
||||
if (!getWebEngineCommandCapability((payload as { type?: unknown }).type)) {
|
||||
throw this.report("INVALID_ARGUMENT", `Unsupported WebEngine command: ${String((payload as { type?: unknown }).type)}`, true);
|
||||
}
|
||||
const result = await this.request({ type: "applyCommand", payload });
|
||||
if (!result.snapshot || !result.delta) throw this.report("INVALID_ARGUMENT", "WebEngine 未返回命令结果", true);
|
||||
this.geometryBuffers = result.geometryDelta
|
||||
|
||||
Reference in New Issue
Block a user