 
 (defn move-mouse [tick-state {:keys [start-tick end-tick start-x end-x start-y end-y tool]
                               :or {tool :rect}}]
-  (reduce (fn [tick-state relative-tick]
-            (add-tick tick-state
-                      (+ start-tick relative-tick)
-                      (fn [owner]
-                        (let [ex (+ start-x (* relative-tick
-                                               (/ (- end-x start-x)
-                                                  (- end-tick start-tick))))
-                              ey (+ start-y (* relative-tick
-                                               (/ (- end-y start-y)
-                                                  (- end-tick start-tick))))]
-                          ((om/get-shared owner :cast!)
-                           :subscriber-updated {:client-id (ffirst state/subscriber-bot)
-                                                :fields {:mouse-position [ex ey]
-                                                         :show-mouse? true
-                                                         :tool tool}})))))
-          tick-state
-          (range 0 (inc (- end-tick start-tick)))))
+  (-> (reduce (fn [tick-state relative-tick]
+                (add-tick tick-state
+                          (+ start-tick relative-tick)
+                          (fn [owner]
+                            (let [ex (+ start-x (* relative-tick
+                                                   (/ (- end-x start-x)
+                                                      (- end-tick start-tick))))
+                                  ey (+ start-y (* relative-tick
+                                                   (/ (- end-y start-y)
+                                                      (- end-tick start-tick))))]
+                              ((om/get-shared owner :cast!)
+                               :subscriber-updated {:client-id (ffirst state/subscriber-bot)
+                                                    :fields {:mouse-position [ex ey]
+                                                             :show-mouse? true
+                                                             :tool tool}})))))
+              tick-state
+              (range 0 (inc (- end-tick start-tick))))
+    (annotate-keyframes end-tick)))
 
 (defn draw-shape [tick-state {:keys [start-tick end-tick start-x end-x
                                      start-y end-y type tool doc-id props]

                                        :fields {:mouse-position nil
                                                 :layers nil
                                                 :tool :text}})
                  (d/transact! (om/get-shared owner :db) [base-layer] {:bot-layer true}))))))

(defn signup-animation [document vw]
  (let [text "Sign in with Google"

  Unmount the component to stop the animation."
  [owner tick-state]
  (let [max-tick (apply max (keys (:ticks tick-state)))]
    (utils/rAF (fn [timestamp]
                 (run-animation* owner timestamp timestamp tick-state 0 max-tick)))))

(defn cleanup [owner]
  ((om/get-shared owner :cast!) :subscriber-updated {:client-id (ffirst state/subscriber-bot)
