---------------------------------------------------------------------------------------
local PREFIX_PATH = "Data/Textures/Scenes/Clock/Animations/portal/"
---------------------------------------------------------------------------------------
createCompositionone = nil
createCompositionone_rotation = nil
createCompositionportal = nil
createCompositionPortal1 = nil
createCompositionthree = nil
createCompositiontwo = nil
createCompositiontwo_rotation = nil
---------------------------------------------------------------------------------------
createCompositionone = function()
	local compositionone = CreateCompositionSequence()
	local compositionDuration = 2
	compositionone:setDuration(compositionDuration)
	compositionone:setName("compositionone" )
 
	local element
	local effector
 
	-- Layer BG_00191_00191_00191.png/1
	element = CreateCompositionElement(PREFIX_PATH.."BG_00191_00191_00191.png")
	element:setName("BG_00191_00191_00191.png/1")
	compositionone:addElement(element)
	element:setHotSpot(356, 351)
	element:setParentElement(compositionone)
	element:setXY(632, 383)
 
	element:setRotationRad(3.14159265)
 
	effector = element:getEffector()
	effector:setLifeTime(0, 2)
	effector:setKey(_TRACK_SX, 0, 0.6)
	effector:setKey(_TRACK_SY, 0, 0.6)
	effector:setKey(_TRACK_SX, 1.95833333333333, 1)
	effector:setKey(_TRACK_SY, 1.95833333333333, 1)
	effector:setKey(_TRACK_O, 0, 0)
	effector:setKey(_TRACK_O, 1.95833333333333, 0.9)
	effector:play()
 
	compositionone:play()
 
	return compositionone
end
 
createCompositionone_rotation = function()
	local compositionone_rotation = CreateCompositionSequence()
	local compositionDuration = 8
	compositionone_rotation:setDuration(compositionDuration)
	compositionone_rotation:setName("compositionone_rotation" )
 
	local element
	local effector
 
	-- Layer one/1
	element = createCompositionone()
	element:setName("one/1")
	compositionone_rotation:addElement(element)
	element:setHotSpot(638, 376)
	element:setParentElement(compositionone_rotation)
	element:setXY(638, 376)
 
	element:setRotationRad(4.68771678141361)
 
	effector = element:getEffector()
	effector:setLifeTime(0, 2)
	effector:play()
 
 
	-- Layer one/2
	element = createCompositionone()
	element:setName("one/2")
	compositionone_rotation:addElement(element)
	element:setHotSpot(638, 376)
	element:setParentElement(compositionone_rotation)
	element:setXY(638, 376)
 
	element:setRotationRad(4.68771678141361)
 
	effector = element:getEffector()
	effector:setLifeTime(2, 4)
	effector:play()
 
 
	-- Layer one/3
	element = createCompositionone()
	element:setName("one/3")
	compositionone_rotation:addElement(element)
	element:setHotSpot(638, 376)
	element:setParentElement(compositionone_rotation)
	element:setXY(638, 376)
 
	element:setRotationRad(4.68771678141361)
 
	effector = element:getEffector()
	effector:setLifeTime(4, 6)
	effector:play()
 
 
	-- Layer one/4
	element = createCompositionone()
	element:setName("one/4")
	compositionone_rotation:addElement(element)
	element:setHotSpot(638, 376)
	element:setParentElement(compositionone_rotation)
	element:setXY(638, 376)
 
	element:setRotationRad(4.68771678141361)
 
	effector = element:getEffector()
	effector:setLifeTime(6, 8)
	effector:play()
 
	compositionone_rotation:play()
 
	return compositionone_rotation
end
 
createCompositionportal = function()
	local compositionportal = CreateCompositionSequence()
	local compositionDuration = 8
	compositionportal:setDuration(compositionDuration)
	compositionportal:setName("compositionportal" )
 
	local element
	local effector
 
	-- Layer one_rotation/1
	element = createCompositionone_rotation()
	element:setName("one_rotation/1")
	compositionportal:addElement(element)
	element:setHotSpot(638, 376)
	element:setParentElement(compositionportal)
	element:setXY(638, 376)
 
 
	effector = element:getEffector()
	effector:setLifeTime(0, 8)
	effector:setKey(_TRACK_A, 0, 3.14159265)
	effector:setKey(_TRACK_A, 7.95833333333333, 9.42477795)
	effector:play()
 
 
	-- Layer two_rotation/2
	element = createCompositiontwo_rotation()
	element:setName("two_rotation/2")
	compositionportal:addElement(element)
	element:setHotSpot(638, 376)
	element:setParentElement(compositionportal)
	element:setXY(638, 376)
 
 
	effector = element:getEffector()
	effector:setLifeTime(0, 8)
	effector:setKey(_TRACK_A, 0, 3.14159265)
	effector:setKey(_TRACK_A, 7.95833333333333, 9.42477795)
	effector:play()
 
 
	-- Layer three/3
	element = createCompositionthree()
	element:setName("three/3")
	compositionportal:addElement(element)
	element:setHotSpot(638, 376)
	element:setParentElement(compositionportal)
	element:setXY(638, 376)
 
 
	effector = element:getEffector()
	effector:setLifeTime(0, 8)
	effector:setKey(_TRACK_A, 0, 0)
	effector:setKey(_TRACK_A, 7.95833333333333, 6.2831853)
	effector:play()
 
	compositionportal:play()
 
	return compositionportal
