Capítulo 600 de 859
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 WebGPURenderer. When using WebGLRenderer, use Sky.
More references:
const sky = new SkyMesh();
sky.scale.setScalar( 10000 );
scene.add( sky );
It can be useful to hide the sun disc when generating an environment map to avoid artifacts
// disable before rendering environment map
sky.showSunDisc.value = false;
// ...
// re-enable before scene sky box rendering
sky.showSunDisc.value = true;
import { SkyMesh } from 'three/addons/objects/SkyMesh.js';
Constructor
| Signature |
|---|
new SkyMesh() |
Properties
| Property | Description |
|---|---|
.cloudCoverage : UniformNode.<float> | The cloud coverage uniform. |
.cloudDensity : UniformNode.<float> | The cloud density uniform. |
.cloudElevation : UniformNode.<float> | The cloud elevation uniform. |
.cloudScale : UniformNode.<float> | The cloud scale uniform. |
.cloudSpeed : UniformNode.<float> | The cloud speed uniform. |
.isSky : boolean (readonly) | This flag can be used for type testing. |
.isSkyMesh : boolean (readonly) | This flag can be used for type testing. |
.mieCoefficient : UniformNode.<float> | The mieCoefficient uniform. |
.mieDirectionalG : UniformNode.<float> | The mieDirectionalG uniform. |
.rayleigh : UniformNode.<float> | The rayleigh uniform. |
.showSunDisc : UniformNode.<float> | Whether to render the solar disc. |
.sunPosition : UniformNode.<vec3> | The sun position uniform. |
.turbidity : UniformNode.<float> | The turbidity uniform. |
.upUniform : UniformNode.<vec3> | The up position. |