Add joint! macro
This commit is contained in:
@@ -93,6 +93,10 @@
|
|||||||
`(let [object# (~(joint-init k))]
|
`(let [object# (~(joint-init k))]
|
||||||
(u/fields! object# ~@options)))
|
(u/fields! object# ~@options)))
|
||||||
|
|
||||||
|
(defmacro joint!
|
||||||
|
[object k & options]
|
||||||
|
`(u/call! ^Joint ~object ~k ~@options))
|
||||||
|
|
||||||
(defn create-joint!*
|
(defn create-joint!*
|
||||||
[screen j-def]
|
[screen j-def]
|
||||||
(box-2d! screen :create-joint j-def))
|
(box-2d! screen :create-joint j-def))
|
||||||
@@ -110,6 +114,10 @@
|
|||||||
(u/fields! object# ~@options)
|
(u/fields! object# ~@options)
|
||||||
object#))
|
object#))
|
||||||
|
|
||||||
|
(defmacro fixture!
|
||||||
|
[object k & options]
|
||||||
|
`(u/call! ^Fixture ~object ~k ~@options))
|
||||||
|
|
||||||
; shapes
|
; shapes
|
||||||
|
|
||||||
(defn chain*
|
(defn chain*
|
||||||
@@ -170,10 +178,6 @@
|
|||||||
[object k & options]
|
[object k & options]
|
||||||
`(u/call! ^Contact ~object ~k ~@options))
|
`(u/call! ^Contact ~object ~k ~@options))
|
||||||
|
|
||||||
(defmacro fixture!
|
|
||||||
[object k & options]
|
|
||||||
`(u/call! ^Fixture ~object ~k ~@options))
|
|
||||||
|
|
||||||
(defn find-body
|
(defn find-body
|
||||||
[body entities]
|
[body entities]
|
||||||
(some #(if (= body (:body %)) %) entities))
|
(some #(if (= body (:body %)) %) entities))
|
||||||
|
|||||||
Reference in New Issue
Block a user