Skip to content

@relu-interactives/spatial-ecs


@relu-interactives/spatial-ecs / components / EnvironmentSkyboxState

Type Alias: EnvironmentSkyboxState ​

ts
type EnvironmentSkyboxState = {
  type: EnvironmentSkyboxType;
  color: string;
  imageUrl?: string;
  imageProjection?: EnvironmentSkyboxImageProjection;
  gradient: {
     colors: string[];
     effect: EnvironmentGradientEffect;
  };
};

Defined in: components/Environment.ts:27

Skybox configuration. Only the fields relevant to type are read at render time.

Properties ​

PropertyTypeDescriptionDefined in
typeEnvironmentSkyboxTypeActive skybox mode.components/Environment.ts:29
colorstringSolid color used when type is "color". #rrggbb.components/Environment.ts:31
imageUrl?stringURL or localasset:// path of the image used when type is "image".components/Environment.ts:33
imageProjection?EnvironmentSkyboxImageProjectionProjection for an "image" skybox. Absent means "screen" (a flat backdrop, the original behaviour). Set "equirect" for a 360° panorama.components/Environment.ts:38
gradient{ colors: string[]; effect: EnvironmentGradientEffect; }Gradient parameters used when type is "gradient".components/Environment.ts:40
gradient.colorsstring[]Ordered list of color stops as #rrggbb strings.components/Environment.ts:42
gradient.effectEnvironmentGradientEffectGradient distribution.components/Environment.ts:44