end
 
createCompositionPortal1 = function()
	local compositionPortal1 = CreateCompositionSequence()
	local compositionDuration = 8
	compositionPortal1:setDuration(compositionDuration)
	compositionPortal1:setName("compositionPortal1" )
	compositionPortal1:setBoundingBox( Rectanglef(0, 0, 1276,752) )
 
	local element
	local effector
 
	-- Layer portal/1
	element = createCompositionportal()
	element:setName("portal/1")
	compositionPortal1:addElement(element)
	element:setHotSpot(638, 376)
	element:setParentElement(compositionPortal1)
	element:setXY(638, 376)
 
	element:setScale(0.8,0.8)
	element:setOpacity(0.7)
 
	effector = element:getEffector()
	effector:setLifeTime(0, 8)
	effector:play()
 
	compositionPortal1:play()
 
	return compositionPortal1
end
 
createCompositionthree = function()
	local compositionthree = CreateCompositionSequence()
	local compositionDuration = 8
	compositionthree:setDuration(compositionDuration)
	compositionthree:setName("compositionthree" )
 
	local element
	local effector
 
	-- Layer BG_00191_00191_00191.png/1
	element = CreateCompositionElement(PREFIX_PATH.."BG_00191_00191_00191.png")
	element:setName("BG_00191_00191_00191.png/1")
	compositionthree:addElement(element)
	element:setHotSpot(356, 351)
	element:setParentElement(compositionthree)
	element:setXY(632, 383)
 
	element:setOpacity(0.3)
 
	effector = element:getEffector()
	effector:setLifeTime(0, 8)
	effector:setKey(_TRACK_A, 0, 0)
	effector:setKey(_TRACK_A, 7.95833333333333, 6.2831853)
	effector:play()
 
	compositionthree:play()
 
	return compositionthree
end
 
createCompositiontwo = function()
	local compositiontwo = CreateCompositionSequence()
	local compositionDuration = 2
	compositiontwo:setDuration(compositionDuration)
	compositiontwo:setName("compositiontwo" )
 
	local element
	local effector
 
	-- Layer BG_00191_00191_00191.png/1
	element = CreateCompositionElement(PREFIX_PATH.."BG_00191_00191_00191.png")
	element:setName("BG_00191_00191_00191.png/1")
	compositiontwo:addElement(element)
	element:setHotSpot(356, 351)
	element:setParentElement(compositiontwo)
	element:setXY(632, 383)
 
	element:setRotationRad(3.14159265)
 
	effector = element:getEffector()
	effector:setLifeTime(0, 2)
	effector:setKey(_TRACK_SX, 0, 1)
	effector:setKey(_TRACK_SY, 0, 1)
	effector:setKey(_TRACK_SX, 1.95833333333333, 1.4)
	effector:setKey(_TRACK_SY, 1.95833333333333, 1.4)
	effector:setKey(_TRACK_O, 0, 0.9)
	effector:setKey(_TRACK_O, 1.95833333333333, 0)
	effector:play()
 
	compositiontwo:play()
 
	return compositiontwo
end
 
createCompositiontwo_rotation = function()
	local compositiontwo_rotation = CreateCompositionSequence()
	local compositionDuration = 8
	compositiontwo_rotation:setDuration(compositionDuration)
	compositiontwo_rotation:setName("compositiontwo_rotation" )
 
	local element
	local effector
 
	-- Layer two/1
	element = createCompositiontwo()
	element:setName("two/1")
	compositiontwo_rotation:addElement(element)
	element:setHotSpot(638, 376)
	element:setParentElement(compositiontwo_rotation)
	element:setXY(638, 376)
 
	element:setRotationRad(4.68771678141361)
 
	effector = element:getEffector()
	effector:setLifeTime(6, 8)
	effector:play()
 
 
	-- Layer two/2
	element = createCompositiontwo()
	element:setName("two/2")
	compositiontwo_rotation:addElement(element)
	element:setHotSpot(638, 376)
	element:setParentElement(compositiontwo_rotation)
	element:setXY(638, 376)
 
	element:setRotationRad(4.68771678141361)
 
	effector = element:getEffector()
	effector:setLifeTime(4, 6)
	effector:play()
 
 
	-- Layer two/3
	element = createCompositiontwo()
	element:setName("two/3")
	compositiontwo_rotation:addElement(element)
	element:setHotSpot(638, 376)
	element:setParentElement(compositiontwo_rotation)
	element:setXY(638, 376)
 
	element:setRotationRad(4.68771678141361)
 
	effector = element:getEffector()
	effector:setLifeTime(2, 4)
	effector:play()
 
 
	-- Layer two/4
	element = createCompositiontwo()
	element:setName("two/4")
	compositiontwo_rotation:addElement(element)
	element:setHotSpot(638, 376)
	element:setParentElement(compositiontwo_rotation)
	element:setXY(638, 376)
 
	element:setRotationRad(4.68771678141361)
 
	effector = element:getEffector()
	effector:setLifeTime(0, 2)
	effector:play()
 
	compositiontwo_rotation:play()
 
	return compositiontwo_rotation
end
 
