Rabbit Ear

grab

var myOrigami = ear.origami()

This is a Javascript library for modeling, designing, and diagramming origami.

Download

This library is in pre-release.

The online editor is the fastest way to start coding:

svg.rabbitear.org

The library is one Javascript file, available from Github CDN, NPM, or for download.

https://robbykraft.github.io/Origami/rabbit-ear.js
npm install rabbit-ear
rabbit-ear.js (~180kb)

Learn

Look for this button next to all the sketches in these docs, this will open the editor with the sketch's code.

Examples

Full web apps build with Rabbit Ear.

Let's Begin

Ready? Head over to Chapter 1: Math. For the coders, here's some tips to take with you.

Rabbit Ear is composed of smaller libraries (the four chapters), and is even further divided into a front end and a back end. The front end is the object-oriented style objects with class methods, these constructors are at the top level, for example:

ear.vector(1, 2, 3)
ear.svg(document.body)
ear.cp()

Ideally you never leave the front end, but this might not be possible especially in the early days of this library. You can tell you're venturing into the back end when you begin seeing snake_case. Back-end methods are grouped by categories.

ear.math
ear.graph
ear.svg
ear.diagram

Categories; notice some of these double as constructors (graph, svg).

The front end calls the back end, and you can too, but back-end methods are meant to execute as fast as possible so you will need to ensure arguments are in the correct form. Front-end objects and methods will type-check your arguments and try best not to throw errors.

Developers

This library is written in ES6 Javascript. The source code is on Github.