GetAttributeDataArrayForAllPoints: non-float attributes have no conversion or mapping fallback
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 68/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 静か
- 技術スタック
- cpp, react-native
調査の方向性
cpp/draco-helpers.h で GetAttributeDataArrayForAllPointsHelper と GetAttributeFloatArrayForAllPoints を比較することから始め、次に Uint8 JOINTS_0 を使用する Draco 圧縮済みのスキニングされた glTF で失敗を再現してください。完了条件は、型付き抽出が変換と非恒等マッピングをサポートし、不一致時に false を返さないことです。さらに、README の例で outSize をバイト数として説明すべきかどうかも確認してください。
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- C++
- スター
- 10
- フォーク
- 0
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
callstack/react-native-draco のほかの issue
-
Android module is the create-react-native-library stub — Draco decode is unimplemented on Android オープン
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
callstack/react-native-draco の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
AXERA-TECH/ax-llm#77 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
games-on-whales/wolf#509 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
-
bug-unconfirmed
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100