var lightingCamera = { tag: "lightingCamera", components: [
	{
		c: TransformComponent
	},
	{
		c: CameraComponent,
		d: {
			depth: 2,
			clear: true,
			renderToTexture: true,
			blendSrc: 0x0302, //GL.SRC_ALPHA, doesn't work because inline static var
			blendDst: 1, //GL.ONE, doesn't work because inline static var
			renderLayers: [
				LayerDefinitions.LAYER_LIGHTING
			]
		}
	}
]};

var losCamera = { tag: "losCamera", components: [
	{
		c: TransformComponent
	},
	{
		c: CameraComponent,
		d: {
			depth: 3,
			clear: false,
			renderLayers: [
				LayerDefinitions.LAYER_LOS
			]
		}
	}
]};

var inGameUICamera = { tag: "inGameUICamera", components: [
	{
		c: TransformComponent
	},
	{
		c: CameraComponent,
		d: {
			depth: 4,
			clear: false,
			renderLayers: [
				LayerDefinitions.LAYER_IN_GAME_UI
			]
		}
	}
]};

var worldCamera = { tag: "worldCamera", components: [
	{
		c: TransformComponent
	},
	{
		c: CameraComponent,
		d: {
			depth: 0,
			clear: true,
			backgroundColor: 0x000000,
			renderLayers: [
				LayerDefinitions.LAYER_BG,
				LayerDefinitions.LAYER_FLOOR,
				LayerDefinitions.LAYER_FLOOR_OBJECTS,
				LayerDefinitions.LAYER_OBJECTS,
				LayerDefinitions.LAYER_GOONS,
				LayerDefinitions.LAYER_OVERHEAD,
			]
		}
	},
], children: [
	lightingCamera,
	losCamera,
	inGameUICamera,
]};


var uiCamera = { tag: "uiCamera", components: [
	{
		c: TransformComponent,
	},
	{
		c: CameraComponent,
		d: {
			depth: 5,
			clear: false,
			screenProjection: true,
			virtualWidth: 1440,
			virtualHeight: 900,
			renderLayers: [
				LayerDefinitions.LAYER_UI
			]
		}

	}
]};

var cameraRig = { name: "cameraRig", components: [
	{
		c: TransformComponent,
		d: {
			scaleX: 128.0,
			scaleY: 128.0
		}
	},
	{
		c: AudioListenerComponent
	},
	{
		c: PositionLimiterComponent,
		d: {
			minX: -50,
			maxX: 50,
			minY: -50,
			maxY: 50
		}
	},
	{
		c: PointerTrackerComponent,
		d: {
			enabled: true,
			translateOnlyWhenDown: PointerTrackerComponent.MIDDLE,
			translateFactorX: -1,
			translateFactorY: -1,
			scaleFactorX: 1,
			scaleFactorY: 1
		}
	},
	{
		c: CameraControlComponent,
		d: {
			minZoom: 0.5,
			maxZoom: 1,
			referenceZoomDisplayArea: (1440),
			panningRate: 24,
			edgeScrollThresholds: [2, 2, 2, 2],
		}
	},
	{
		c: CameraPannerComponent,
		d: {
			enabled: true,
			timePerTarget: 2,
			targets: null
		}
	},
	{
		c: TweenerComponent,
		d: {
			enabled: false,
			resetOnDisable: false,
			disableOnceFinished: true,
			duration: 1,
			useUnadjustedFrameTime: true
		}
	},
], children: [
	worldCamera,
]};

