feat(web): add render sampling 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:52:02 +08:00
parent ec23b29db1
commit 217ab7cfe9
47 changed files with 1908 additions and 38 deletions

View File

@@ -767,6 +767,15 @@ function assertFutureCapability(payload: Extract<WebEngineRequest["command"], {
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 "setSceneSamplingSettings": {
const scene = currentSnapshot?.scenes.find((candidate) => candidate.id === payload.dataId);
const properties = payload.properties;
if (!scene || !validPropertyKeys(properties, ["pixelAspectX", "pixelAspectY", "filterSize", "dither"])) throw report("RENDER_PROPERTY_INVALID", "Scene sampling target or properties are invalid");
for (const field of ["pixelAspectX", "pixelAspectY"] as const) if (properties[field] !== undefined && !boundedNumber(properties[field], 0.001, 1000)) throw report("RENDER_PROPERTY_INVALID", `Scene sampling ${field} is outside the bounded range`);
if (properties.filterSize !== undefined && !boundedNumber(properties.filterSize, 0, 100)) throw report("RENDER_PROPERTY_INVALID", "Scene sampling filterSize is outside the bounded range");
if (properties.dither !== undefined && !boundedNumber(properties.dither, 0, 100)) throw report("RENDER_PROPERTY_INVALID", "Scene sampling dither is outside the bounded range");
return;
}
case "setGeometryNodeGraph": {
const snapshot = currentSnapshot;
const availableResourceIds = new Set([