     (doseq [g gear-objs]
       (.push gear-array g))
 
-    (animate-gears! svg gear-map gear-array anim-frames)))
+    (animate-gears! svg selector gear-map gear-array anim-frames)))

            (apply-gear-attrs! (gear-map key-) attrs))
          (js/Gear.updateGears gear-array)
          (<! (timeout dt)))

        ;; only continue if this is still the active timer
        (when (= index @reload-index)
          (recur)))

      (js/d3.timer
        (fn []
          (tick-svg! svg)

          ;; only continue if this is still the active timer
          (not= index @reload-index))))))

(defn create-gears!
  [selector


      (.attr gear-obj (name k) v))))

(defonce reload-indexes (atom {}))

(defn animate-gears!
  [svg selector gear-map gear-array anim-frames]

  (let [update-index #(inc (or % 0))
        _ (swap! reload-indexes update selector update-index)
        latest-index #(get @reload-indexes selector)
        index (latest-index)
        should-continue? #(= index (latest-index))]

    (when (seq anim-frames)
      (go-loop []
