test(web): add one-pass feature smoke plan and record blockers
This commit is contained in:
@@ -245,6 +245,21 @@ export class WebEngineClient {
|
||||
return { status: result.status, snapshot: result.snapshot, geometryBuffers: [...this.geometryBuffers], nonMeshGeometryBuffers: [...this.nonMeshGeometryBuffers] };
|
||||
}
|
||||
|
||||
async importScene(format: string, fileName: string, mimeType: string, base64: string): Promise<BlendOpenResult & { delta: SceneDelta; importResult?: unknown }> {
|
||||
const result = await this.request({ type: "jsonCommand", cmd: "importScene", params: { format, fileName, mimeType, base64 } });
|
||||
if (!result.snapshot || !result.delta) throw this.report("INVALID_ARGUMENT", "IO 导入未返回场景结果", true);
|
||||
this.geometryBuffers = result.geometryBuffers ?? this.geometryBuffers;
|
||||
this.nonMeshGeometryBuffers = result.nonMeshGeometryBuffers ?? this.nonMeshGeometryBuffers;
|
||||
return {
|
||||
status: result.status,
|
||||
snapshot: result.snapshot,
|
||||
geometryBuffers: [...this.geometryBuffers],
|
||||
nonMeshGeometryBuffers: [...this.nonMeshGeometryBuffers],
|
||||
delta: result.delta,
|
||||
importResult: result.json,
|
||||
};
|
||||
}
|
||||
|
||||
async snapshot(): Promise<BlendOpenResult> {
|
||||
const result = await this.request({ type: "snapshot" });
|
||||
if (!result.snapshot) throw this.report("INVALID_ARGUMENT", "WebEngine 未返回 SceneIR", true);
|
||||
|
||||
Reference in New Issue
Block a user