Sky Class

Extends Object3D
Module: Lights

Sky class if composed of a HemisphereLight, DirectionalLight and a dynamic generated Sky sphere geometry.

This object is composed by 3 internal objects - Hemisphere light - Directional Light - Mesh

Methods

initialize

()

Initialize sky object.

Called automatically by the runtime.

toJSON

(
  • meta
)
Object

Create JSON for object.

Parameters:

  • meta Object

Returns:

Object:

json

update

()

Update sky state.

Called automatically by the runtime.

updateSky

()

Update sky color and sun position.

If autoUpdate set to true is automatically called by the update method.

Properties

autoUpdate

Boolean

If set to true the sky auto updates its time.

Default: true

colorBottom

Array

Array with bottom sky colors.

colorTop

Array

Array with top sky colors.

dayTime

Number

Day time in seconds.

hemisphere

HemisphereLight

Hemisphere light used to match ambient ligth with sky color.

intensity

Number

Sun color intensity.

moonColor

Number

Moon color in hex RGB.

Default: 0x5555BB

sky

Mesh

Sky mesh with material shader to calculate dinamically sky color.

sun

DirectionalLight

Directional light to simulate sun light and cast shadows.

sunColor

Number

Sun color in hex RGB.

Default: 0xFFFFAA

sunDistance

Number

Sun distance.

time

Number

Current day time in seconds.