Skip to content

Instantly share code, notes, and snippets.

@timsgardner
Created February 7, 2015 21:11
Show Gist options
  • Save timsgardner/0c43e23875084f488253 to your computer and use it in GitHub Desktop.
Save timsgardner/0c43e23875084f488253 to your computer and use it in GitHub Desktop.
cursed cube clump
(defscn cursed-cube-clump
(let [cc (GameObject. "cursed-cube-clump")
n 1000
w 60]
(dotimes [i n]
(let [c (hydrate cubespec)]
(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