         ~@(map #(list 'set! (list '.a %1) %2) pairsyms getters))
         ~'(set! (.now cursor) (- Time/time (.start cursor)))
         ~'(set! (.ratio cursor) 
-                (Mathf/InverseLerp 0.0 (.duration cursor) (.now cursor)))
+                (float (Mathf/InverseLerp 0.0 (.duration cursor) (.now cursor))))
       ~@(map
          #(list 'set! (:get (first %1)) 
             (list (:lerp %2)



(defn pool-report [] 
  (pprint/print-table   (mapv #(do {:pool %1 :stats (stats %2)}) 
    (into '[<>WaitCursor <>TimeLineCursor <>TweenCursor]
      (map (comp :p :pool :pair last) (filter (comp symbol? first) @REGISTRY)))
    (into [<>WaitCursor <>TimeLineCursor <>TweenCursor]
      (map (comp deref resolve :p :pool :pair last) (filter (comp symbol? first) @REGISTRY))))))

(print (pool-report))










(def run true)

(defn hue [^UnityEngine.Material m ^UnityEngine.GameObject o]
  (timeline [
    ;(wait (+ (rand) 0.1))
    (tween {:local 
      {:scale (Vector3. 2.0 2.0 2.0)
       :position (v3+ (.position (.transform o)) 
                      (Vector3. 0.0 2.0 0.0))}} o 1.0 {:in :pow5})
    (tween {:material-color (UnityEngine.Color. (?f) (?f) (?f))} m (float 0.5) {:in :pow3})
    (tween {:local 
      {:scale (Vector3. 1.0 1.0 1.0)
       :position (v3+ (.position (.transform o)) 
                      (Vector3. 0.0 0.0 0.0))}} o (float (rand 0.5)) :pow5)
    
    #(do (hue m o) nil)]))


(defn start-demo [_] 
  (clear-cloned!)
  (dorun (for [x (range 40) 
               z (range 40)
               :let [o (clone! :ball (V* (->v3 x 0 z) 2.0)) ]]
    (hue (.material (.GetComponent o UnityEngine.Renderer)) o))) )

(start-demo nil)


(timeline [ 
(tween 
  {:light {
    :range (float (rand 50))
    :color (color (rand-vec 1.0 1.0 1.0))}} 
    (the lamp) 0.5 :pow4)])

'(ppexpand     (tween {
      :scale (Vector3. 2.0 2.0 2.0)
      :position (v3+ (.position (.transform (the lamp))) 
                     (Vector3. 0.0 2.0 0.0))} (the lamp) 1.0 {:in :pow5}))




(deftype ^:once TimeLineCursor [
  ^:volatile-mutable ^System.Int64    i 
  ^:volatile-mutable ^boolean         v
  ^:volatile-mutable ^System.Single overage])
