Hi,

Can someone give me pointers on using monet?

I'm trying to get to know Clojurescript. Just cloned cljs-start and put in 
dependencies and changes that I hope will work for monet 
https://github.com/rm-hull/monet
But I get this when compiling 

WARNING: Wrong number of args (2) passed to monet.canvas/add-entity at line 17 
/Users/boz/dev/clojure/cljs-start-001/src/cljs/cljs_start_001/core.cljs



Here's the code in cljs_start_001/core.cljs. It's basically just a copy from 
the monet README.md...

(ns cljs-start-001.core
  (:require [monet.canvas :as canvas]))

(canvas/add-entity :background
                   (canvas/entity {:x 0 :y 0 :w 600 :h 600}
                                  nil ;;update function
                                  (fn [ctx box]
                                    (-> ctx
                                        (canvas/fill-style "#191d21")
                                        (canvas/rect box)))))
(canvas/init (.get ($ :#canvas) 0))



monet's add-entity looks like this....

(defn add-entity [mc k ent]
  (aset (:entities mc) k ent))

But I have no idea what mc k and ent are supposed to be.

Thanks!
,boz

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/clojurescript.

Reply via email to