         (reset! in-transition? false)))))
 
 (defn prev-slide!
+  "Go to previous slide if we can."
   []
   (when-not @in-transition?
     (when-let [s (get @slide-states (dec (:slide @state)))]

(defn arc! [x y r a0 a1 cc] (.arc ctx x y r a0 a1 cc))
(defn fill! [] (.fill ctx))
(defn stroke! [] (.stroke ctx))
(defn circle! [x y r]
  (begin-path!)
  (arc! x y r 0 (* 2 PI) false))

(defn get-global-alpha [] (aget ctx "globalAlpha"))
(defn set-global-alpha [x] (aset ctx "globalAlpha" x))
(defn global-alpha! [x] (set-global-alpha (* x (get-global-alpha))))

(defn font! [x] (aset ctx "font" x))
(defn fill-text! [text x y] (.fillText ctx text x y))
(defn stroke-text! [text x y] (.strokeText ctx text x y))

;;--------------------------------------------------------------------------------

(def tweens
  "In-betweening animation functions."
  {:linear identity
   :swing #(- 0.5 (/ (cos (* % PI)) 2)) ;; from jquery

