{"size": 1380, "ext": "js", "max_stars_repo_path": "lathe/js/demos/orange-box.js", "max_stars_repo_name": "razh/experiments-three.js", "max_stars_repo_stars_event_min_datetime": "2015-04-01T08:27:39.000Z", "max_stars_repo_stars_event_max_datetime": "2017-04-23T02:06:05.000Z", "max_issues_repo_path": "lathe/js/demos/orange-box.js", "max_issues_repo_name": "razh/experiments-three.js", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "lathe/js/demos/orange-box.js", "max_forks_repo_name": "razh/experiments-three.js", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 2, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 30.6666666667, "max_line_length": 91, "alphanum_fraction": 0.6152173913}
const tileSize = 16

const orange = defaultColor('orange')
const grey = defaultColor('lightgrey')

const alignBottom = align('ny')

const empty = () => new THREE.Geometry()

const tile = () => _([tileSize, 1, tileSize], alignBottom)
const orangeTile = () => orange(tile())
const greyTile = () => grey(tile())

const boxLarge = () => _([tileSize, tileSize, tileSize], alignBottom);
const orangeBoxLarge = () => orange(boxLarge())
const greyBoxLarge = () => grey(boxLarge())

const boxMedium = () => _([0.5 * tileSize, 0.5 * tileSize, 0.5 * tileSize], alignBottom);
const orangeBoxMedium = () => orange(boxMedium())
const greyBoxMedium = () => grey(boxMedium())

const boxSmall = () => _([0.25 * tileSize, 0.25 * tileSize, 0.25 * tileSize], alignBottom);
const orangeBoxSmall = () => orange(boxSmall())
const greyBoxSmall = () => grey(boxSmall())

return [
  [
    $$([
      greyBoxLarge(),
      _(greyBoxMedium(), ty(tileSize)),
      _(greyBoxSmall(), ty(1.5 * tileSize)),
    ]),
    orangeBoxLarge(),
    $$([orangeTile(), _(orangeBoxMedium(), tx(0.2 * tileSize))]),
  ],
  [greyTile(), greyTile(), $$([orangeTile(), _(orangeBoxSmall(), tx(0.3 * tileSize))])],
  [empty(), greyTile(), orangeTile()],
]
  .map((row, rowIndex) =>
    row.map((geometry, colIndex) =>
      t(colIndex * tileSize, 0, rowIndex * tileSize)(geometry),
    ),
  )
  .reduce((a, b) => a.concat(b), [])
