{"size": 1216, "ext": "js", "max_stars_repo_path": "js/fx/palette.js", "max_stars_repo_name": "stefanRitter/fuse10", "max_stars_repo_stars_event_min_datetime": "2015-02-09T00:48:52.000Z", "max_stars_repo_stars_event_max_datetime": "2020-11-23T03:56:27.000Z", "max_issues_repo_path": "js/fx/palette.js", "max_issues_repo_name": "stefanRitter/fuse10", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "js/fx/palette.js", "max_forks_repo_name": "stefanRitter/fuse10", "max_forks_repo_forks_event_min_datetime": "2015-05-16T22:41:03.000Z", "max_forks_repo_forks_event_max_datetime": "2021-05-03T08:25:07.000Z"}
{"max_stars_count": 50, "max_issues_count": null, "max_forks_count": 16, "avg_line_length": 19.9344262295, "max_line_length": 71, "alphanum_fraction": 0.5690789474}
Acko.Effect.Palette = function () {
  Acko.Effect.call(this);

  this.order = 0;
  this.group = null;
}

Acko.Effect.Palette.prototype = _.extend(new Acko.Effect(), {

  build: function (exports) {
    var scene = exports.scene;

    var group = this.group = new THREE.Object3D();
    scene.add(group);

    var colors = [];
    for (i in Acko.Palette) {
      colors = colors.concat(Acko.Palette[i]);
    }

    var geometry = new THREE.CubeGeometry(1, 1, 1);

    var n = colors.length;
    var sz = 30;
    var x = -sz * n / 2;

    for (var i = 0; i < n; ++i) {
      var material = new THREE.MeshPhongMaterial({ color: colors[i] });
      var mesh = new THREE.Mesh(geometry, material);

      mesh.scale.x = sz;
      mesh.scale.y = sz;
      mesh.scale.z = sz;

      mesh.position.x = x;
      mesh.position.y = -200;
      mesh.position.z = 300;

      mesh.rotation.y = τ * .2;

      x += sz;

      var dir = this.dir = new THREE.DirectionalLight(0xffffff, .15);
      dir.position.set(1, 1.5, 1.3);
      group.add(dir);

      group.add(mesh);
    }

    scene.add(group);
  },

  update: function (exports) {
  },

  resize: function (exports) {
  },

});

Acko.Effects.push(new Acko.Effect.Palette());