整理代码
This commit is contained in:
@@ -1,12 +1,11 @@
|
|||||||
--Cool liquid background
|
--Cool liquid background
|
||||||
local gc=love.graphics
|
local gc=love.graphics
|
||||||
local rnd=math.random
|
|
||||||
local back={}
|
local back={}
|
||||||
local shader=SHADER.aura
|
local shader=SHADER.aura
|
||||||
local t
|
local t
|
||||||
|
|
||||||
function back.init()
|
function back.init()
|
||||||
t=rnd()*2600
|
t=math.random()*2600
|
||||||
BG.resize(SCR.w,SCR.h)
|
BG.resize(SCR.w,SCR.h)
|
||||||
end
|
end
|
||||||
function back.resize(_,h)
|
function back.resize(_,h)
|
||||||
|
|||||||
@@ -1,12 +1,11 @@
|
|||||||
--Horizonal red-blue gradient
|
--Horizonal red-blue gradient
|
||||||
local gc=love.graphics
|
local gc=love.graphics
|
||||||
local rnd=math.random
|
|
||||||
local back={}
|
local back={}
|
||||||
local shader=SHADER.grad1
|
local shader=SHADER.grad1
|
||||||
|
|
||||||
local t
|
local t
|
||||||
function back.init()
|
function back.init()
|
||||||
t=rnd()*2600
|
t=math.random()*2600
|
||||||
back.resize()
|
back.resize()
|
||||||
end
|
end
|
||||||
function back.resize()
|
function back.resize()
|
||||||
|
|||||||
@@ -1,12 +1,11 @@
|
|||||||
--Vertical red-green gradient
|
--Vertical red-green gradient
|
||||||
local gc=love.graphics
|
local gc=love.graphics
|
||||||
local rnd=math.random
|
|
||||||
local back={}
|
local back={}
|
||||||
local shader=SHADER.grad2
|
local shader=SHADER.grad2
|
||||||
|
|
||||||
local t
|
local t
|
||||||
function back.init()
|
function back.init()
|
||||||
t=rnd()*2600
|
t=math.random()*2600
|
||||||
BG.resize(nil,SCR.h)
|
BG.resize(nil,SCR.h)
|
||||||
end
|
end
|
||||||
function back.resize(_,h)
|
function back.resize(_,h)
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
--Flash after random time
|
--Flash after random time
|
||||||
local gc=love.graphics
|
local gc=love.graphics
|
||||||
local rnd=math.random
|
|
||||||
local back={}
|
local back={}
|
||||||
|
|
||||||
local t
|
local t
|
||||||
function back.init()
|
function back.init()
|
||||||
t=rnd()*2600
|
t=math.random()*2600
|
||||||
end
|
end
|
||||||
function back.update(dt)
|
function back.update(dt)
|
||||||
t=t+dt
|
t=t+dt
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
--Light-dark
|
--Light-dark
|
||||||
local gc=love.graphics
|
local gc=love.graphics
|
||||||
local rnd,sin=math.random,math.sin
|
local sin=math.sin
|
||||||
local back={}
|
local back={}
|
||||||
|
|
||||||
local t
|
local t
|
||||||
function back.init()
|
function back.init()
|
||||||
t=rnd()*2600
|
t=math.random()*2600
|
||||||
end
|
end
|
||||||
function back.update(dt)
|
function back.update(dt)
|
||||||
t=t+dt
|
t=t+dt
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
--Lightning
|
--Lightning
|
||||||
local gc=love.graphics
|
local gc=love.graphics
|
||||||
local rnd=math.random
|
|
||||||
local back={}
|
local back={}
|
||||||
|
|
||||||
local t
|
local t
|
||||||
function back.init()
|
function back.init()
|
||||||
t=rnd()*2600
|
t=math.random()*2600
|
||||||
end
|
end
|
||||||
function back.update(dt)
|
function back.update(dt)
|
||||||
t=t+dt
|
t=t+dt
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
--Black-White grid
|
--Black-White grid
|
||||||
local gc=love.graphics
|
local gc=love.graphics
|
||||||
local rnd,sin=math.random,math.sin
|
local sin=math.sin
|
||||||
local ceil=math.ceil
|
local ceil=math.ceil
|
||||||
local back={}
|
local back={}
|
||||||
|
|
||||||
local t
|
local t
|
||||||
local matrixT={}for i=1,50 do matrixT[i]={}for j=1,50 do matrixT[i][j]=love.math.noise(i,j)+2 end end
|
local matrixT={}for i=1,50 do matrixT[i]={}for j=1,50 do matrixT[i][j]=love.math.noise(i,j)+2 end end
|
||||||
function back.init()
|
function back.init()
|
||||||
t=rnd()*2600
|
t=math.random()*2600
|
||||||
end
|
end
|
||||||
function back.update(dt)
|
function back.update(dt)
|
||||||
t=t+dt
|
t=t+dt
|
||||||
|
|||||||
@@ -1,12 +1,11 @@
|
|||||||
--Colorful RGB
|
--Colorful RGB
|
||||||
local gc=love.graphics
|
local gc=love.graphics
|
||||||
local rnd=math.random
|
|
||||||
local back={}
|
local back={}
|
||||||
local shader=SHADER.rgb1
|
local shader=SHADER.rgb1
|
||||||
|
|
||||||
local t
|
local t
|
||||||
function back.init()
|
function back.init()
|
||||||
t=rnd()*2600
|
t=math.random()*2600
|
||||||
BG.resize(SCR.w,SCR.h)
|
BG.resize(SCR.w,SCR.h)
|
||||||
end
|
end
|
||||||
function back.resize(_,h)
|
function back.resize(_,h)
|
||||||
|
|||||||
@@ -1,12 +1,11 @@
|
|||||||
--Blue RGB
|
--Blue RGB
|
||||||
local gc=love.graphics
|
local gc=love.graphics
|
||||||
local rnd=math.random
|
|
||||||
local back={}
|
local back={}
|
||||||
local shader=SHADER.rgb2
|
local shader=SHADER.rgb2
|
||||||
|
|
||||||
local t
|
local t
|
||||||
function back.init()
|
function back.init()
|
||||||
t=rnd()*2600
|
t=math.random()*2600
|
||||||
BG.resize(SCR.w,SCR.h)
|
BG.resize(SCR.w,SCR.h)
|
||||||
end
|
end
|
||||||
function back.resize(_,h)
|
function back.resize(_,h)
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
--Changing pure color
|
--Changing pure color
|
||||||
local gc=love.graphics
|
local gc=love.graphics
|
||||||
local rnd,sin=math.random,math.sin
|
local sin=math.sin
|
||||||
local back={}
|
local back={}
|
||||||
|
|
||||||
local t
|
local t
|
||||||
function back.init()
|
function back.init()
|
||||||
t=rnd()*2600
|
t=math.random()*2600
|
||||||
end
|
end
|
||||||
function back.update(dt)
|
function back.update(dt)
|
||||||
t=t+dt
|
t=t+dt
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
--Welcome to Techmino
|
--Welcome to Techmino
|
||||||
local gc=love.graphics
|
local gc=love.graphics
|
||||||
local rnd,sin=math.random,math.sin
|
local sin=math.sin
|
||||||
local back={}
|
local back={}
|
||||||
|
|
||||||
local t
|
local t
|
||||||
local txt
|
local txt
|
||||||
function back.init()
|
function back.init()
|
||||||
t=rnd()*2600
|
t=math.random()*2600
|
||||||
txt=gc.newText(getFont(80),"Welcome To Techmino")
|
txt=gc.newText(getFont(80),"Welcome To Techmino")
|
||||||
end
|
end
|
||||||
function back.update(dt)
|
function back.update(dt)
|
||||||
|
|||||||
Reference in New Issue
Block a user