Skip to content

Instantly share code, notes, and snippets.

@nicebarbarian
Created October 12, 2014 14:06
Show Gist options
  • Save nicebarbarian/3185f381f2071f8fcc14 to your computer and use it in GitHub Desktop.
Save nicebarbarian/3185f381f2071f8fcc14 to your computer and use it in GitHub Desktop.
framer.js: collection grid
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