Merge branch 'kamn-master'
This commit is contained in:
@@ -169,9 +169,9 @@ camera will be set."
|
|||||||
([object x-val y-val]
|
([object x-val y-val]
|
||||||
(position! object x-val y-val nil))
|
(position! object x-val y-val nil))
|
||||||
([object x-val y-val z-val]
|
([object x-val y-val z-val]
|
||||||
(when x-val (x! object x-val))
|
(some->> x-val (x! object))
|
||||||
(when y-val (y! object y-val))
|
(some->> y-val (y! object))
|
||||||
(when z-val (z! object z-val))))
|
(some->> z-val (z! object))))
|
||||||
|
|
||||||
(defn direction
|
(defn direction
|
||||||
"Returns the direction of the camera in `screen`."
|
"Returns the direction of the camera in `screen`."
|
||||||
@@ -181,9 +181,24 @@ camera will be set."
|
|||||||
|
|
||||||
(defn direction!
|
(defn direction!
|
||||||
"Sets the direction of the camera in `screen`."
|
"Sets the direction of the camera in `screen`."
|
||||||
[screen x y z]
|
[screen x-val y-val z-val]
|
||||||
(let [^Camera camera (u/get-obj screen :camera)]
|
(let [^Camera camera (u/get-obj screen :camera)]
|
||||||
(.lookAt camera x y z)
|
(.lookAt camera x-val y-val z-val)
|
||||||
|
(.update camera)))
|
||||||
|
|
||||||
|
(defn up [screen]
|
||||||
|
"Returns the up vector of the camera in `screen`."
|
||||||
|
(let [^Camera camera (u/get-obj screen :camera)]
|
||||||
|
(. camera up)))
|
||||||
|
|
||||||
|
(defn up!
|
||||||
|
"Sets the up vector of the camera in `screen`."
|
||||||
|
[screen x-val y-val z-val]
|
||||||
|
(let [^Camera camera (u/get-obj screen :camera)
|
||||||
|
^Vector3 up-vec (up screen)]
|
||||||
|
(some->> x-val (x! up-vec))
|
||||||
|
(some->> y-val (y! up-vec))
|
||||||
|
(some->> z-val (z! up-vec))
|
||||||
(.update camera)))
|
(.update camera)))
|
||||||
|
|
||||||
(defn near
|
(defn near
|
||||||
|
|||||||
Reference in New Issue
Block a user