feat(web): add scene render border 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 14:07:24 +08:00
parent b6c64d01d6
commit 013aee26f8
46 changed files with 1921 additions and 39 deletions

Binary file not shown.

View File

@@ -692,6 +692,19 @@ function assertFutureCapability(payload: Extract<WebEngineRequest["command"], {
for (const field of ["exclude", "holdout", "indirectOnly", "hide"] as const) if (properties[field] !== undefined && typeof properties[field] !== "boolean") throw report("RENDER_PROPERTY_INVALID", `Scene collection ${field} must be boolean`);
return;
}
case "setSceneBorderSettings": {
const scene = currentSnapshot?.scenes.find((candidate) => candidate.id === payload.dataId);
const properties = payload.properties;
if (!scene || !validPropertyKeys(properties, ["enabled", "minX", "maxX", "minY", "maxY"])) throw report("RENDER_PROPERTY_INVALID", "Scene border target or properties are invalid");
if (properties.enabled !== undefined && typeof properties.enabled !== "boolean") throw report("RENDER_PROPERTY_INVALID", "Scene border enabled must be boolean");
for (const field of ["minX", "maxX", "minY", "maxY"] as const) if (properties[field] !== undefined && !boundedNumber(properties[field], 0, 1)) throw report("RENDER_PROPERTY_INVALID", `Scene border ${field} must be between zero and one`);
const minX = properties.minX ?? scene.borderSettings?.minX ?? 0;
const maxX = properties.maxX ?? scene.borderSettings?.maxX ?? 1;
const minY = properties.minY ?? scene.borderSettings?.minY ?? 0;
const maxY = properties.maxY ?? scene.borderSettings?.maxY ?? 1;
if (maxX <= minX || maxY <= minY) throw report("RENDER_PROPERTY_INVALID", "Scene border max values must exceed min values");
return;
}
case "setGeometryNodeGraph": {
const snapshot = currentSnapshot;
const availableResourceIds = new Set([