Move glTF, picking, camera controls, and conventional handles into addons. Keep camera and material mutations in SIMD-aligned shared SOA rows and synchronize material updates directly into GPU buffers. Amp-Thread-ID: https://ampcode.com/threads/T-01a01380-b478-77d0-84a0-102880a5c5ae Co-authored-by: Heaust Azure <heaust.azure@gmail.com>
1.2 KiB
1.2 KiB
Build, Lint, and Test Commands
npm run examples: Start the examples index with Vite and WASM hot reloadnpm run build: Build optimized WASM and JS indist/for developmentnpm run build-release: Build optimized WASM and JS for productioncargo check: Validate Rust sources quickly before full buildscargo fmt: Format Rust code with rustfmt- No unit tests currently exist; add them as
*_tests.rsmodules
Code Style Guidelines
- Rust 2021 idioms: Use snake_case for modules, files, functions, and variables
- Indentation: 4 spaces (configured in rustfmt)
- Imports: Group std library, external crates, then local modules
- Types: Use descriptive struct fields and enum variants (e.g.,
positions,normals) - Error handling: Use
thiserrorderive macro for custom error types - Naming: Mirror GLTF semantics explicitly in struct fields
- WGSL shaders: Keep binding names aligned with Rust bind group layouts
- JavaScript/TypeScript: Format with prettier defaults
- Comments: Add documentation comments for public APIs using
/// - Logging: Use
log::info!,log::error!, etc. from the log crate, notprintln!