   (atom
    {:app {:name "Spinning"
           :version "0.1.0"
+          :measure-fps? false
+          :simple-animation? false
           }
     :ech {:env-keyboard-key nil
           :env-mouse-click nil

;; -----------------------------------------------------------------------------
;; App Div

(defonce app-div (poly/get-element :app))


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

        mouse-x (:client-x mouse-move)
        mouse-y (:client-y mouse-move)
        mouse-pos (str "[" mouse-x ":" mouse-y "]")]
    (set! (.-innerText (app-div))
          (string/join ", " [app-name fps env-time timestamp mouse-pos]))))

(declare request-simple-animation)

(defn simple-animation-cycle [timestamp]
  (when (get-in @state [:app :simple-animation?])
    (request-simple-animation)
    (animate timestamp @state)))

(def request-simple-animation (partial poly/request-animation-frame
                                       simple-animation-cycle))

(defn setup-simple-animation! []
  (swap! state assoc-in [:app :simple-animation?] true)
  (request-simple-animation))

(defn teardown-simple-animation! []
  (swap! state assoc-in [:app :simple-animation?] false))


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