(torus-3d-init game)

Source

(defn torus-3d-init [game] (gl game enable (gl game CULL_FACE)) (gl game enable (gl game DEPTH_TEST)) (let [entity (shape-entity game (primitives/torus {:radius 20, :thickness 5, :radial-subdivisions 20, :body-subdivisions 20})) 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)))