3 ms·
The javascript code is not minified and is easy to follow. Beautifully done. https://ciechanow.ski/js/base.js https://ciechanow.ski/js/base.js https://ciechan
by simple10 3y ago
The javascript code is not minified and is easy to follow. Beautifully done.
https://ciechanow.ski/js/base.js https://ciechanow.ski/js/base.js
https://ciechanow.ski/js/airfoil.js https://ciechanow.ski/js/airfoil.js
- deleted 3y ago[deleted]
- caditinpiscinam 3y agoI've never used webgl -- what's its advantage over normal 2d canvas drawing for a project like this?
- modeless 3y agoSpeed. Drawing thousands of objects (such as the blades of grass or air molecules) with 2D canvas will be very slow. WebGL allows all drawing to be offloaded to the GPU, which can draw thousands of objects in parallel given a single CPU command. 2D canvas also doesn't provide any 3D primitives (as the name would suggest), while WebGL natively supports rasterizing 3D triangles with perspective correct texture mapping and z-buffering. The downside of WebGL is its complexity, but there are many libraries to help with that.