summaryrefslogtreecommitdiff
path: root/public/assets/javascripts/environments/tableaux/columns.js
blob: e961315eac7e35d0ca8c2c1dd20916fe257c75b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
MX.Tableaux.Columns = MX.Tableau.extend({

	init: function (opt) {

		this.opt = opt = defaults(opt, {
			width: 10,
			height: 10,
			depth: 10,
			x: 0,
			y: 0,
			z: 0,
			rotationY: 0,
			rotationX: 0,
			scale: 1,
			count: 3,
			spacingX: 0,
			spacingZ: 100,
		})
		
		for (var i = 0; i < opt.count; i++) {
			var scalebox = new MX.ScaleBox({
				"width": opt.width,
				"height": opt.height,
				"depth": opt.depth,
				"x": opt.x + opt.spacingX * i,
				"y": opt.y,
				"z": opt.z + opt.spacingZ * i,
				"color": opt.color,
				"sides": "top bottom left right front back"
			});
			scene.add(scalebox)
		}

	}
	
})