feat(web): add render performance authoring
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 19:43:51 +08:00
parent 085632b3a9
commit ec23b29db1
47 changed files with 1918 additions and 38 deletions

View File

@@ -759,6 +759,14 @@ function assertFutureCapability(payload: Extract<WebEngineRequest["command"], {
for (const field of ["denoiseDevice", "previewQuality", "finalQuality"] as const) if (properties[field] !== undefined && ![0, 1, 2].includes(properties[field])) throw report("RENDER_PROPERTY_INVALID", `Scene compositor ${field} is unsupported`);
return;
}
case "setScenePerformanceSettings": {
const scene = currentSnapshot?.scenes.find((candidate) => candidate.id === payload.dataId);
const properties = payload.properties;
if (!scene || !validPropertyKeys(properties, ["fixedThreads", "threads", "persistentData", "highQualityNormals"])) throw report("RENDER_PROPERTY_INVALID", "Scene performance target or properties are invalid");
for (const field of ["fixedThreads", "persistentData", "highQualityNormals"] as const) if (properties[field] !== undefined && typeof properties[field] !== "boolean") throw report("RENDER_PROPERTY_INVALID", `Scene performance ${field} must be boolean`);
if (properties.threads !== undefined && (!Number.isSafeInteger(properties.threads) || properties.threads < 1 || properties.threads > 1024)) throw report("RENDER_PROPERTY_INVALID", "Scene performance threads are outside the bounded range");
return;
}
case "setGeometryNodeGraph": {
const snapshot = currentSnapshot;
const availableResourceIds = new Set([