robbykraft / webgl-fold

render FOLD object in WebGL

Home Page:https://foldfile.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

WebGL FOLD file view

Render a FOLD file in an HTML canvas with WebGL.

features

  • 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

WebGL

All WebGL boilerplate, projection, shaders, and rendering has been incorporated into the Rabbit Ear base project, located in src/webgl/ in this repo.

developers

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.

license

MIT

About

render FOLD object in WebGL

https://foldfile.com/


Languages

Language:JavaScript 49.8%Language:Svelte 44.8%Language:CSS 3.7%Language:HTML 1.7%