explaingit

smigniot/treemakerweb

Analysis updated 2026-05-18

2C++Audience · generalComplexity · 2/5LicenseSetup · easy

TLDR

A browser port of TreeMaker, letting you design origami crease patterns from a stick figure sketch using the original C++ engine compiled to WebAssembly.

Mindmap

mindmap
  root((repo))
    What it does
      Designs crease patterns
      Packs circles and rivers
      Previews folded shape
    Tech stack
      C plus plus
      WebAssembly
      TypeScript
    Use cases
      Sketch a stick figure
      Export SVG or FOLD
      Open legacy TreeMaker files
    Audience
      Origami designers
      Hobbyists

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Design an origami crease pattern by sketching a stick figure of the subject.

USE CASE 2

Export a finished crease pattern as an SVG or FOLD file for other origami tools.

USE CASE 3

Open existing desktop TreeMaker project files directly in the browser.

What is it built with?

C++WebAssemblyTypeScript

How does it compare?

smigniot/treemakerweb9veedz/4leggedspiderbotakashsingh3031/striver-sde-challenge-2023
Stars222
LanguageC++C++C++
Last pushed2023-06-19
MaintenanceDormant
Setup difficultyeasyhardeasy
Complexity2/54/51/5
Audiencegeneralvibe coderdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min

The compiled WebAssembly engine is committed, so no C++ toolchain is needed to run or build the app.

Free to use and modify, but any distributed version, including modifications, must also be released under the same GPL v2 license.

In plain English

TreeMakerWeb is a browser version of TreeMaker, a well known piece of software for designing origami crease patterns, the fold lines you see printed on a sheet before you fold it into a shape. The original software, created by Robert J. Lang, works by letting you draw a simple stick figure of what you want to fold, such as an animal with legs, arms, and a tail, and then calculates how paper would need to be divided and packed to produce that shape. The clever part of this project is how it was ported to the browser. The original mathematical engine, written in C++, was compiled into WebAssembly, a format that lets C++ code run inside a web page at near native speed, and it runs in a background thread called a Web Worker so it does not freeze the page. Everything else, including the drawing interface, file handling, and visual rendering, was rewritten in TypeScript. Inside the app, you draw a tree by clicking to add nodes and dragging to move them, then you can add conditions like pinning a node to the paper's edge or fixing distances between points. The software then packs circles to figure out the most efficient layout, builds the full crease pattern with mountain and valley folds marked, and shows a preview of what the folded shape would roughly look like. You can open old TreeMaker files, save your own project files, and export finished crease patterns as SVG images or in the FOLD format used by other origami tools. Because it is a static site with the WebAssembly engine already built in, running it requires only Node.js during development, and once built, the whole thing can be hosted on any plain web server with no backend needed. The project follows the GPL v2 license, the same license as the original TreeMaker code it is built on. This is aimed at origami designers and hobbyists who want to design crease patterns without installing desktop software.

Copy-paste prompts

Prompt 1
Help me run TreeMakerWeb locally with npm install and npm run dev.
Prompt 2
Explain how to add conditions like fixed edge lengths to a tree in TreeMakerWeb.
Prompt 3
Show me how to export a crease pattern from TreeMakerWeb as a .fold file.

Frequently asked questions

What is treemakerweb?

A browser port of TreeMaker, letting you design origami crease patterns from a stick figure sketch using the original C++ engine compiled to WebAssembly.

What language is treemakerweb written in?

Mainly C++. The stack also includes C++, WebAssembly, TypeScript.

What license does treemakerweb use?

Free to use and modify, but any distributed version, including modifications, must also be released under the same GPL v2 license.

How hard is treemakerweb to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is treemakerweb for?

Mainly general.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.