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