EventDispatcherObject3DMesh

Sky

Represents a skydome for scene backgrounds. Based on A Practical Analytic Model for Daylight aka The Preetham Model, the de facto standard for analytical skydomes.

Note that this class can only be used with WebGLRenderer. When using WebGPURenderer, use SkyMesh.

More references:

It can be useful to hide the sun disc when generating an environment map to avoid artifacts

// disable before rendering environment map
sky.material.uniforms.showSunDisc.value = false;
// ...
// re-enable before scene sky box rendering
sky.material.uniforms.showSunDisc.value = true;

Code Example

const sky = new Sky();
sky.scale.setScalar( 10000 );
scene.add( sky );

Import

Sky is an addon, and must be imported explicitly, see Installation#Addons.

import { Sky } from 'three/addons/objects/Sky.js';

Constructor

new Sky()

Constructs a new skydome.

Properties

.isSky : boolean (readonly)

This flag can be used for type testing.

Default is true.

Source

examples/jsm/objects/Sky.js