     [cloj.resources.html    :as rmhtml]
 
     [cloj.math.misc         :refer [cos-01 log-base-n ceil floor num-digits]]
-    [cloj.math.vec2         :as v2 :refer [v2]]
+    [cloj.math.vec2         :as v2 :refer [vec2]]
     [cloj.math.vec3         :as v3 :refer [vec3]]
 
     [cloj.system            :refer [get-resource-manager

            (->>
              (<! spr-chan)
              (mapcat  (fn [i]
                         (let [img      (rman/img i)
                               spr-list ((rman/id i) sprs) ]
                           (map (fn [ [id & dims ] ] [id (mk-spr img id dims)] ) spr-list  ))))
              (into {}))))
    ret-chan))

(defn mk-spr-printer [spr-seq])


(do
  (def system (mk-system "game" "game-canvas"))

  (let [rman (get-resource-manager system)
        rend (get-render-engine system)
        spr-ch (load-sprs rman spr-data) ]

    (go
      (let [sprs (<! spr-ch)]
        (println "loaded")
        )
      )


    
    )
  
  
  )

;;; }}}


  (reduce (fn [m v]
            (assoc m v (k->file-name v))) {} spr-keys))


(defn load-sprs [rman sprs]
  (let [spr-chan (->> (map #(rman/load-img! rman % (k->file-name  %)) (keys sprs) )
                      (async/merge)
                      (async/into ()))
        ret-chan (chan) ]
