feat(web): wire Blender world probe controls
This commit is contained in:
@@ -288,6 +288,9 @@ export interface WorldIR {
|
||||
sunShadowMaximumResolution?: number;
|
||||
sunShadowJitterOverblur?: number;
|
||||
sunShadowFilterRadius?: number;
|
||||
probeResolution?: number;
|
||||
useSunShadow?: boolean;
|
||||
useSunShadowJitter?: boolean;
|
||||
backgroundVisible?: boolean;
|
||||
lightgroup?: string | null;
|
||||
mist?: {
|
||||
@@ -1578,7 +1581,8 @@ export function parseSceneSnapshotIR(value: unknown): SceneSnapshotIR {
|
||||
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`);
|
||||
for (const field of ["ambientOcclusionDistance", "ambientOcclusionEnergy", "sunThreshold", "sunAngle", "sunShadowMaximumResolution", "sunShadowJitterOverblur", "sunShadowFilterRadius"] as const) if (world[field] !== undefined) requireNumber(world[field], `worlds[${index}].${field}`);
|
||||
for (const field of ["ambientOcclusionDistance", "ambientOcclusionEnergy", "sunThreshold", "sunAngle", "sunShadowMaximumResolution", "sunShadowJitterOverblur", "sunShadowFilterRadius", "probeResolution"] as const) if (world[field] !== undefined) requireNumber(world[field], `worlds[${index}].${field}`);
|
||||
for (const field of ["useSunShadow", "useSunShadowJitter"] as const) if (world[field] !== undefined) requireBoolean(world[field], `worlds[${index}].${field}`);
|
||||
if (world.backgroundVisible !== undefined && typeof world.backgroundVisible !== "boolean") throw new Error(`SceneIR.worlds[${index}].backgroundVisible must be a boolean`);
|
||||
if (world.mist !== undefined) {
|
||||
if (!isRecord(world.mist) || !["QUADRATIC", "LINEAR", "INVERSE_QUADRATIC"].includes(world.mist.type as string)) throw new Error(`SceneIR.worlds[${index}].mist is invalid`);
|
||||
|
||||
Reference in New Issue
Block a user