AnasSarkiz/magnetic-shutter-remote-r8
A USB‑C rechargeable battery-powered ESP32‑C3 wireless controller with Li‑ion charging, protected 3.3‑V buck‑boost regulation, thermal/safety monitoring, status LEDs, buttons, programming UART, crystal clock, and 2.4‑GHz antenna matching network.
- Version
- 0.4.0-prototype
- License
- unset
- Stars
- 0
tscircuit-issues/116-native-glb-interleaved-attributes.md
# Native GLB reader ignores interleaved attribute byteStride
Package:circuit-json-to-gltf0.0.133,lib/loaders/glb.ts:getAccessorData.
Reproduction: create a GLB with official@gltf-transform/core4.2.1 NodeIO's default INTERLEAVED layout and POSITION/NORMAL/UV attributes. Import it through assembly.subassembly cadModel.glbUrl,size,modelBoardNormalDirection="z+" and build with the pinned CLI's --glbs. Read actual output POSITION bounds against source geometry. The R9 full PCB fragment expected56×44×3.91mm instead became3.91×3.91×3.91mm, despite preserving20501 triangles. Actual source81 failure log is retained in routing evidence.
Cause:getAccessorData constructs a contiguous Float32Array from accessor byteOffset and total component count, ignoring bufferView.byteStride. Normal/UV bytes become position coordinates; subsequent contain-within-bounds rescales the corrupt bounds. The native loader must read each strided accessor element and preserve indices/types/attributes. Regression should compare positions/normals/colors across separate and interleaved encodings, not only triangle counts.
Project solution:the official writer's supported VertexLayout.SEPARATE stores tightly packed attributes. Weld merges only bitwise-identical complete attribute tuples; no faces, materials, images or geometric precision are removed. The independent expanded-triangle-byte proof and all38 actual closed/exploded model bounds/triangle counts pass. The test explicitly rejects interleaved output for this pinned reader. No runtime/node_modules edits or viewer features are used. This issue remains upstream; no public issue or tooling publication occurred.