---------------------------------------------------------------------------------------
local PREFIX_PATH = "Data/Textures/Scenes/01_Boat_crash_site/Anim/Z_Net/"
---------------------------------------------------------------------------------------
createCompositionbg = nil
createCompositionderganie = nil
---------------------------------------------------------------------------------------
createCompositionbg = function()
	local compositionbg = CreateCompositionSequence()
	local compositionDuration = 8
	compositionbg:setDuration(compositionDuration)
	compositionbg:setName("compositionbg" )
	compositionbg:setBoundingBox( Rectanglef(0, 0, 384,512) )
 
	local element
	local effector
 
	-- Layer provolka.png/1
	element = CreateCompositionElement(PREFIX_PATH.."provolka.png")
	element:setName("provolka.png/1")
	compositionbg:addElement(element)
	element:setHotSpot(81, 6)
	element:setParentElement(compositionbg)
	element:setXY(283.5, 50.5)
 
	element:setRotationRad(0.00973059220901)
 
	effector = element:getEffector()
	effector:setLifeTime(0.375, 8)
	effector:play()
 
 
	-- Layer setka.png/2
	element = CreateCompositionElement(PREFIX_PATH.."setka.png")
	element:setName("setka.png/2")
	compositionbg:addElement(element)
	element:setHotSpot(192, 487)
	element:setParentElement(compositionbg)
	element:setXY(192, 512)
 
 
	effector = element:getEffector()
	effector:setLifeTime(0.375, 8)
	effector:play()
 
 
	-- Layer derganie/3
	element = createCompositionderganie()
	element:setName("derganie/3")
	compositionbg:addElement(element)
	element:setHotSpot(192, 256)
	element:setParentElement(compositionbg)
	element:setXY(192, 256)
 
 
	effector = element:getEffector()
	effector:setLifeTime(0, 0.375)
	effector:play()
 
 
	-- Layer bg.jpg/4
	element = CreateCompositionElement(PREFIX_PATH.."bg.jpg")
	element:setName("bg.jpg/4")
	compositionbg:addElement(element)
	element:setHotSpot(192, 256)
	element:setParentElement(compositionbg)
	element:setXY(192, 256)
 
 
	effector = element:getEffector()
	effector:setLifeTime(0, 8)
	effector:play()
 
	compositionbg:play()
 
	return compositionbg
end
 
createCompositionderganie = function()
	local compositionderganie = CreateCompositionSequence()
	local compositionDuration = 0.375
	compositionderganie:setDuration(compositionDuration)
	compositionderganie:setName("compositionderganie" )
	compositionderganie:setBoundingBox( Rectanglef(0, 0, 384,512) )
 
	local element
	local effector
 
	-- Layer provolka.png/1
	element = CreateCompositionElement(PREFIX_PATH.."provolka.png")
	element:setName("provolka.png/1")
	compositionderganie:addElement(element)
	element:setHotSpot(81, 6)
	element:setParentElement(compositionderganie)
 
	effector = element:getEffector()
	effector:setLifeTime(0, 0.375)
	effector:setKey(_TRACK_X, 0, 283.5)
	effector:setKey(_TRACK_Y, 0, 50.5)
	effector:setKey(_TRACK_X, 0.08333333333333, 285.5)
	effector:setKey(_TRACK_Y, 0.08333333333333, 53.5)
	effector:setKey(_TRACK_X, 0.16666666666667, 283.5)
	effector:setKey(_TRACK_Y, 0.16666666666667, 50.5)
	effector:setKey(_TRACK_X, 0.25, 283.5)
	effector:setKey(_TRACK_Y, 0.25, 50.5)
	effector:setKey(_TRACK_X, 0.33333333333333, 283.5)
	effector:setKey(_TRACK_Y, 0.33333333333333, 50.5)
	effector:setKey(_TRACK_SX, 0, 1)
	effector:setKey(_TRACK_SY, 0, 1)
	effector:setKey(_TRACK_SX, 0.08333333333333, 1.05997447085239)
	effector:setKey(_TRACK_SY, 0.08333333333333, 1.02582255330157)
	effector:setKey(_TRACK_SX, 0.16666666666667, 1)
	effector:setKey(_TRACK_SY, 0.16666666666667, 1)
	effector:setKey(_TRACK_SX, 0.25, 1.05997447085239)
	effector:setKey(_TRACK_SY, 0.25, 1.02582255330157)
	effector:setKey(_TRACK_SX, 0.33333333333333, 1)
	effector:setKey(_TRACK_SY, 0.33333333333333, 1)
	effector:setKey(_TRACK_A, 0, 0)
	effector:setKey(_TRACK_A, 0.08333333333333, 0.13944698093818)
	effector:setKey(_TRACK_A, 0.16666666666667, 0.07798763185333)
	effector:setKey(_TRACK_A, 0.25, -0.03085332737441)
	effector:setKey(_TRACK_A, 0.33333333333333, 0.00973059220901)
	effector:play()
 
 
	-- Layer setka.png/2
	element = CreateCompositionElement(PREFIX_PATH.."setka.png")
	element:setName("setka.png/2")
	compositionderganie:addElement(element)
	element:setHotSpot(192, 487)
	element:setParentElement(compositionderganie)
	element:setXY(192, 512)
 
 
	effector = element:getEffector()
	effector:setLifeTime(0, 0.375)
	effector:setKey(_TRACK_SX, 0, 1)
	effector:setKey(_TRACK_SY, 0, 1)
	effector:setKey(_TRACK_SX, 0.08333333333333, 1.00000000933825)
	effector:setKey(_TRACK_SY, 0.08333333333333, 0.98973306594185)
	effector:setKey(_TRACK_SX, 0.14286295572917, 1.00000000842463)
	effector:setKey(_TRACK_SY, 0.14286295572917, 0.99310986880823)
	effector:setKey(_TRACK_SX, 0.28572591145833, 1.00000000354411)
	effector:setKey(_TRACK_SY, 0.28572591145833, 0.9992352778392)
	effector:setKey(_TRACK_SX, 0.33333333333333, 1)
	effector:setKey(_TRACK_SY, 0.33333333333333, 1)
	effector:play()
 
	compositionderganie:play()
 
	return compositionderganie
end
 
