Skip to content

Instantly share code, notes, and snippets.

@timsgardner
Created February 7, 2015 21:12
Show Gist options
  • Select an option

  • Save timsgardner/37d9b60e6d580cc38b8b to your computer and use it in GitHub Desktop.

Select an option

Save timsgardner/37d9b60e6d580cc38b8b to your computer and use it in GitHub Desktop.
cube-clump
(defscn cube-clump
(let [cc (GameObject. "cube-clump")
n 1000
w 60]
(dotimes [i n]
(let [c (create-primitive :cube)]
(set! (.parent (transform c)) (transform cc))
(set! (.localScale (transform c))
(v3 1 1 (+ (/ i w) (mod i w))))
(set! (.localPosition (transform c))
(v3
(int (/ i w))
(mod i w)
0))))
cc))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment