feat(web): add view layer lightgroup 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-30 07:08:55 +08:00
parent 0a0f36a358
commit 49b42a0f99
46 changed files with 1907 additions and 38 deletions

View File

@@ -821,6 +821,13 @@ function assertFutureCapability(payload: Extract<WebEngineRequest["command"], {
}
return;
}
case "setSceneViewLayerLightgroups": {
const scene = currentSnapshot?.scenes.find((candidate) => candidate.id === payload.dataId);
if (!scene || typeof payload.layerName !== "string" || payload.layerName.length === 0 || !Array.isArray(payload.lightgroups) || payload.lightgroups.length > 128) throw report("RENDER_PROPERTY_INVALID", "Scene ViewLayer lightgroup target is invalid");
const names = new Set<string>();
for (const name of payload.lightgroups) { if (typeof name !== "string" || name.length === 0 || new TextEncoder().encode(name).byteLength > 63 || names.has(name)) throw report("RENDER_PROPERTY_INVALID", "Scene lightgroup names must be unique and bounded"); names.add(name); }
return;
}
case "setGeometryNodeGraph": {
const snapshot = currentSnapshot;
const availableResourceIds = new Set([