VoxelWorld:palette
methodVoxelWorld:palette(index: integer, opts: voxel.PaletteOptions)Define a palette material shared by every chunk: updates the world palette and every loaded chunk; chunks loading later inherit it.
-- Every chunk shares it: those loaded and those still to come.
world:palette(1, { color = datumhue.color("#a7c080") })
world:palette(2, { color = datumhue.color("#dbbc7f"), light = 15 })opts voxel.PaletteOptions options 7 keys
| Key | Type | Default | Description |
|---|---|---|---|
| color | Color | datumhue.color(1, 1, 1) | Base color; tints the tile when textured. |
| emissive | Color | the entry renders lit | Emissive color: entries with one render unlit at this color (channel values above 1 feed bloom). |
| transparent | boolean | false | Transparent entries render alpha-blended and don't occlude neighboring faces. |
| light | integer | 0 | Block-light emission level 0..15: cells of this entry glow and light their surroundings, falling off one level per cell. |
| texture | integer | voxel.TextureFaces | the faces show frames, or the color alone | Atlas tile for every face, or a tile per face. Needs an atlas bound via voxel:atlas. At most one of texture / frames. |
| frames | integer[] | the faces show texture, or the color alone | Animated tile sequence shown on every face, advancing at fps. |
| fps | number | the tiles advance 4 times per second | Animation frames per second for frames. |