|
14 | 14 | <div class="container mt-4"> |
15 | 15 | <div class="row"> |
16 | 16 | <div class="col-12 text-center"> |
| 17 | + <h3>WebGL + WebASM Marching Cubes</h3> |
17 | 18 | <canvas id="glcanvas" class="img-fluid" width="640" height="480"></canvas> |
18 | 19 | </div> |
19 | 20 | <div class="mx-auto col-12 col-lg-8 row"> |
|
38 | 39 | <p id="isosurfaceInfo">Isosurface info:</p> |
39 | 40 | </div> |
40 | 41 | <div class="col-12 mt-lg-2 mt-0"> |
41 | | - <p>Mouse Controls: Left-click + drag to rotate, scroll to zoom, right-click + drag to pan. |
| 42 | + <h4>Controls</h4> |
| 43 | + <p>Desktop: Left-click + drag to rotate, scroll to zoom, |
| 44 | + right-click + drag to pan. |
42 | 45 | <br/> |
43 | | - Touch Controls: One finger drag to rotate, pinch to zoom, two finger drag to pan. |
44 | | - </p> |
45 | | - |
| 46 | + Touch: One finger drag to rotate, pinch to zoom, two finger drag to pan. |
| 47 | + </p> |
46 | 48 | <p id="loadingText"></p> |
47 | 49 | <div class="progress mb-2"> |
48 | 50 | <div id="loadingProgressBar" class="progress-bar" role="progressbar" |
49 | 51 | aria-valuenow="0" aria-valuemin="0" aria-valuemax="100"></div> |
50 | 52 | </div> |
| 53 | + |
| 54 | + <h4>Description</h4> |
| 55 | + <p> |
| 56 | + This is a WebGL + WebASM implementation of the classic <a href="https://en.wikipedia.org/wiki/Marching_cubes">Marching Cubes</a> |
| 57 | + algorithm for extracting <a href="https://en.wikipedia.org/wiki/Isosurface">isosurfaces</a> from 3D volume data. |
| 58 | + An isosurface is a surface |
| 59 | + which represents points in the 3D data which all have the same value (e.g., pressure, temperature). |
| 60 | + Try changing the slider to change the selected isovalue! The actual isosurface extraction code |
| 61 | + is implemented in Rust and compiled to WebAssembly to accelerate extraction of the surface. Compared to |
| 62 | + the pure Javascript version, the WebASM version is 10-20x faster! You can run the Javascript version |
| 63 | + by unchecking the "Use WebASM" box. The surface is rendered as a triangle mesh and combined with the |
| 64 | + volume during the volume raycasting step, in a manner roughly similar to shadow mapping. |
51 | 65 | <a href="https://github.com/Twinklebear/webgl-marching-cubes"> |
52 | 66 | Get the code on GitHub!</a> |
| 67 | + </p> |
53 | 68 | </div> |
54 | 69 | </div> |
55 | 70 | </div> |
|
0 commit comments