Skip to content

BakeLight

Defined in: sdk/src/lightmap/solve.ts:18

A light as a bake sees one: no shadow maps, no cap on how many.

color: readonly [number, number, number]

Defined in: sdk/src/lightmap/solve.ts:24


optional direction?: readonly [number, number, number]

Defined in: sdk/src/lightmap/solve.ts:23

Where it aims — directional and spot only.


optional falloff?: number

Defined in: sdk/src/lightmap/solve.ts:32


optional followsEnvironmentSun?: boolean

Defined in: sdk/src/lightmap/solve.ts:39

Directional only: this light is the environment’s sun. The bake takes its direction and colour from there, and the sky without it.


optional innerCos?: number

Defined in: sdk/src/lightmap/solve.ts:35

Cosines of the half angles a spot falls off between.


optional innerRadius?: number

Defined in: sdk/src/lightmap/solve.ts:31

How the light ends, as the frame lights it (distanceFalloff): held at full out to innerRadius, then ramped to radius raised to falloff (1 = linear) — or, with metre set, 1/d² in metres (metre world units to one) let go over the reach by (1 - (d/r)^4)^2. A bake that disagreed with the frame lit a lamp’s room twice over.


intensity: number

Defined in: sdk/src/lightmap/solve.ts:25


kind: "directional" | "point" | "spot"

Defined in: sdk/src/lightmap/solve.ts:19


optional metre?: number

Defined in: sdk/src/lightmap/solve.ts:33


optional outerCos?: number

Defined in: sdk/src/lightmap/solve.ts:36


optional position?: readonly [number, number, number]

Defined in: sdk/src/lightmap/solve.ts:21

Where it is — point and spot only.


optional radius?: number

Defined in: sdk/src/lightmap/solve.ts:27

Reach, in world units. Past it a point or spot light contributes nothing.