Skip to content

innanyun/fold-viewer-threejs

Repository files navigation

FOLD Viewer

FOLD (Flexible Origami List Datastructure) file viewer implemented in TypeScript using Three.js

Why Another Viewer?

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

Is It Worth?

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.

Usage

  1. Install packages: npm install
  2. Run: npm run start and visit http://localhost:8080.
  3. 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 change
      • browser-sync for reloading browser pages when files change
    • Test: npm run test
    • Lint: npm run lint

About

FOLD File Viewer (Three.js)

Resources

Stars

Watchers

Forks

Packages

No packages published