GetAttributeDataArrayForAllPoints: non-float attributes have no conversion or mapping fallback
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 68/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- cpp, react-native
- Domain
- computer-graphics, mobile-dev
Research direction
Start in cpp/draco-helpers.h by comparing GetAttributeDataArrayForAllPointsHelper with GetAttributeFloatArrayForAllPoints, then reproduce the failure using a Draco-compressed skinned glTF with Uint8 JOINTS_0. Done means typed extraction supports conversion and non-identity mapping instead of returning false on mismatches; also check whether the README examples should describe outSize as bytes.
Written by the indexing model from the issue text.
Description
Environment
@callstack/react-native-draco 0.3.0
three's GLTFLoader, RN 0.86, new architecture, iOS
Description
cpp/draco-helpers.h has two extraction paths that behave differently:
GetAttributeFloatArrayForAllPoints(float requests) walksmapped_indexand falls back topa.ConvertValue<float>()for non-float source data — it handles quantization and non-identity mapping.GetAttributeDataArrayForAllPointsHelper<T>(every non-float typed request) only succeeds whenpa.data_type() == typeandpa.is_mapping_identity()— a directmemcpy. Any type mismatch or non-identity mapping returnsfalseand decode fails. NoConvertValuefallback like Draco's Emscripten wrapper.
So Float32 POSITION/NORMAL/TEXCOORD works, but skinned meshes don't: JOINTS_0 is Uint8/Uint16 and WEIGHTS_0 is often quantized, so GLTFLoader requests typed arrays the helper refuses.
Minor: the outSize arguments are byte lengths (the helper asserts num * components * sizeof(T) == out_size); the README examples read like element counts.
Suggested fix: give the typed path the same ConvertValue-based extraction and non-identity mapping support the float path already has. Happy to send a PR.
Reproducible Demo
Load any Draco-compressed skinned glTF (JOINTS_0 stored as Uint8) through three's GLTFLoader wired to this module. Static meshes decode; the skinned mesh errors on attribute extraction, because GetAttributeDataArrayForAllPointsHelper<uint8_t> returns false unless the stored type and mapping match exactly.
Transparency note: this issue was drafted with AI assistance. I'm a human, I've personally verified the behavior in the source, and I'm happy to answer any questions or concerns directly. Thanks for the library.
- Dominant language
- C++
- Stars
- 10
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from callstack/react-native-draco
-
Android module is the create-react-native-library stub — Draco decode is unimplemented on Android Open
Difficulty 5/5 Over a week Newbie friendliness 35/100
All issues in callstack/react-native-draco
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
AXERA-TECH/ax-llm#77 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
games-on-whales/wolf#509 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
bug-unconfirmed
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
NVIDIA/cuda-samples#453 ·