Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Use library's applet.clj instead of our own.

  • Loading branch information...
commit 7f9c67afda7e15af4a10121a0e1dec4a9877d046 1 parent 675f488
Phil Hagelberg authored
2  README.md
View
@@ -11,7 +11,7 @@ Then run with:
$ corkscrew repl
Clojure 1.0.0--SNAPSHOT
user=> (require 'sketchbook.pop)
- user=> (sketchbook.pop/run)
+ user=> (sketchbook.pop/run-pop)
To install corkscrew, see http://github.com/technomancy/corkscrew
4 project.clj
View
@@ -4,5 +4,5 @@
:dependencies [["clojure" "1.0.0" "org.clojure"]
["clojure-contrib" "1.0-SNAPSHOT" "org.clojure"]
["processing.core" "1.0.6" "org.processing"]]
- :source-dependencies [["clj-processing" "82d4c6ae20db47f9539729b0a69e0b7f83fa177f"
- :git "git://github.com/rosado/clj-processing.git"]]}
+ :source-dependencies [["clj-processing" "master"
+ :git "git://github.com/technomancy/clj-processing.git"]]}
23 src/sketchbook/applet.clj
View
@@ -1,23 +0,0 @@
-(ns sketchbook.applet
- (:use rosado.processing)
- (:import (javax.swing JFrame)))
-
-(defmacro defapplet
- [name title setup draw width height]
- `(do
- (def ~name
- (proxy [processing.core.PApplet] []
- (setup []
- (binding [*applet* ~'this]
- (size ~width ~height)
- (~setup)))
- (draw []
- (binding [*applet* ~'this]
- (~draw)))))
- (defn ~(symbol (str "run-" name)) []
- (.init ~name)
- (doto (JFrame. ~title)
- (.setSize ~width ~height)
- (.add ~name)
- (.pack)
- (.show)))))
11 src/sketchbook/pop.clj
View
@@ -1,6 +1,7 @@
(ns sketchbook.pop
- (:use [sketchbook.applet]
- [rosado.processing]))
+ (:refer-clojure :exclude [pop])
+ (:use [rosado.processing]
+ [rosado.processing.applet]))
(def generation (atom 0.0))
@@ -17,7 +18,9 @@
(+ (* y 100) 10)
90 90))))
-(defapplet popp "Synthpop-inspired Jams"
+(defapplet pop "Synthpop-inspired Jams"
setup draw 510 510)
-(run-popp)
+;; To make things go:
+;; (run-pop)
+;; (stop-pop)
Please sign in to comment.
Something went wrong with that request. Please try again.