How To

Mirror Engine API / Lightmapper
Class: Lightmapper
The lightmapper is used to bake scene lights into textures.
Methods
bake()
bake(nodes: null | Entity[], mode?: number): void
Generates and applies the lightmaps.
Parameters
nodes
An array of entities (with model or render components) to render lightmaps for. If not supplied, the entire scene will be baked.
null
| Entity
[]
mode?
number
= BAKE_COLORDIR
Baking mode. Can be:
- BAKE_COLOR: single color lightmap
- BAKE_COLORDIR: single color lightmap + dominant light direction (used for bump/specular)
Only lights with bakeDir=true will be used for generating the dominant light direction. Defaults to BAKE_COLORDIR.
Returns
void