(ns buddho.dhamma.graphics
  (:require [buddho.core.meta :as meta]
            [buddho.core.dhamma :as d]
            [buddho.core.state :as s]
            [buddho.core.graphics :as g])
  (:require-macros [buddho.macros.dhamma :refer [defdhamma defconstructor]]))



;; TODO placeholder url goes nowhere
;; (defdhamma create-sprite
;;  "Create a sprite from a URL.
;; The [:create-sprite :url] metadata determines what URL is used."
;;   {:meta [return-field]
;;    :data [sprite-url]
;;    :defaults {:sprite-url "assets/error.png"
;;               :return-field :_latest}
;;    :default-data {:sprite-url "assets/error.png"}
;;    :default-meta {:return-field :_latest}}
;;   (let [sprite (g/make-sprite! sprite-url)]
;;     (g/add-sprite! sprite)
;;     (d/with-return parent :create-sprite
;;       {return-field sprite})))
