Created
October 12, 2014 14:06
-
-
Save nicebarbarian/3185f381f2071f8fcc14 to your computer and use it in GitHub Desktop.
framer.js: collection grid
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
rows = 3 | |
cols = 3 | |
gutter = 16 | |
width = 96 | |
height = 96 | |
for rowIndex in [0..rows-1] | |
for colIndex in [0..cols-1] | |
cellLayer = new Layer | |
width: width | |
height: height | |
x: colIndex * (width + gutter) | |
y: rowIndex * (height + gutter) | |
Utils.labelLayer cellLayer, "#{rowIndex}:#{colIndex}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment