SkyGradient Class

A SkyBox drawn as a sphere with a gradient mapped to its interior surface.

see SkyBox.createFromJSON

Extends

Implements

Methods

Name Description
constructor(sky?: SkyBoxProps): SkyGradient Construct a SkyGradient from its JSON representation.  
toJSON(): SkyBoxProps    

Inherited methods

Name Inherited from Description
createFromJSON(json?: SkyBoxProps): SkyBox Static SkyBox Instantiate a SkyBox from its JSON representation.

Properties

Name Type Description
groundColor ColorDef The color of the ground (for 4-color gradient is ground color at horizon), defaults to (120, 143, 125).  
groundExponent number Controls speed of gradient change from groundColor to nadirColor (4-color SkyGradient only), defaults to 4.0.  
nadirColor ColorDef For 4-color gradient is color of ground at nadir (shown when looking straight down), defaults to (40, 15, 0).  
skyColor ColorDef The color of the sky (for 4-color gradient is sky color at horizon), defaults to (143, 205, 255).  
skyExponent number Controls speed of gradient change from skyColor to zenithColor (4-color SkyGradient only), defaults to 4.0.  
twoColor boolean If true, a 2-color gradient is used (ground & sky colors only), if false a 4-color gradient is used, defaults to false.  
zenithColor ColorDef For 4-color gradient is color of sky at zenith (shown when looking straight up), defaults to (54, 117, 255).  

Inherited properties

Name Type Inherited from Description
display boolean SkyBox Whether or not the skybox should be displayed.

Defined in

Last Updated: 20 September, 2019