anchor.diff:  		   (:button . ,button)
   		   (:state . ,state)
   		   (:clicks . ,clicks)
  -		   (:timestamp . ,ts))))
  +		   (:timestamp . ,ts)))
  +	  (collision-hash (make-hash-table :test 'equal)))
  +      
         (map-event (lambda (k v)
  -		   (multiple-value-bind (collisions start ray) (check-intersect (car (children k)) k x y *viewport* *projection*)
  +		   (multiple-value-bind (collisions start ray) 
  +		       (memoized-check-intersect (car (children k)) k x y *viewport* *projection* collision-hash)
   		     (when collisions
   		       (let ((e (acons :ray-start start
   				       (acons :ray ray event))))
  
positive.code: 		  ret)
  	(values ret origin ray)))))
  
  
  (defun draw-inactive (quad text)
     (draw-button quad text
  
negative.code: 			     (when h
  			       (let ((f (gethash k h)))
  				 (when f (funcall f k collisions  (acons :event :mouse-click e)))))))
  			 
  			 (funcall v k collisions (acons :event :mouse-up e)))
  		       (setf *last-mouse-down-target* nil))))
  		 
  		 :mouse-up)
        (when (= button *drag-button*)
  	(map-event (lambda (k v)
  		     (multiple-value-bind (collisions start ray) 
  			 (memoized-check-intersect (car (children k)) k x y *viewport* *projection* collision-hash)
  		       (when (and collisions
  				  (eq *dragging* k))
  			 (funcall v k collisions (acons :event :mouse-drag-drop 
  							(acons :ray-start start
  							       (acons :ray ray event)))))))
  		   :mouse-drag-drop))))
      
  
    ;; (loop for n in *buttons*
    ;;     collect (check-intersect (car (children n)) n x y *viewport* *projection*)))
  