From 4a2ab30cb4ce1582d51c94a9fce15e7a98cddc7e Mon Sep 17 00:00:00 2001 From: Nathan Bierema Date: Fri, 31 May 2024 09:11:24 -0400 Subject: [PATCH] Add Sky docs --- types/three/examples/jsm/objects/Sky.d.ts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/types/three/examples/jsm/objects/Sky.d.ts b/types/three/examples/jsm/objects/Sky.d.ts index 523eda084..d4ae62a1d 100644 --- a/types/three/examples/jsm/objects/Sky.d.ts +++ b/types/three/examples/jsm/objects/Sky.d.ts @@ -1,6 +1,24 @@ import { BoxGeometry, Mesh, ShaderMaterial } from "three"; +/** + * {@link Sky} creates a ready to go sky environment for your scenes. + * + * @example + * const sky = new Sky(); + * sky.scale.setScalar( 450000 ); + * + * const phi = MathUtils.degToRad( 90 ); + * const theta = MathUtils.degToRad( 180 ); + * const sunPosition = new Vector3().setFromSphericalCoords( 1, phi, theta ); + * + * sky.material.uniforms.sunPosition.value = sunPosition; + * + * scene.add( sky ); + */ export class Sky extends Mesh { + /** + * Create a new {@link Sky} instance. + */ constructor(); geometry: BoxGeometry;