feat(web): bind scene camera and world settings
This commit is contained in:
@@ -665,6 +665,16 @@ function assertFutureCapability(payload: Extract<WebEngineRequest["command"], {
|
||||
for (const field of ["useCompositor", "useSequencer", "noOverwrite", "saveOutput", "alphaPremultiplied"] as const) if (properties[field] !== undefined && typeof properties[field] !== "boolean") throw report("RENDER_PROPERTY_INVALID", `Scene ${field} must be boolean`);
|
||||
return;
|
||||
}
|
||||
case "setSceneBindings": {
|
||||
const scene = currentSnapshot?.scenes.find((candidate) => candidate.id === payload.dataId);
|
||||
const properties = payload.properties;
|
||||
if (!scene || !validPropertyKeys(properties, ["cameraObjectId", "worldId"])) throw report("RENDER_PROPERTY_INVALID", "Scene binding target or properties are invalid");
|
||||
for (const field of ["cameraObjectId", "worldId"] as const) {
|
||||
const value = properties[field];
|
||||
if (value !== undefined && value !== null && (typeof value !== "string" || value.length === 0 || new TextEncoder().encode(value).byteLength > 127)) throw report("RENDER_PROPERTY_INVALID", `Scene ${field} must be a bounded object or data id`);
|
||||
}
|
||||
return;
|
||||
}
|
||||
case "setGeometryNodeGraph": {
|
||||
const snapshot = currentSnapshot;
|
||||
const availableResourceIds = new Set([
|
||||
|
||||
Reference in New Issue
Block a user