API Reference

Class List

pc.Lightmapper

The lightmapper is used to bake scene lights into textures.

Summary

Methods

bakeGenerates and applies the lightmaps.

Details

Constructor

Lightmapper()

Methods

bake(nodes, mode)

Generates and applies the lightmaps.

Parameters

nodespc.EntityAn array of models to render lightmaps for. If not supplied, full scene will be baked.
modeNumberBaking mode. Possible values:
  • pc.BAKE_COLOR: single color lightmap
  • pc.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.