Constructor
new Lightmapper(device, root, scene, renderer, assets)
Parameters:
- Source:
Methods
bake(nodes, mode)
Generates and applies the lightmaps.
Parameters:
Name |
Type |
Description |
nodes |
pc.Entity
|
An array of models to render lightmaps for. If not supplied, full scene will be baked. |
mode |
Number
|
Baking 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. |
- Source: