feat(web): add scene multiview 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 20:17:50 +08:00
parent 217ab7cfe9
commit acf4d3d3d0
46 changed files with 1939 additions and 36 deletions

View File

@@ -776,6 +776,17 @@ function assertFutureCapability(payload: Extract<WebEngineRequest["command"], {
if (properties.dither !== undefined && !boundedNumber(properties.dither, 0, 100)) throw report("RENDER_PROPERTY_INVALID", "Scene sampling dither is outside the bounded range");
return;
}
case "setSceneMultiviewSettings": {
const scene = currentSnapshot?.scenes.find((candidate) => candidate.id === payload.dataId);
const properties = payload.properties;
if (!scene || !validPropertyKeys(properties, ["enabled", "viewsFormat", "imageViewsFormat", "stereoDisplayMode", "interlaceSwap", "sideBySideCrossed", "squeezedFrame"])) throw report("RENDER_PROPERTY_INVALID", "Scene multiview target or properties are invalid");
if (properties.enabled !== undefined && typeof properties.enabled !== "boolean") throw report("RENDER_PROPERTY_INVALID", "Scene multiview enabled must be boolean");
if (properties.viewsFormat !== undefined && ![0, 1].includes(properties.viewsFormat)) throw report("RENDER_PROPERTY_INVALID", "Scene viewsFormat is unsupported");
if (properties.imageViewsFormat !== undefined && ![0, 1, 2].includes(properties.imageViewsFormat)) throw report("RENDER_PROPERTY_INVALID", "Scene imageViewsFormat is unsupported");
if (properties.stereoDisplayMode !== undefined && ![0, 1, 2, 3, 4].includes(properties.stereoDisplayMode)) throw report("RENDER_PROPERTY_INVALID", "Scene stereoDisplayMode is unsupported");
for (const field of ["interlaceSwap", "sideBySideCrossed", "squeezedFrame"] as const) if (properties[field] !== undefined && typeof properties[field] !== "boolean") throw report("RENDER_PROPERTY_INVALID", `Scene ${field} must be boolean`);
return;
}
case "setGeometryNodeGraph": {
const snapshot = currentSnapshot;
const availableResourceIds = new Set([