feat(web): wire Blender world lighting controls
This commit is contained in:
@@ -281,6 +281,13 @@ export interface WorldIR {
|
||||
environmentImageId?: string | null;
|
||||
environmentStrength?: number;
|
||||
environmentRotation?: number;
|
||||
ambientOcclusionDistance?: number;
|
||||
ambientOcclusionEnergy?: number;
|
||||
sunThreshold?: number;
|
||||
sunAngle?: number;
|
||||
sunShadowMaximumResolution?: number;
|
||||
sunShadowJitterOverblur?: number;
|
||||
sunShadowFilterRadius?: number;
|
||||
backgroundVisible?: boolean;
|
||||
lightgroup?: string | null;
|
||||
mist?: {
|
||||
@@ -1571,6 +1578,7 @@ 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}`);
|
||||
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