feat(@typegpu/geometry): Raycast against a mesh on the CPU
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 48/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- computer-graphics, typescript
- Ambito
- backend, computer-graphics
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- TypeScript
- Stelle
- 3.4k
- Fork
- 151
- Merge medio
- 3g 8h
- PR unite (30g)
- 55
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di software-mansion/TypeGPU
-
fix(unplugin-typegpu): `getLang()` misidentifies file extensions when a query contains a dotForse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
software-mansion/TypeGPU#3433 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
fix(unplugin-typegpu): Return `undefined` from TypeGPU’s Bun `onLoad` when no transform is neededAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
software-mansion/TypeGPU#3429 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
chore(unplugin-typegpu): Inconsistent warning prefixes across entry pointsForse già presa @dchaudhari7177 l’ha presa 9 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
software-mansion/TypeGPU#3418 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
bug: f16 writes always fail in the compiled writer on engines without DataView.setFloat16 (React Native / Hermes)Forse già presa @dchaudhari7177 l’ha presa 8 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
software-mansion/TypeGPU#3405 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
docs: Remove popups from examplesForse già presa @aleksanderkatan l’ha presa 8 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
software-mansion/TypeGPU#3327 · 1 commento · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di software-mansion/TypeGPU
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
ehmpathy/rhachet-roles-bhrain#878 ·
I maintainer di solito rispondono entro 1 giorno
-
Chat UI: Message actions dropdown is cut off beneath composer when message is near bottom of chatForse già presa @koeria l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
milind-soni/OpenMausBot#8023 ·
I maintainer di solito rispondono entro 1 giorno
-
Windows microphone listing treats words in a device name as DirectShow labelsForse già presa @Sujal-chaudhary l’ha presa oggi. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
clipy-recorder/clipy#447 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement from-app needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
nightly-labs/openbot#19162 ·
I maintainer di solito rispondono entro 1 giorno
-
triage:in-progress
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
Cotal-AI/Cotal#11229 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno