   ([]
    (init 0.099 (* 0.068 8) {:theta 0 :z 0.20}))
   ([barrel-radius barrel-height cursor-position]
-   (BombsMode. barrel-radius barrel-height cursor-position)))
+   (BombsMode. barrel-radius barrel-height cursor-position [])))

                       :max-val sphere/tau)]
          (if (>= theta' sphere/tau) 0.0 theta')))

      this))


  (render
    [this pixel]
    (let [delta (distance barrel-radius (:barrel pixel) cursor-position)]
      (if (< delta 0.04) (color/gray 1.0) color/none))))


(defn init

    (Math/sqrt (+ (Math/pow vertical-distance 2) (Math/pow circle-distance 2)))))


(defn- overlay
  ([layers]
   (reduce (fn [c1 c2] (if (= c2 color/none) c1 c2)) layers)))

(defn- bomb-color
  [barrel-radius pixel bomb]
  (do
    #_(log/warn pixel bomb)
    (let [delta (distance barrel-radius (:center bomb) (:barrel pixel))
          radius (* (:age bomb) 0.00003)]
      (if (<= delta radius)
        (color/rainbow (/ delta radius))
        color/none))))

(defrecord BombsMode
  [barrel-radius barrel-height cursor-position bombs]

  mode/Mode

  (update
    [this event]
    (condp = [(:type event) (:input event)]
      [:time/tick nil]
      (let [elapsed (or (:elapsed event) 0.0)]
        (assoc this :bombs
          (map (fn [bomb]
                 (let [age' (+ (:age bomb) elapsed)]
                   (assoc bomb :age age')))
               (filter #(< (:age %) 10000) bombs))))

      [:axis/direction :y-axis]
      (assoc-in this [:cursor-position :z]
