---------------------------------------------------------------------------------------
local PREFIX_PATH = "Data/Textures/Scenes/02_Mountain_path/Animation/bg_layer_1/"
---------------------------------------------------------------------------------------
composition_layer_1 = nil
createCompositionMolniya = nil
createCompositionsmoke = nil
---------------------------------------------------------------------------------------
composition_layer_1 = function()
	local compositionBG = CreateCompositionSequence()
	local compositionDuration = 8
	compositionBG:setDuration(compositionDuration)
	compositionBG:setName("composition_layer_1" )
	compositionBG:setBoundingBox( Rectanglef(0, 0, 1366,768) )
 
	local element
	local effector
 
	-- Layer Molniya/1
	element = createCompositionMolniya()
	element:setName("Molniya/1")
	compositionBG:addElement(element)
	element:setHotSpot(683, 384)
	element:setParentElement(compositionBG)
	element:setXY(683, 384)
 
 
	effector = element:getEffector()
	effector:setLifeTime(1.5, 2.375)
	effector:play()
 
 
	-- Layer smoke/2
	element = createCompositionsmoke()
	element:setName("smoke/2")
	compositionBG:addElement(element)
	element:setHotSpot(712, 480)
	element:setParentElement(compositionBG)
	element:setXY(773, 158)
 
	element:setScale(2.93005617977528,2.93005617977528)
	element:setRotationRad(3.14159265)
	element:setOpacity(0.55)
 
	effector = element:getEffector()
	effector:setLifeTime(0, 8)
	effector:play()
 
 
	-- Layer smoke/3
	element = createCompositionsmoke()
	element:setName("smoke/3")
	compositionBG:addElement(element)
	element:setHotSpot(712, 480)
	element:setParentElement(compositionBG)
	element:setXY(289, 52)
 
	element:setScale(2.28838951310861,2.28838951310861)
	element:setRotationRad(3.14159265)
	element:setOpacity(0.55)
 
	effector = element:getEffector()
	effector:setLifeTime(0, 8)
	effector:play()
 
	compositionBG:play()
 
	return compositionBG
end
 
createCompositionMolniya = function()
	local compositionMolniya = CreateCompositionSequence()
	local compositionDuration = 0.875
	compositionMolniya:setDuration(compositionDuration)
	compositionMolniya:setName("compositionMolniya" )
	compositionMolniya:setBoundingBox( Rectanglef(0, 0, 1366,768) )
 
	local element
	local effector
 
	-- Layer white_point.png/1
	element = CreateCompositionElement(PREFIX_PATH.."white_point.png")
	element:setName("white_point.png/1")
	compositionMolniya:addElement(element)
	element:setHotSpot(15.5, 19.5)
	element:setParentElement(compositionMolniya)
	element:setXY(963, 198)
 
	element:setScale(20.0322580645161,16.3333333333333)
					local anim = element
					anim:setBlend(_EBlendModeColorAdd)
 
	effector = element:getEffector()
	effector:setLifeTime(0, 0.875)
	effector:setKey(_TRACK_O, 0.08333333333333, 0)
	effector:setKey(_TRACK_O, 0.125, 0.25)
	effector:setKey(_TRACK_O, 0.41666666666667, 0.15)
	effector:setKey(_TRACK_O, 0.45833333333333, 0)
	effector:play()
 
 
	-- Layer litening_1_a.png/2
	element = CreateCompositionElement(PREFIX_PATH.."litening_1_a.png")
	element:setName("litening_1_a.png/2")
	compositionMolniya:addElement(element)
	element:setHotSpot(38, 45)
	element:setParentElement(compositionMolniya)
	element:setXY(970, 205)
 
	element:setScale(1.43181818181818,1.43181818181818)
 
	effector = element:getEffector()
	effector:setLifeTime(0.20833333333333, 0.45833333333333)
	effector:play()
 
 
	-- Layer litening_1.png/3
	element = CreateCompositionElement(PREFIX_PATH.."litening_1.png")
	element:setName("litening_1.png/3")
	compositionMolniya:addElement(element)
	element:setHotSpot(44, 46)
	element:setParentElement(compositionMolniya)
	element:setXY(957, 207)
 
	element:setScale(1.43181818181818,1.43181818181818)
 
	effector = element:getEffector()
	effector:setLifeTime(0.04166666666667, 0.29166666666667)
	effector:play()
 
 
	-- Layer Light2.png/4
	element = CreateCompositionElement(PREFIX_PATH.."Light2.png")
	element:setName("Light2.png/4")
	compositionMolniya:addElement(element)
	element:setHotSpot(173, 98)
	element:setParentElement(compositionMolniya)
	element:setXY(683, 384)
 
	element:setScale(4,4)
					local anim = element
					anim:setBlend(_EBlendModeColorAdd)
 
	effector = element:getEffector()
	effector:setLifeTime(0, 0.625)
	effector:setKey(_TRACK_O, 0.04166666666667, 0)
	effector:setKey(_TRACK_O, 0.08333333333333, 0.18)
	effector:setKey(_TRACK_O, 0.20833333333333, 0.18)
	effector:setKey(_TRACK_O, 0.25, 0.5)
	effector:setKey(_TRACK_O, 0.45833333333333, 0.5)
	effector:setKey(_TRACK_O, 0.625, 0)
	effector:play()
 
	compositionMolniya:play()
 
	return compositionMolniya
