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