Created
January 21, 2015 15:29
-
-
Save sirkitree/d0bb00d1b42e885385ec to your computer and use it in GitHub Desktop.
coordinate generator
This file contains 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
var points = []; | |
var x = y = z = this.constraint; | |
var constraintDecrement = this.constraint * -1; | |
for (var x = this.constraint; x >= constraintDecrement; x--) { | |
points.push({ | |
'pos': {'x' : x, 'y' : y, 'z' : z} | |
}); | |
for (var y = this.constraint; y > constraintDecrement; y--) { | |
points.push({ | |
'pos': {'x' : x, 'y' : y, 'z' : z} | |
}); | |
for (var z = this.constraint; z > constraintDecrement; z--) { | |
points.push({ | |
'pos': {'x' : x, 'y' : y, 'z' : z} | |
}); | |
}; | |
}; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@justafish created a much faster version here: https://gist.github.com/justafish/096f46baedc2487deafe