end
 
createCompositionsmoke = function()
	local compositionsmoke = CreateCompositionSequence()
	local compositionDuration = 8
	compositionsmoke:setDuration(compositionDuration)
	compositionsmoke:setName("compositionsmoke" )
	compositionsmoke:setBoundingBox( Rectanglef(0, 0, 1024,768) )
 
	local element
	local effector
 
	-- Layer cloud2.png/1
	element = CreateCompositionElement(PREFIX_PATH.."cloud2.png")
	element:setName("cloud2.png/1")
	compositionsmoke:addElement(element)
	element:setHotSpot(200, 82)
	element:setParentElement(compositionsmoke)
 
	effector = element:getEffector()
	effector:setLifeTime(0, 4)
	effector:setKey(_TRACK_X, 0, 650.992629786471)
	effector:setKey(_TRACK_Y, 0, 489.2544747725)
	effector:setKey(_TRACK_X, 4, 644)
	effector:setKey(_TRACK_Y, 4, 493.5)
	effector:setKey(_TRACK_SX, 0, 0.825)
	effector:setKey(_TRACK_SY, 0, 0.825)
	effector:setKey(_TRACK_SX, 4, 1)
	effector:setKey(_TRACK_SY, 4, 1)
	effector:setKey(_TRACK_O, 0, 0.34090909090909)
	effector:setKey(_TRACK_O, 4, 0)
	effector:play()
 
 
	-- Layer cloud2.png/2
	element = CreateCompositionElement(PREFIX_PATH.."cloud2.png")
	element:setName("cloud2.png/2")
	compositionsmoke:addElement(element)
	element:setHotSpot(200, 82)
	element:setParentElement(compositionsmoke)
 
	effector = element:getEffector()
	effector:setLifeTime(4, 8)
	effector:setKey(_TRACK_X, 4, 658)
	effector:setKey(_TRACK_Y, 4, 485)
	effector:setKey(_TRACK_X, 7.95833333333333, 650.992629786471)
	effector:setKey(_TRACK_Y, 7.95833333333333, 489.2544747725)
	effector:setKey(_TRACK_SX, 4, 0.65)
	effector:setKey(_TRACK_SY, 4, 0.65)
	effector:setKey(_TRACK_SX, 7.95833333333333, 0.825)
	effector:setKey(_TRACK_SY, 7.95833333333333, 0.825)
	effector:setKey(_TRACK_O, 4, 0)
	effector:setKey(_TRACK_O, 6.13334147135417, 0.5)
	effector:setKey(_TRACK_O, 7.95833333333333, 0.34090909090909)
	effector:play()
 
 
	-- Layer cloud2.png/3
	element = CreateCompositionElement(PREFIX_PATH.."cloud2.png")
	element:setName("cloud2.png/3")
	compositionsmoke:addElement(element)
	element:setHotSpot(200, 82)
	element:setParentElement(compositionsmoke)
 
	effector = element:getEffector()
	effector:setLifeTime(0, 8)
	effector:setKey(_TRACK_X, 0, 658)
	effector:setKey(_TRACK_Y, 0, 485)
	effector:setKey(_TRACK_X, 4, 650.992629786471)
	effector:setKey(_TRACK_Y, 4, 489.2544747725)
	effector:setKey(_TRACK_X, 7.95833333333333, 644)
	effector:setKey(_TRACK_Y, 7.95833333333333, 493.5)
	effector:setKey(_TRACK_SX, 0, 0.65)
	effector:setKey(_TRACK_SY, 0, 0.65)
	effector:setKey(_TRACK_SX, 4, 0.825)
	effector:setKey(_TRACK_SY, 4, 0.825)
	effector:setKey(_TRACK_SX, 7.95833333333333, 1)
	effector:setKey(_TRACK_SY, 7.95833333333333, 1)
	effector:setKey(_TRACK_O, 0, 0)
	effector:setKey(_TRACK_O, 2.13334147135417, 0.5)
	effector:setKey(_TRACK_O, 4, 0.34090909090909)
	effector:setKey(_TRACK_O, 7.95833333333333, 0)
	effector:play()
 
	compositionsmoke:play()
 
	return compositionsmoke
end
 
