feat(@typegpu/geometry): Raycast against a mesh on the CPU
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 48/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- computer-graphics, typescript
- Lĩnh vực
- backend, computer-graphics
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- TypeScript
- Star
- 3.4k
- Fork
- 151
- Merge trung bình
- 3 ngày 8 giờ
- Pull request đã merge (30 ngày)
- 55
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của software-mansion/TypeGPU
-
fix(unplugin-typegpu): `getLang()` misidentifies file extensions when a query contains a dotCó thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
software-mansion/TypeGPU#3433 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
fix(unplugin-typegpu): Return `undefined` from TypeGPU’s Bun `onLoad` when no transform is neededĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
software-mansion/TypeGPU#3429 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
chore(unplugin-typegpu): Inconsistent warning prefixes across entry pointsCó thể đã có người làm @dchaudhari7177 đã nhận 9 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
software-mansion/TypeGPU#3418 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug: f16 writes always fail in the compiled writer on engines without DataView.setFloat16 (React Native / Hermes)Có thể đã có người làm @dchaudhari7177 đã nhận 8 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
software-mansion/TypeGPU#3405 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
docs: Remove popups from examplesCó thể đã có người làm @aleksanderkatan đã nhận 8 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
software-mansion/TypeGPU#3327 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của software-mansion/TypeGPU
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
ehmpathy/rhachet-roles-bhrain#878 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Chat UI: Message actions dropdown is cut off beneath composer when message is near bottom of chatCó thể đã có người làm @koeria đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
milind-soni/OpenMausBot#8023 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Windows microphone listing treats words in a device name as DirectShow labelsCó thể đã có người làm @Sujal-chaudhary đã nhận hôm nay. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
clipy-recorder/clipy#447 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement from-app needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
nightly-labs/openbot#19162 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
triage:in-progress
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Cotal-AI/Cotal#11229 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày