-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsky.d.ts
More file actions
35 lines (27 loc) · 1.46 KB
/
Copy pathsky.d.ts
File metadata and controls
35 lines (27 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// Type definitions for whitepoint/sky — Hosek–Wilkie spectral sky dome.
import type { Spectrum } from './spectral.d.ts';
/** Band wavelengths of the model, nm (320–720 at 40 nm). */
export const SKY_WL: number[];
export interface SkyState {
elevation: number;
turbidity: number;
albedo: number;
configs: number[][];
radiances: number[];
}
/**
* Precompute a sky state. elevation: solar elevation above horizon in
* radians (0–π/2); turbidity 1–10; ground albedo 0–1.
*/
export function skyModel(opts: { elevation: number; turbidity?: number; albedo?: number }): SkyState;
/**
* Spectral sky radiance, W·m⁻²·sr⁻¹·nm⁻¹. theta: view zenith angle;
* gamma: angular distance from the sun; wavelength in nm (320–720).
*/
export function skyRadiance(state: SkyState, theta: number, gamma: number, wavelength: number): number;
/** Direct solar-disc radiance (limb-darkened, zero off-disc). Reference total = this + skyRadiance. */
export function sunRadiance(state: SkyState, theta: number, gamma: number, wavelength: number): number;
/** The direct sun's SPD (disc only); gamma 0 = disc center. */
export function sunSPD(state: SkyState, theta: number, gamma?: number, opts?: { start?: number; step?: number; end?: number }): Spectrum;
/** The sky's SPD for a view direction, ready for spectrumXy()/cctOf(). */
export function skySPD(state: SkyState, theta: number, gamma: number, opts?: { start?: number; step?: number; end?: number }): Spectrum;