little cleanups
This commit is contained in:
parent
c60013f21f
commit
ecc4fa4b7e
|
@ -49,7 +49,7 @@
|
|||
:drag (gs/update-entity
|
||||
(update-in entity [:blobs blobid]
|
||||
#(into % (blob/screen-pos-to-blob (:mousex input) (:mousey input) entity))))
|
||||
(println event)))
|
||||
nil))
|
||||
|
||||
(defn- update-blobs [inputs]
|
||||
(doseq [input inputs]
|
||||
|
@ -67,9 +67,7 @@
|
|||
(doseq [blob (vals (:blobs blobs))]
|
||||
(let [{:keys [x y]}
|
||||
(blob/blob-pos-to-screen blob blobs)]
|
||||
;(println x y)
|
||||
(.fill g (org.newdawn.slick.geom.Circle. x y 5)))
|
||||
)))
|
||||
(.fill g (org.newdawn.slick.geom.Circle. x y 10))))))
|
||||
|
||||
(defn update-gs-at [ts inputs]
|
||||
(do
|
||||
|
|
|
@ -78,8 +78,8 @@
|
|||
(defn assoc-in-entity [id keys value]
|
||||
(set-entity id (assoc-in (entity id) keys value)))
|
||||
|
||||
(defn update-in-entity [id keys fn]
|
||||
(set-entity id (update-in (entity id) keys fn)))
|
||||
(defn update-in-entity [id keys fn & args]
|
||||
(set-entity id (apply update-in (entity id) keys fn args)))
|
||||
|
||||
(defn remove-entity [value]
|
||||
(set-entity (::id value) nil))
|
||||
|
|
|
@ -16,11 +16,11 @@
|
|||
(let [executor (reify java.util.concurrent.Executor
|
||||
(execute [this f] (swap! (:evalqueue repl) #(conj % f))))
|
||||
server (server/start-server
|
||||
:port (:port repl)
|
||||
:port (:port repl)
|
||||
:handler
|
||||
(-> server/unknown-op
|
||||
clojure.tools.nrepl.middleware/wrap-describe
|
||||
(hottub.interruptible-eval/interruptible-eval
|
||||
(hottub.interruptible-eval/interruptible-eval
|
||||
:executor executor
|
||||
:eval-wrapper eval-wrapper)
|
||||
clojure.tools.nrepl.middleware.load-file/wrap-load-file
|
||||
|
@ -36,9 +36,9 @@
|
|||
(reset! (:server repl) nil))
|
||||
|
||||
(defn repl-update [repl]
|
||||
(doseq [f (reset-returning-old! (:evalqueue repl) [])]
|
||||
(doseq [f (reset-returning-old! (:evalqueue repl) [])]
|
||||
(try
|
||||
(f)
|
||||
(catch Exception e
|
||||
(catch Exception e
|
||||
(println "couldn't eval:")
|
||||
(.printStackTrace e)))))
|
Loading…
Reference in a new issue