Skip to main content

Interface: SkyGradient

Defined in: environment.ts:48

A vertical gradient sky. top sits at the zenith and bottom at the nadir; horizon is where they meet, as a fraction of the way up the sphere.

equator is the colour AT the horizon, and it is optional because two of the three hosts do not need it: three.js builds a ramp from any two colours, and a two-stop gradient is what most skies are. IWSDK's DomeGradient is a three-stop sky/equator/ground triple, though, so when this is omitted the IWSDK adapter has to invent the middle colour by sampling the ramp - which is a guess that looks fine until an app deliberately puts a bright band at the horizon and only one of the two engines shows it. Passing it explicitly is how an app makes both engines agree.

Properties

PropertyModifierTypeDescriptionDefined in
bottomreadonlyRgb-environment.ts:51
equator?readonlyRgbThe colour at the horizon. Derived from the ramp when omitted.environment.ts:53
exponent?readonlynumberSharpens (>1) or softens (<1) the blend. Default 1, a linear ramp.environment.ts:57
horizon?readonlynumber0 (nadir) .. 1 (zenith). Default 0.5.environment.ts:55
intensity?readonlynumberBrightness multiplier. Default 1.environment.ts:59
kindreadonly"gradient"-environment.ts:49
topreadonlyRgb-environment.ts:50