(balls-3d-init game)

Source

(defn balls-3d-init [game] (gl game enable (gl game CULL_FACE)) (gl game enable (gl game DEPTH_TEST)) (let [entity (shape-entity game (primitives/sphere {:radius 10, :subdivisions-axis 48, :subdivisions-height 24})) 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)))