Rabbit Ear is gearing up for a version 1 release. check back in early 2020.



<!DOCTYPE html>
<title>Rabbit Ear</title>
<script src="rabbit-ear.js"></script>
RabbitEar.Origami( {"folding":true} );

This simple app creates the sketch above - a square sheet of paper that you can fold.

Example Apps

Getting Started

Create a new project inside the "sketches" folder by copying and renaming "empty".

There are three files in your sketch:

let origami = RabbitEar.Origami();

// respond to a touch event origami.onMouseMove = function(event){ }


This loads an svg image, interprets it like a crease pattern, and folds it.

let origami = RabbitEar.Origami();
let origami = RabbitEar.Origami();

In some cases Rabbit Ear is capable of determining layer ordering for a folding. When it is unsure it draws translucent faces.

loading a file requires running a localhost server.

This sketch loads a frog base and colors the faces.

let origami = RabbitEar.Origami();

  .map(color => color ? "#224c72" : "#f1c14f")
  .forEach((color, i) =>
    origami.faces[i].setAttribute("style", "fill:" + color)

A flat-foldable crease pattern is always two-colorable.

Read more about the Origami object, .svg to .fold converters, the math and svg libraries, and more in the following sections.