FOLD (Flexible Origami List Datastructure) file viewer implemented in TypeScript using Three.js
There is a good viewer created by Jason Ku. It's an excellent implementation. But it's written in CoffeeScript and I wanted a more accessible and extensible implementation that can be part of the bigger growing system for origami simulation so I made the following decisions:
- TypeScript as an implementation language
- Three.js as a 3D framework
The sophisticated type system of TypeScript makes it possible to express the
FOLD file format
specification in a
very concise and elegant way (as in fold_format.ts
).
As the FOLD format specification evolves, maintaining the implementation
reflecting the new changes in the specification would be a no-brainer.
- Install packages:
npm install
- Run:
npm run start
and visit http://localhost:8080. - Development
- Live reload:
npm run dev
This runs the following tasks in parallel:_type-check-only
for live type checking using TypeScript compiler_test-watch
for rerunning tests when files change_esbuild-watch
for rebuilding when files changebrowser-sync
for reloading browser pages when files change
- Test:
npm run test
- Lint:
npm run lint
- Live reload: