The only cross-platform browser that fits in a Gist!
One line install. Works on Linux, MacOSX and Windows.
$> npm install http://gist.github.com/johnjelinek/148007be82c27eb3cd6e/download
| (ns boids | |
| (:use [enchilada :only [canvas ctx value-of canvas-size]] | |
| [jayq.core :only [show]] | |
| [monet.core :only [animation-frame]] | |
| [monet.canvas :only [save restore | |
| begin-path move-to line-to close-path | |
| stroke stroke-style fill fill-rect fill-style | |
| rotate translate]] | |
| [boids.rules :only [step make-boid]]) | |
| (:require [boids.vector :refer [heading]])) |
| ; rewritten in Clojurescript from javascript (originally by Piotr Stosur: http://js1k.com/2013-spring/demo/1431) | |
| (ns psychedelic-animation.demo | |
| (:use [enchilada :only [canvas svg ctx]] | |
| [jayq.core :only [show hide]] | |
| [monet.core :only [animation-frame]] | |
| [monet.canvas :only [fill-style fill-rect draw-image rotate translate]])) | |
| (show canvas) | |
| (hide svg) |