SkyBoxProps Interface

JSON representation of a SkyBox that can be drawn as the background of a ViewState3d. An object of this type can describe one of several types of sky box:

  • A cube with a texture image mapped to each face; or
  • A sphere with a single texture image mapped to its surface; or
  • A sphere with a two- or four-color vertical Gradient mapped to its surface.

Whether cuboid or spherical, the skybox is drawn as if the viewer and the contents of the view are contained within its interior.

For a two-color gradient, the gradient transitions smoothly from the nadir color at the bottom of the sphere to the zenith color at the top of the sphere. The sky and ground colors are unused, as are the sky and ground exponents.

For a four-color gradient, a "horizon" is produced on the equator of the sphere, where the ground color and sky color meet. The lower half of the sphere transitions smoothly from the ground color at the equator to the nadir color at the bottom, and the upper half transitions from the sky color at the equator to the zenith color at the top of the sphere.

The color and exponent properties are unused if one or more texture images are supplied.

The skybox is ignored entirely when an atmosphere is displayed.

@see environment to define the skybox for a display style.

Properties

Name Type Description
display boolean | undefined Whether or not the skybox should be displayed.  
groundColor number | undefined The color of the ground at the horizon.  
groundExponent number | undefined For a 4-color SkyGradient, controls speed of change from ground color to nadir color; otherwise unused.  
image SkyBoxImageProps | undefined The image(s), if any, to be mapped to the surfaces of the sphere or cube.  
nadirColor number | undefined The color of the bottom of the sphere.  
skyColor number | undefined The color of the sky at the horizon.  
skyExponent number | undefined For a 4-color SkyGradient, controls speed of change from sky color to zenith color; otherwise unused.  
twoColor boolean | undefined For a SkyGradient, if true, a 2-color gradient skybox is used instead of a 4-color.  
zenithColor number | undefined The color of the top of the sphere.  

Defined in

Last Updated: 13 November, 2024