+ attempt at blur text transtion but my braincells are dying
This commit is contained in:
parent
9ca655400b
commit
afaf4e6a07
|
@ -8,6 +8,7 @@ local enterFlareBlueImage = gfx.CreateSkinImage("gameplay/track_end/flares/blue_
|
|||
local enterFlarePinkImage = gfx.CreateSkinImage("gameplay/track_end/flares/pink_transition_flare.png", 0)
|
||||
|
||||
local trackCompImage = gfx.CreateSkinImage("gameplay/track_end/track_comp.png", 0)
|
||||
local trackCompBlurImage = gfx.CreateSkinImage("gameplay/track_end/track_comp_blur.png", 0)
|
||||
|
||||
local particleRedBall = gfx.CreateSkinImage("gameplay/track_end/particles/red_ball.png", 0)
|
||||
local particleRedRing = gfx.CreateSkinImage("gameplay/track_end/particles/red_ring.png", 0)
|
||||
|
@ -24,6 +25,8 @@ local outroTransitionGlobalAlpha = 0;
|
|||
local outroTransitionEnterFlareX = -1920;
|
||||
|
||||
local outroTransitionTextCutX = 0;
|
||||
local outroTransitionTextAlpha = 1;
|
||||
local outroTransitionTextBlurAlpha = 0;
|
||||
|
||||
local outroTransitionParticleRedX = -500;
|
||||
|
||||
|
@ -34,7 +37,7 @@ local outroTransitionParticleSmallYellowRingCX = 1080;
|
|||
|
||||
local tickTransitions = function (deltaTime)
|
||||
if outroTransitionScale < 1 then
|
||||
outroTransitionScale = outroTransitionScale + deltaTime / 3.5 -- transition should last for that time in seconds
|
||||
outroTransitionScale = outroTransitionScale + deltaTime / 15 -- transition should last for that time in seconds
|
||||
else
|
||||
outroTransitionScale = 1
|
||||
end
|
||||
|
@ -57,25 +60,35 @@ local tickTransitions = function (deltaTime)
|
|||
|
||||
outroTransitionParticleRedX = math.min(1080+150, (
|
||||
particleTransitionScale*
|
||||
(1080+150) -- reveal this amount during the transition (the whole width)
|
||||
)-500); -- start from -500 (off-screen)
|
||||
(1080+150)
|
||||
)-500);
|
||||
|
||||
outroTransitionParticleSmallRainbowX = math.max(-1080-250, (
|
||||
particleTransitionScale*
|
||||
(-1080-250) -- reveal this amount during the transition (the whole width)
|
||||
)+1080); -- start from 1080+500 (off-screen)
|
||||
(-1080-250)
|
||||
)+1080);
|
||||
outroTransitionParticleSmallYellowRingAX = math.max(-1080+0, (
|
||||
particleTransitionScale*
|
||||
(-1080+0) -- reveal this amount during the transition (the whole width)
|
||||
)+1080); -- start from 1080+500 (off-screen)
|
||||
(-1080+0)
|
||||
)+1080);
|
||||
outroTransitionParticleSmallYellowRingBX = math.max(-1080+250, (
|
||||
particleTransitionScale*
|
||||
(-1080+250) -- reveal this amount during the transition (the whole width)
|
||||
)+1080); -- start from 1080+500 (off-screen)
|
||||
(-1080+250)
|
||||
)+1080);
|
||||
outroTransitionParticleSmallYellowRingCX = math.max(-1080+200, (
|
||||
particleTransitionScale*
|
||||
(-1080+200) -- reveal this amount during the transition (the whole width)
|
||||
)+1080); -- start from 1080+500 (off-screen)
|
||||
(-1080+200)
|
||||
)+1080);
|
||||
|
||||
-- if (outroTransitionScale > 0.45 and outroTransitionScale < 0.5) then
|
||||
-- if (outroTransitionScale <= 0.475) then
|
||||
-- outroTransitionTextAlpha = 1-(0.5*((outroTransitionScale-0.45)/0.075))
|
||||
-- else
|
||||
-- outroTransitionTextAlpha = 0.5+0.5*((outroTransitionScale-0.475)/0.075)
|
||||
-- end
|
||||
-- else
|
||||
-- outroTransitionTextAlpha = 1;
|
||||
-- end
|
||||
end
|
||||
|
||||
local drawParticles = function ()
|
||||
|
@ -215,6 +228,7 @@ local render = function (deltaTime)
|
|||
|
||||
gfx.BeginPath();
|
||||
gfx.Scissor(0, 530, outroTransitionTextCutX, 1920)
|
||||
gfx.GlobalAlpha(outroTransitionTextAlpha);
|
||||
gfx.ImageRect(
|
||||
0,
|
||||
680,
|
||||
|
@ -224,6 +238,7 @@ local render = function (deltaTime)
|
|||
1,
|
||||
0
|
||||
);
|
||||
gfx.GlobalAlpha(outroTransitionGlobalAlpha);
|
||||
gfx.ResetScissor();
|
||||
|
||||
-- Get the banner downscaled in whatever resolution it is, while maintaining the aspect ratio
|
||||
|
|
Loading…
Reference in New Issue