{"size": 896, "ext": "js", "max_stars_repo_path": "sprites.js", "max_stars_repo_name": "brendankenny/armilla", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "sprites.js", "max_issues_repo_name": "brendankenny/armilla", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "sprites.js", "max_forks_repo_name": "brendankenny/armilla", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 24.8888888889, "max_line_length": 84, "alphanum_fraction": 0.5870535714}
/* global Matrix4x4 */

var QUAD_GEOMETRY = new Float32Array([
  0, 0, 0, 1,
  1, 1, 0, 1,
  0, 1, 0, 1,
  0, 0, 0, 1,
  1, 0, 0, 1,
  1, 1, 0, 1
]);

function generateTestGeometry(count) {
  var testGeometry = new Float32Array(count * 6 * 6);

  var transform = new Matrix4x4();
  for (var i = 0; i < count; i++) {
    var theta = i / count * 2 * Math.PI;

    transform.identity()
      .rotateY(theta)
      .translate(0, 0, 0.9)
      .scaleUniform(0.2)
      .translate(0, -0.5, 0);

    for (var j = 0; j < QUAD_GEOMETRY.length / 4; j++) {
      // add transformed world coordinate and texture coordinate
      var destOffset = i * 6 * 6 + j * 6;
      transform.transformOffsetVec4(testGeometry, destOffset, QUAD_GEOMETRY, j * 4);
      testGeometry[destOffset + 4] = QUAD_GEOMETRY[j * 4];
      testGeometry[destOffset + 5] = QUAD_GEOMETRY[j * 4 + 1];
    }
  }

  return testGeometry;
}
