feat(web): bind scene camera and world settings
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 13:35:53 +08:00
parent 62b45c9592
commit 27b1f77ffb
44 changed files with 1929 additions and 33 deletions

View File

@@ -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([