Initialize circles with a radius
This commit is contained in:
@@ -110,12 +110,16 @@
|
|||||||
`(u/call! ^ChainShape ~object ~k ~@options))
|
`(u/call! ^ChainShape ~object ~k ~@options))
|
||||||
|
|
||||||
(defn circle*
|
(defn circle*
|
||||||
[]
|
([]
|
||||||
(CircleShape.))
|
(CircleShape.))
|
||||||
|
([radius]
|
||||||
|
(doto (circle*)
|
||||||
|
(.setRadius radius)
|
||||||
|
(.setPosition (m/vector-2 radius radius)))))
|
||||||
|
|
||||||
(defmacro circle
|
(defmacro circle
|
||||||
[& options]
|
[radius & options]
|
||||||
`(u/calls! ^CircleShape (circle*) ~@options))
|
`(u/calls! ^CircleShape (circle* ~radius) ~@options))
|
||||||
|
|
||||||
(defmacro circle!
|
(defmacro circle!
|
||||||
[object k & options]
|
[object k & options]
|
||||||
|
|||||||
Reference in New Issue
Block a user