Skip to content

refactor: encapsulate MeshOutput buffers#4

Merged
LachyFS merged 1 commit into
mainfrom
refactor/mesh-output-encapsulation
Apr 1, 2026
Merged

refactor: encapsulate MeshOutput buffers#4
LachyFS merged 1 commit into
mainfrom
refactor/mesh-output-encapsulation

Conversation

@LachyFS

@LachyFS LachyFS commented Apr 1, 2026

Copy link
Copy Markdown
Owner

Summary

  • Make MeshOutput buffer fields pub(crate) instead of pub to prevent external invariant violations
  • Add public slice accessors (positions(), normals(), ao(), block_ids(), uvs(), indices())
  • Update WASM crate to use accessors

Test plan

  • cargo test (72/72 pass)
  • cargo check on urath-wasm
  • cargo clippy --all-targets -- -D warnings
  • cargo fmt --all -- --check

Make buffer fields pub(crate) instead of pub to prevent external
crates from breaking vertex_count invariants. Add public slice
accessor methods and update WASM crate to use them.
@LachyFS LachyFS merged commit aa00b0b into main Apr 1, 2026
1 check passed
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.

1 participant