feat(web): add object lightgroup membership
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:21:38 +08:00
parent 49b42a0f99
commit cc8f805e76
46 changed files with 1900 additions and 35 deletions

View File

@@ -828,6 +828,12 @@ function assertFutureCapability(payload: Extract<WebEngineRequest["command"], {
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 "setObjectLightgroup": {
const object = currentSnapshot?.nodes.find((candidate) => candidate.id === payload.objectId);
if (!object || typeof payload.lightgroup !== "string" && payload.lightgroup !== null) throw report("RENDER_PROPERTY_INVALID", "Object lightgroup target is invalid");
if (payload.lightgroup !== null && (payload.lightgroup.length === 0 || new TextEncoder().encode(payload.lightgroup).byteLength > 63)) throw report("RENDER_PROPERTY_INVALID", "Object lightgroup name is not bounded");
return;
}
case "setGeometryNodeGraph": {
const snapshot = currentSnapshot;
const availableResourceIds = new Set([