                   :scroll-y        (:scroll-y world-desc)
                   :camera-width    (:camera-width world-desc)
                   :camera-height   (:camera-height world-desc)
-                  :view-width      640
-                  :view-height     480
+                  :view-width      320
+                  :view-height     240
                   :width           (:width world-desc)
                   :height          (:height world-desc)
                   :walls           walls})))

(defn button-bar [world]
  (let [wld @world
        ha-defs (:ha-defs wld)]
    (sab/html [:div {:style {:position "fixed"}}
               [:button {:onClick #(swap! world
                                          (fn [w]
                                            (assoc w :playing (not (:playing w)))))}

      w)))

(defn world-update-desc [w desc]
  (if (= desc (:desc w))
    w
    (let [w (reenter-current-config w)
          old-defs (:ha-defs w)
          new-world (make-world desc)
          new-defs (:ha-defs new-world)
          new-vals (:objects (current-config new-world))
          old-init-vals (:objects (first (:configs w)))
          _ (println "world-update-desc")
          w (assoc w :ha-defs new-defs
                     :desc desc
                     :walls (:walls new-world)
                     :seen-polys {}
                     :explored #{}
                     :seen-configs #{}
                     :width (:width desc)
                     :height (:height desc))
          w (update w
                    :configs
                    (fn [cfgs]
                      (mapv
                        (fn [{old-vals :objects t :entry-time :as cfg}]
                          (assoc cfg :objects (update-object-vals old-defs
                                                                  new-defs
                                                                  old-init-vals
                                                                  old-vals
                                                                  new-vals
                                                                  t)
                                     :tr-caches nil))
                        cfgs)))]
      (world-append (update w :configs #(subvec % 0 (dec (count %))))
                    (heval/recache-trs new-defs (current-config w))))))

(defn world-update-desc! [world desc]
  (update-world! world
