feat(web): add world 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:34:08 +08:00
parent cc8f805e76
commit 63ba5b1e0c
46 changed files with 1901 additions and 36 deletions

View File

@@ -268,6 +268,7 @@ export interface WorldIR {
environmentStrength?: number;
environmentRotation?: number;
backgroundVisible?: boolean;
lightgroup?: string | null;
mist?: {
enabled: boolean;
type: "QUADRATIC" | "LINEAR" | "INVERSE_QUADRATIC";
@@ -1552,6 +1553,7 @@ export function parseSceneSnapshotIR(value: unknown): SceneSnapshotIR {
requireString(world.name, `worlds[${index}].name`);
requireTuple(world.color, 3, `worlds[${index}].color`);
requireNumber(world.exposure, `worlds[${index}].exposure`);
if (world.lightgroup !== undefined && world.lightgroup !== null) requireString(world.lightgroup, `worlds[${index}].lightgroup`);
if (world.environmentImageId !== undefined && world.environmentImageId !== null) requireString(world.environmentImageId, `worlds[${index}].environmentImageId`);
if (world.environmentStrength !== undefined) requireNumber(world.environmentStrength, `worlds[${index}].environmentStrength`);
if (world.environmentRotation !== undefined) requireNumber(world.environmentRotation, `worlds[${index}].environmentRotation`);