   (:require
     #_[om.core :as om :include-macros true]
     [clojure.set :refer [union]]
+    [cljs.tools.reader.edn :as reader]
     #_[clojure.walk :as walk]
     [sablono.core :as sab :include-macros true])
   (:require-macros

(def time-unit (/ frame-length time-units-per-frame))
(def precision 0.001)

(defn empty-interval? [[start end]]
  (> start end))

(defn intersect-all [intervals]
  (let [[start end] (reduce
                      (fn [[amin amax] [bmin bmax]]
                        [(.max js/Math amin bmin) (.min js/Math amax bmax)])
                      [time-unit Infinity]
                      intervals)
        narrow-start (ceil-time start time-unit)
        narrow-end (floor-time end time-unit)]
    (when (and (< start end) (< narrow-end narrow-start))
      (.warn js/console "This interval is narrower than D!" (str [start end]) (str [narrow-start narrow-end])))
    [(ceil-time start time-unit) (floor-time end time-unit)]))

(defn third [v] (nth v 2))


                       (assoc scene :now now
                                    :objects (follow-transitions has transitions)))
      :else (do #_(println "messy border overflow" (- now min-t))
              (update-scene (assoc scene :now min-t
                                         :objects (follow-transitions has transitions))
                            now
                            inputs
                            (inc bailout)))
      )))

(defonce scene-a (atom {}))
