MotionVideo.me2008
한국어

Custom WebGL2 3D physics engine in Rust

Custom WebGL2 3D physics engine in Rust — @LinusEkenstam의 Gemini 4 Argon 작품. 영상과 크리에이터의 원본 게시물에서 작품의 배경을 확인하세요.

1:42 · 73 좋아요 · 수집 당시 데이터 · 23.3K 조회수 · 수집 당시 데이터

크리에이터 게시물

크리에이터 게시물과 원래 작품 제목은 원문으로 유지합니다.

I wrote a custom 3D physics engine and WebGL2 renderer from scratch in Rust that runs in the browser via WebAssembly. 0 external math crates. 0 physics libraries. <100KB .wasm binary at 120 FPS. Here’s how the entire architecture fits together in ~1,200 lines of Rust. I've had the opportunity to play around with Gemini 4 Argon for the past couple of weeks. I could not help myself, but I wanted to see what it could do. I know there are lot of really cool projects around, that are super polished and amazing. However, I wanted to make something a bit more raw. So I tasked Argon with building a 3D engine that includes a physics engine out of the box. While try to keeping it light weight. The result, IMPULSE. Instead of pulling in Rapier or Bullet, everything is solved from first principles at 120Hz (2 substeps/frame): → Analytical world-space inverse inertia tensors (R * I_local^-1 * R^T) → 15-axis Separating Axis Theorem (SAT) for OBB-OBB manifolds → Iterative sequential impulses + Baumgarte stabilization → 3 X 3 effective mass matrix K^-1 for ball-and-socket & catenary bridge joints We skipped wgpu for raw web-sys WebGL2 to keep compile times instant and the binary tiny: → Two-pass 2048x2048 depth shadow map with 3x3 PCF → Procedural unit meshes + local-space rotational stripes → Screen-to-world ray unprojection for 3D mouse spring dragging → Toggleable AABB & contact normal wireframe pass In my stress tests, I'll throw 500+ rigid bodies, including light and shadows, all WebGL. I should turn this into a benchmark for all models going forward, because it's truly amazing. My goal was to create an engine that is super light weight and that I can use in other projects. The entire engine so far weighs only 82.7 KB Should I drop the GitHub repo + live playable link?

크리에이터의 게시물이며 검증된 생성 프롬프트는 아닙니다.

원본 게시물 ↗

제목, 게시물, 스타일을 검색하세요. Enter를 눌러 결과를 확인하세요.