feat(exporters): implement PNG image exporter with grid and legend rendering

- Added PngExporter struct to generate PNG images from voxel grids.
- Implemented image dimensions calculation, drawing primitives, and legend rendering.
- Integrated PNG export functionality into the CLI with a new --cell-size flag.
- Removed outdated design spec and implementation plan documents.
This commit is contained in:
2026-03-23 02:59:11 +01:00
parent 4842000c31
commit 797714d1e1
4 changed files with 88 additions and 943 deletions

View File

@@ -37,7 +37,7 @@ pub struct Metadata {
#[serde(rename_all = "PascalCase")]
pub struct Region {
pub block_state_palette: Vec<BlockState>,
pub block_states: Vec<i64>,
pub block_states: fastnbt::LongArray,
pub position: Vector3,
pub size: Vector3,
}
@@ -144,7 +144,7 @@ impl StructureExporter for LitematicaExporter {
"TextRegion".to_string(),
Region {
block_state_palette: palette_list,
block_states: packed_states,
block_states: fastnbt::LongArray::new(packed_states),
position: Vector3 { x: 0, y: 0, z: 0 },
size: dimensions,
},