feat(web): add render performance authoring
This commit is contained in:
@@ -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([
|
||||
|
||||
Reference in New Issue
Block a user