Created
February 7, 2015 21:12
-
-
Save timsgardner/37d9b60e6d580cc38b8b to your computer and use it in GitHub Desktop.
cube-clump
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (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