feat(web): add scene color management 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 16:28:25 +08:00
parent 7a84069cff
commit a5800cdde8
45 changed files with 1905 additions and 38 deletions

View File

@@ -713,6 +713,15 @@ function assertFutureCapability(payload: Extract<WebEngineRequest["command"], {
for (const field of ["particlesViewport", "particlesRender", "volumes"] as const) if (properties[field] !== undefined && !boundedNumber(properties[field], 0, 1000)) throw report("RENDER_PROPERTY_INVALID", `Scene ${field} is outside the simplify range`);
return;
}
case "setSceneColorManagement": {
const scene = currentSnapshot?.scenes.find((candidate) => candidate.id === payload.dataId);
const properties = payload.properties;
if (!scene || !validPropertyKeys(properties, ["displayDevice", "temperature", "tint"])) throw report("RENDER_PROPERTY_INVALID", "Scene color management target or properties are invalid");
if (properties.displayDevice !== undefined && (typeof properties.displayDevice !== "string" || properties.displayDevice.length === 0 || new TextEncoder().encode(properties.displayDevice).byteLength > 63)) throw report("RENDER_PROPERTY_INVALID", "Scene displayDevice is not a bounded string");
if (properties.temperature !== undefined && !boundedNumber(properties.temperature, 1000, 20000)) throw report("RENDER_PROPERTY_INVALID", "Scene temperature is outside the color-management range");
if (properties.tint !== undefined && !boundedNumber(properties.tint, -100, 100)) throw report("RENDER_PROPERTY_INVALID", "Scene tint is outside the color-management range");
return;
}
case "setGeometryNodeGraph": {
const snapshot = currentSnapshot;
const availableResourceIds = new Set([