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