function Layer( config ) {

	/**
	 * model object of THREE.js.
	 *
	 * @type { THREE.Object }
	 */

	this.context = undefined;

	/**
	 * Order index number of the layer in model.
	 *
	 * @type { number }
	 */

	this.layerIndex = undefined;

	/**
	 * The center (x, y, z) coordinates of the layer, related to the model.
	 *
	 * @type { Object } {x: double, y: double, z: double}
	 */

	this.center = undefined;

	/**
	 * last layer in model relative to this layer.
	 *
	 * @type { Layer }
	 */

	this.lastLayer = undefined;

	/**
	 * Store all neural value as an array.
	 * "undefined" means no value.
	 *
	 * @type { double[] }
	 */

	this.neuralValue = undefined;

	/**
     * Important property
     * Shape describes input and output dimensions of the layer.
	 *
	 * @type { Array }
	 */

	this.inputShape = [];
	this.outputShape = [];

	/**
     * Wrapper object represented the layer object in scene.
     * All Three.js objects within the layer should be added to neuralGroup.
	 *
	 * @type { THREE.Object }
	 */

	this.neuralGroup = undefined;

	/**
     * Color of the layer for visualization.
	 *
	 * @type { HEX }
	 */

	this.color = undefined;

	/**
	 * Handler for layer aggregation.
	 *
	 * @type { Object }
	 */

	this.aggregationHandler = undefined;

	/**
	 * Handler for close button.
	 *
	 * @type { Object }
	 */

	this.closeButtonHandler = undefined;

	/**
	 * Config to control whether to show close button.
	 * true -- show close button when layer is open.
	 * false -- never show close button.
	 *
	 * @type { boolean }
	 */

	this.hasCloseButton = true;

	/**
     * Config of close button size.
     * Close button size is multiplied by the ratio number
	 *
	 * @type { number }
	 */

	this.closeButtonSizeRatio = 1;

	/**
	 * Minimum opacity of the layer.
	 *
	 * @type { double } [0, 1]
	 */

	this.minOpacity = undefined;

	/**
	 * Width and height in Three.js scene.
     * actualWidth = unitLength * width
	 * (1d layer and 2d layer do not have actualHeight).
	 *
	 * @type { double }
	 */

	this.actualWidth = undefined;
	this.actualHeight = undefined;

	/**
	 * Depth of the layer object in the scene.
	 *
	 * @type { double }
	 */

	this.actualDepth = undefined;

	/**
	 * Unit length used to render layer object.
	 *
	 * If the layer is not the first layer in model, value is from last layer.
	 * this.unitLength = this.lastLayer.unitLength;
	 *
	 * If layer is the first layer in model, checkout input layer for more information.
	 * this.unitLength = this.actualWidth / this.width;
	 *
	 * @type { double }
	 */

	this.unitLength = undefined;

	/**
	 * Handler for object which is showing text.
	 *
	 * @type { Object }
	 */

	this.textElementHandler = undefined;

	/**
	 * Handler for line group.
	 *
	 * @type { Object }
	 */

	this.lineGroupHandler = undefined;

	/**
	 * Config to control showing text in layer.
	 *
	 * @type { boolean }
	 */

	this.textSystem = undefined;

	/**
	 * Config of whether show relation line or not.
     * true -- show relation lines.
     * false -- do not show relation lines.
	 *
	 * @type { boolean }
	 */

	this.relationSystem = undefined;

	/**
	 * Layer status on whether the layer is expanded or collapsed.
	 * true -- expanded;
	 * false -- collapsed.
	 *
	 * @type { boolean }
	 */

	this.isOpen = undefined;

	/**
     * Config on the speed of layer expansion and collapsion.
	 *
	 * @type { number }
	 */
	
	this.openTime = undefined;
	this.separateTime = undefined;

	/**
     * Whether the layer is a group or not.
	 *
	 * @type { boolean }
	 */

	this.isGroup = false;

	/**
	 * Label to define whether layer need an "output value" from backend model (tfjs, keras, or tf).
	 * For example, YoloGrid can automatically detect the output from last layer,
	 * users do not need to add value for YoloGrid value when they are preprocessing multi-output for the model.
	 *
	 * @type { boolean }
	 */

	this.autoOutputDetect = undefined;

	/**
	 * name of the layer.
	 *
	 * @type { String }
	 */

	this.name = undefined;

	/**
	 * Type of layer, each layer class has a specific layerType.
	 * For example, "Conv2d", "Pooling2d".
	 *
	 * @type { String }
	 */

	this.layerType = undefined;

	/**
	 * The place for Layer in model, measured by y-axis in 3d scene.
	 * For Sequential model:
	 * 		the "layerLevel" will be the same as "layerIndex".
	 * 		the layerLevel will be unique for all layers.
	 * For Functional model:
	 * 		the "layerLevel" may be the same for several layers.
	 * 		these layers has different "layerIndex".
	 *
	 * @type { Int }
	 */

	this.layerLevel = undefined;

	/**
	 * True - layer has closeLayer() method, and this method can be called.
	 * False - layer do not has closeLayer() method, or closeLayer() can not be called.
	 * Default to True.
	 *
	 * @type { boolean }
	 */

	this.closeable = true;

	/**
	 * Layer's initial status, only take effect when layer is closeable.
	 * For example, for input1d layer this attribute will not take effect.
	 *
	 * "open": show all feature maps, or neural lines, or grid lines.
	 * "close": show aggregation when layer is initialized
	 *
	 * @type { String }
	 */

	this.initStatus = "close";

	/**
	 * Whether user directly define the layer shape.
	 * Set "true" if Layer's shape is predefined by user.
	 *
	 * @type { boolean }
	 */

	this.isShapePredefined = false;
	
	this.config = config;
	
	this.isEmissive = false;

	// Load layer config.

	this.loadBasicLayerConfig( config );

}
last layer in model relative to this layer.

@type { Layer }