Skip to content

Latest commit

 

History

History
31 lines (25 loc) · 546 Bytes

README.md

File metadata and controls

31 lines (25 loc) · 546 Bytes

Origami WebGL Runtime

This is the official WebGL runtime for the Origami Definition Language.

Usage

Browser

<script type="application/javascript" src="browser.min.js"></script>
<script type="application/origami">
# paper: square

--bottom: --(.b .c)
fold .a to .b
fold --bottom to --^1
</script>

As a module

import OrigamiRuntime from '@origamidl/webgl';

const code = `
# paper: square

--bottom: --(.b .c)
fold .a to .b
fold --bottom to --^1
`;

let runtime = new OrigamiRuntime();
runtime.parse(code);