fix(simulation): Layer-1 self-describing grid dims + Moore basin trace (#960)
Two Layer-1 generation fixes surfaced by the per-layer atlas viewer: - Layer1Output now carries grid_w/grid_h (the downsampled working-grid the positions live in). The client maps overlays from these, so the scale is correct for any source heightmap resolution rather than assuming the texture size — fixes overlays projecting at half scale into a corner. - Drainage basin boundaries are traced as ordered, non-self-crossing contours via Moore-neighbour tracing instead of an angle-from-centroid sort. The sort produced star-shaped, self-crossing polygons for concave basins that rendered as straight chords across the map. Golden (cascade_layer1.json) and the cross-language atlas_response_ready fixture regenerated. 100 atlas lib tests + the new tracer test pass. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -561,6 +561,8 @@ fn generate_atlas_layer_response_fixtures() {
|
||||
sub_biome: SubBiomeVariant::CoastalLowland,
|
||||
terrain_modification_cost: 1.7,
|
||||
}],
|
||||
grid_w: 512,
|
||||
grid_h: 256,
|
||||
};
|
||||
let ready = AtlasLayerResponse {
|
||||
body_id: "GJ1c".into(),
|
||||
|
||||
+2962
-2332
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user