function Cube(){
	var cube;
	return {
		get_cube: function(c){
			var x = c.x || 0;
			var y = c.y || 0;
			var h = c.h || c.height;
			var w = c.w || c.width;
			var d = c.d || c.depth;
			var r = c.r || c.rotation || 0; // Angle of rotation should be in degrees
			
			var scale = 0.7;
			var offset = 20;
			var xoffset = w-(w*scale);
			var yoffset = h-(h*scale);
			
			var faces = [];
			
			faces.push({
			/*
				type: 'rect',
				x: x,
				y: y,
				width: w,
				height: h,
			*/
				type: 'path',
				path: 'M '+x+' '+y+' L '+x+w+' '+y+' L '+x+w+' '+y+h+' L '+x+' '+y+h+' Z',
				stroke: '#FF0000'
			});
			faces.push({
				type: 'rect',
				x: x+xoffset,
				y: y+offset,
				width: w*scale,
				height: h*scale,
			/*
				type: 'path',
				path: 'M '+x-offset+' '+y+offset+' L '+x+w-offset+' '+y+offset+' L '+x+w-offset+' '+y+h+offset+' L '+x-offset+' '+y+h+offset+' Z',
			*/
				stroke: '#00FF00'
			});
			faces.push({
				type: 'path',
				path: 'M '+x+' '+y+' l '+xoffset+' '+yoffset+' Z',
				stroke: '#FFAAAA'
			});
			faces.push({
				type: 'path',
				path: 'M '+x+w+' '+y+' l '+(xoffset-(w-w*scale))+' '+yoffset+' Z',
				stroke: '#FFAAAA'
			});
			faces.push({
				type: 'path',
				path: 'M '+x+w+' '+y+h+' l '+xoffset+' '+yoffset+' Z',
				stroke: '#FFAAAA'
			});
			faces.push({
				type: 'path',
				path: 'M '+x+' '+y+h+' l '+xoffset+' '+yoffset+' Z',
				stroke: '#FFAAAA'
			});

			
			this.cube = Ext.create('Ext.draw.Component',{
				width: 300,
				height: 300,
				gradients: [{
					id: 'grad1',
					angle: 100,
					stops: {
						0: {
							color: '#FFFFFF'
						},
						100: {
							color: '#AAAAAA'
						}
					}
				}],
				items: faces
			});
			
			return this.cube;
		}
	};
}
