 (defn mutate-env-time! []
   (reset! rc-env-time (poly/js-now)))
 
-(defn mutate-env-mouse! [mouse]
-  (reset! rc-env-mouse mouse))
+(defn mutate-env-mouse-down! [m]
+  (reset! rc-env-mouse-down m))
+
+(defn mutate-env-mouse-move! [m]
+  (reset! rc-env-mouse-move m))
+
+(defn mutate-env-mouse-up! [m]
+  (reset! rc-env-mouse-up m))
 
 (defn mutate-gui-click-count! []
   (reset! rc-gui-click-count))

(defn on-dom-window-load [e]
  (mutate-dom-viewport-size! (poly/get-viewport-width) (poly/get-viewport-height)))

(defn on-env-mouse-move [mouse]
  (mutate-env-mouse! mouse))

(defn on-env-time-interval []
  (mutate-env-time!))


(defonce setup-event-channels!
  (do
    (swap-event-channel!
     :dom-viewport-resize (poly/channel-for-viewport-resize!))
    (swap-event-channel!
     :env-mouse-down (poly/listen-put! js/window :mouse-down (poly/e-chan)))
    (swap-event-channel!
     :env-mouse-move (poly/channel-for-mouse-move! js/window))
    (swap-event-channel!
     :env-mouse-up (poly/listen-put! js/window :mouse-up (poly/e-chan)))
    true))


