(defn
planes-3d-init
[game]
(gl game enable (gl game CULL_FACE))
(gl game enable (gl game DEPTH_TEST))
(let
[entity
(shape-entity
game
(primitives/plane
{:width 20,
:depth 20,
:subdivisions-width 10,
:subdivisions-height 10}))
objects
(vec
(for
[i (range 50)]
{:tz (rand 150),
:rx (rand (* 2 (math PI))),
:ry (rand (math PI)),
:mat-uniforms
{:u_color [(rand) (rand) (rand) 1],
:u_specular [1 1 1 1],
:u_shininess (rand 500),
:u_specularFactor (rand 1)}}))]
(assoc game :entity entity :objects objects)))