                            (enter-state has ha (:state ha) t))
                          deps)]
     #_(println "next transitions" #_reenter-has (transition-intervals has
-                                                                  (second reenter-has)
-                                                                  Infinity
-                                                                  (required-transitions (second reenter-has))))
+                                                                      (second reenter-has)
+                                                                      Infinity
+                                                                      (required-transitions (second reenter-has))))
     (merge has (zipmap (map :id reenter-has) reenter-has))))
 
 (defn update-scene [scene now inputs]

    (cond
      (> min-t qnow) (assoc scene :now now)
      (= min-t qnow) (do #_(println "clean border") (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))
      )))

(defonce scene-a (atom {}))

             (next-transition-ha (get-in @scene [:objects :a]) (get-in @scene [:then])))
           scene-a)

(defonce last-scene-a nil)

(defn rererender [target]
  (when (not= @scene-a last-scene-a)
    (js/React.render (scene-widget scene-a nil) target))
  (.requestAnimationFrame js/window #(rererender target)))

(defn main []
  ;; conditionally start the app based on wether the #main-app-area
  ;; node is on the page
  (if-let [node (.getElementById js/document "main-app-area")]
    (.requestAnimationFrame js/window #(rererender node))))

(main)

