Skip to content

Documentation / @ripl/3d / LIGHT_TYPE_CODE

Variable: LIGHT_TYPE_CODE ​

const LIGHT_TYPE_CODE: object

Defined in: 3d/src/core/uniforms.ts:28

Numeric discriminators for each light type, shared by the packer and the shader.

Type Declaration ​

ambient ​

readonly ambient: 0 = 0

Uniform light with no direction.

directional ​

readonly directional: 2 = 2

Parallel light with a direction but no position.

hemisphere ​

readonly hemisphere: 1 = 1

Two-colour sky/ground gradient light.

point ​

readonly point: 3 = 3

Positional light radiating in every direction.

spot ​

readonly spot: 4 = 4

Positional light confined to a cone.