world bounds: tessellate islands, build to the street centerline - #434
Closed
bnolan wants to merge 2 commits into
Closed
world bounds: tessellate islands, build to the street centerline#434bnolan wants to merge 2 commits into
bnolan wants to merge 2 commits into
Conversation
Each parcel gets a world_x1..world_z2 AABB grown out to meet its neighbours (greedy 1m round-robin growth, zero overlaps on the full production dump) plus 10m of underground for ground parcels. On-chain x1..z2 stay as the owned interior. - scripts/world-bounds.mjs computes and applies the world bounds - scripts/resize-parcel-fields.mjs repads voxel fields and shifts feature anchors so nothing moves in world space - engine payloads (cached.json, Parcel.load) serve world bounds as x1..z2, so field shape, meshing and build checks follow for free - featureBounds is now exactly the parcel box; the streetWidth 4 / overHeight 8 / underHeight 1 fudge is gone - server parcelCenter anchors to bounds, not the geometry polygon Deploy order: migrate, world-bounds --apply, resize --apply, deploy. Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
each parcel gets a bigger buildable AABB (`world_x1..world_z2`) that tessellates the island: faces grow 1m at a time, round-robin, until they meet the neighbour across the street. facing parcels split the road at the centerline. ground parcels also get 10m of underground. on-chain `x1..z2` stay as the owned interior.
verified on the full production dump (8,398 parcels, 40 islands): zero overlaps, 100% street coverage, runs in 0.6s. architect island is skipped.
how
deploy order
migrate -> `world-bounds.mjs --apply` -> `resize-parcel-fields.mjs --apply` -> deploy. serving world bounds against un-resized content decodes fields with the wrong shape.
known debts (flagged as todos in the script): pre-resize property_versions restores look scrambled until re-saved; lightmaps want a rebake since mesh-local coords shifted.
parcel 4580 running off world bounds: voxels and features unmoved, info panel already reports the 16m-wide buildable box with basement.
Made with Cursor