Skip to content

feat(uv): add world-scale box projection - #131

Open
athrvd77 wants to merge 1 commit into
wrong-nebula:mainfrom
athrvd77:feat/box-uv
Open

athrvd77 wants to merge 1 commit into
wrong-nebula:mainfrom
athrvd77:feat/box-uv

Conversation

@athrvd77

@athrvd77 athrvd77 commented Dec 4, 2026

Copy link
Copy Markdown

Why

Tiling materials need a consistent repeat size across faces of different dimensions. box_uv(scale=0.25) gives one repeat every four model units.

Closes #67.

What changed

  • Project face corners onto the dominant axis plane and use Z for the vertical coordinate on walls.
  • Document box_uv in the language reference, UV topic, and grammar.

Scope

The operator uses model coordinates at the point where it runs. The scale defaults to one repeat per model unit.

Blast Radius

box_uv writes the existing per-corner UV field. The GLB exporter already reads that field for each material group, and the operation preserves mesh topology and material assignments.

Verification

  • The regression test covers all three projection planes, the default and explicit scale, and invalid scales.
  • The native Rust CI test command passed locally.
  • Strict scene export produced two watertight parts. Decoded GLB data matched all 48 expected UV pairs across both nodes and both wall material slots.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature request: world-scale box/triplanar UV projection for tiling PBR materials

1 participant