diff options
| author | Jules Laplace <jules@okfoc.us> | 2014-06-03 16:24:10 -0400 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2014-06-03 16:24:28 -0400 |
| commit | 607f69c67a5b4dc72d2754192e3cdf67d0ad11d0 (patch) | |
| tree | 6556e7922c5bedb274bb1650e5dd100643a7895d /client/assets/javascripts/environments/tableaux/columns_circle.js | |
| parent | d31259291d807c851de4396921e0c26b6dd8dce2 (diff) | |
partitioning client and serveR
Diffstat (limited to 'client/assets/javascripts/environments/tableaux/columns_circle.js')
| -rw-r--r-- | client/assets/javascripts/environments/tableaux/columns_circle.js | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/client/assets/javascripts/environments/tableaux/columns_circle.js b/client/assets/javascripts/environments/tableaux/columns_circle.js new file mode 100644 index 0000000..1816e51 --- /dev/null +++ b/client/assets/javascripts/environments/tableaux/columns_circle.js @@ -0,0 +1,42 @@ +MX.Tableaux.ColumnsCircle = MX.Tableau.extend({ + + init: function (opt) { + + this.opt = opt = defaults(opt, { + width: 10, + height: 10, + depth: 10, + radius: 10, + theta: 0, + skip: 0, + x: 0, + y: 0, + z: 0, + rotationY: 0, + rotationX: 0, + scale: 1, + count: 3, + }) + + var scalebox, theta + var radius = opt.radius + + for (var i = opt.skip; i < opt.count; i++) { + theta = i/opt.count * TWO_PI + opt.theta + scalebox = new MX.ScaleBox({ + "width": opt.width, + "height": opt.height, + "depth": opt.depth, + "x": opt.x + sin(theta) * radius, + "y": opt.y, + "z": opt.z + cos(theta) * radius, + "rotationY": PI - theta, + "color": opt.color, + "sides": "top bottom left right front back" + }); + scene.add(scalebox) + } + + } + +}) |
