feat(web): switch to implementation-first capability wave
Some checks failed
M6 deployable RC / quick (push) Has been cancelled
M6 deployable RC / chromium (push) Has been cancelled
M6 deployable RC / release (push) Has been cancelled

This commit is contained in:
mes123456
2026-08-29 01:22:03 +08:00
parent 5fb12cd6a5
commit 7549b9a15c
159 changed files with 14110 additions and 74 deletions

View File

@@ -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