feat(@typegpu/geometry): Raycast against a mesh on the CPU
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 48/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- computer-graphics, typescript
調査の方向性
Start with the mesh endpoint from #2997 and inspect IndexedGeometry's vertexAt(i), indexAt(i), and topology APIs. The issue proposes meshes.raycast(geometry, origin, direction) for triangle-list meshes, returning the nearest hit with barycentric data and available vertex attributes. Done means callers can raycast indexed and non-indexed geometry synchronously in local space; the back-face and all-hit questions still need decisions.
索引モデルが issue の本文から書いたものです。
説明
Use case: world-space UIs (https://github.com/software-mansion/typegpu-kit/issues/15). A UI is rendered to a texture on a plane, and pointer events need the hit UV. Picking on the GPU is async and has no UVs, so this needs a sync CPU raycast against the mesh.
It builds on the mesh endpoint from #2997, which already gives everything needed: vertexAt(i), indexAt(i) on IndexedGeometry, and the topology.
Proposal:
const hit = meshes.raycast(geometry, origin, direction);
// { distance, triangle, barycentric, position, normal, uv } | undefined
- Works for
triangle-listgeometry, indexed or not. - Returns the nearest hit along the ray, or
undefined. triangleandbarycentriclet you interpolate any attribute of a custom vertex schema.position,normalanduvare filled when the schema has them (the defaultVertexdoes).- The ray is in the geometry's local space. Moving it by the inverse of an instance's placement stays with the caller (or a helper in the kit).
Open questions:
- Hit back faces too, or only front faces by default? A UI plane wants both.
- One hit, or an option for all hits sorted by distance?
- No acceleration structure at first: a linear pass over the triangles is fine for UI planes and small meshes. A BVH can come later if someone raycasts big meshes every frame.
- 主要言語
- TypeScript
- スター
- 3.4k
- フォーク
- 151
- 平均マージ
- 3日 8時間
- マージ済み PR(30日)
- 55
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
software-mansion/TypeGPU のほかの issue
-
fix(unplugin-typegpu): `getLang()` misidentifies file extensions when a query contains a dot再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
software-mansion/TypeGPU#3433 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
fix(unplugin-typegpu): Return `undefined` from TypeGPU’s Bun `onLoad` when no transform is neededオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
software-mansion/TypeGPU#3429 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
chore(unplugin-typegpu): Inconsistent warning prefixes across entry points対応中かも @dchaudhari7177 が 9 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
software-mansion/TypeGPU#3418 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug: f16 writes always fail in the compiled writer on engines without DataView.setFloat16 (React Native / Hermes)対応中かも @dchaudhari7177 が 8 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
software-mansion/TypeGPU#3405 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
docs: Remove popups from examples対応中かも @aleksanderkatan が 8 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
software-mansion/TypeGPU#3327 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
software-mansion/TypeGPU の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
ehmpathy/rhachet-roles-bhrain#878 ·
メンテナーはふだん 1 日以内に返信
-
Chat UI: Message actions dropdown is cut off beneath composer when message is near bottom of chat対応中かも @koeria が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
milind-soni/OpenMausBot#8023 ·
メンテナーはふだん 1 日以内に返信
-
Windows microphone listing treats words in a device name as DirectShow labels対応中かも @Sujal-chaudhary が今日担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
clipy-recorder/clipy#447 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
enhancement from-app needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
nightly-labs/openbot#19162 ·
メンテナーはふだん 1 日以内に返信
-
triage:in-progress
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
Cotal-AI/Cotal#11229 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信