Render a FOLD file in an HTML canvas with WebGL.
- two drawing styles, one for crease patterns, one for folded models.
- the crease pattern style features thick lines, computed on a shader.
- the folded model style features the ability to sort layer ordering in accordance with the FOLD spec
- ability to view different file frames if a FOLD file contains them.
- orthographic, perspective, field of view, touch to pan and rotate
All WebGL boilerplate, projection, shaders, and rendering has been incorporated into the Rabbit Ear base project, located in src/webgl/
in this repo.
If you would like to include a WebGL origami view canvas on your site, check out the code in one of these three examples:
Include Rabbit Ear in your project and copy the code from one of these three example projects to get going.
MIT