ws-voxel: docs/guide/voxel.md (NBT / SNBT, schematics, regions, Qubicle; tested snippets) + inputs generator; bench lines for NBT, SNBT, packed arrays, schem, qb

This commit is contained in:
4DBug committed 2026-10-31 14:56:33 -05:00
1 parent f86e12f051
commit 2be536bd98
6 files changed
+315 -1

No files matched your search

+5
View File
@@ -329,6 +329,8 @@ node that shows a model has `node.voxels` (an index into `scene.voxels`) and no
| `data` | `buffer` | one byte per cell, `0` = empty, `1..255` = palette index; cell `(x, y, z)` (0-based) at byte `x + sx * (y + sy * z)` |
| `palette` | `{ { r, g, b, a } }` | 255 entries, 0..255 **sRGB**, `palette[i]` for index `i`, shared by a file's models |
| `materials` | `{ [index]: { type, ... } }?` | MATL: `"diffuse"`, `"metal"`, `"glass"`, `"emit"`, ... with their properties |
| `blocks` | `{ palette, data, blockEntities?, entities? }?` | Minecraft grids: the exact block state of every cell ([voxel.md](voxel.md)) |
| `colors` | `buffer?` | true-colour grids (Qubicle): r, g, b, a bytes per cell |
```luau
local V = F.Types.Voxels
@@ -392,6 +394,9 @@ assert(F.load(vox).voxels[1].size[1] == 4)
| 3MF | yes | yes | |
| USDA (+ USDZ read) | yes | yes | |
| VOX | yes | yes | voxel grids, scene graph, materials |
| Minecraft `.schem` / `.schematic` / `.litematic` | yes | yes | block grids, see [voxel.md](voxel.md) |
| Minecraft region `.mca` | yes | | block grids of chosen chunks, see [voxel.md](voxel.md) |
| Qubicle `.qb` | yes | yes | true-colour grids, see [voxel.md](voxel.md) |
| STEP | via the CAD plug-in | | see [cad.md](cad.md) |
Capabilities per format: [FORMATS.md](../FORMATS.md).