in-progress map things...
This commit is contained in:
parent
cfe7501fe2
commit
3c54e379d4
10 changed files with 753 additions and 14 deletions
|
|
@ -20,7 +20,6 @@
|
|||
(var cam-pitch -0.2)
|
||||
(var show-debug-ui false)
|
||||
(var fps 0)
|
||||
(var fps-timer 0)
|
||||
(var fps-accumulator 0)
|
||||
(var fps-frame-count 0)
|
||||
|
||||
|
|
@ -174,7 +173,7 @@
|
|||
(pxl8.set_projection (pxl8.mat4_perspective fov aspect 0.1 100.0))))
|
||||
|
||||
(let [target-x (* (math.sin cam-yaw) (math.cos cam-pitch))
|
||||
target-y (* (math.sin cam-pitch))
|
||||
target-y (math.sin cam-pitch)
|
||||
target-z (* (- (math.cos cam-yaw)) (math.cos cam-pitch))
|
||||
look-x (+ cam-x target-x)
|
||||
look-y (+ cam-y target-y)
|
||||
|
|
@ -213,13 +212,13 @@
|
|||
(pxl8.draw_triangle_3d v0 v1 v2 color))))))
|
||||
|
||||
(let [new-state (debug-ui.render {:show-debug-ui show-debug-ui
|
||||
:fps fps
|
||||
:wireframe wireframe
|
||||
:auto-rotate auto-rotate
|
||||
:orthographic orthographic
|
||||
:use-texture use-texture
|
||||
:affine affine
|
||||
:init-texture init-texture})]
|
||||
:fps fps
|
||||
:wireframe wireframe
|
||||
:auto-rotate auto-rotate
|
||||
:orthographic orthographic
|
||||
:use-texture use-texture
|
||||
:affine affine
|
||||
:init-texture init-texture})]
|
||||
(when (not= new-state.show-debug-ui nil) (set show-debug-ui new-state.show-debug-ui))
|
||||
(when (not= new-state.wireframe nil) (set wireframe new-state.wireframe))
|
||||
(when (not= new-state.auto-rotate nil) (set auto-rotate new-state.auto-rotate))
|
||||
|
|
@ -229,5 +228,5 @@
|
|||
(when use-texture (init-texture)))
|
||||
(when (not= new-state.affine nil) (set affine new-state.affine))))
|
||||
|
||||
{: update
|
||||
: frame}
|
||||
{:update update
|
||||
:frame frame}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue