把几个pi常量换回数字(性能原因)

This commit is contained in:
MrZ_26
2023-10-06 03:40:28 +08:00
parent 3cd6f3d726
commit 2208a0fca0
3 changed files with 4 additions and 4 deletions

View File

@@ -115,7 +115,7 @@ function scene.draw()
end
elseif state==1 then
gc.setColor(.2,.7,.4,math.min((60-ct)/10,ct/10)*.8)
gc.arc('fill',640,360,260,math.pi/2,math.pi/2+(ct/60)*MATH.tau)
gc.arc('fill',640,360,260,-1.5708,-1.5708+(ct/60)*6.2832)
elseif state==2 and ct<5 then
gc.setColor(1,ct>2 and 1 or 0,0)
gc.rectangle('fill',640-100,(up and 180 or 540)-100,200,200,10)

View File

@@ -135,7 +135,7 @@ function scene.draw()
if M.list then
GC.setColor(1,1,1,t*6)
GC.arc('line','open',0,0,rad+6,0,(M.sel/#M.list)*MATH.tau)
GC.arc('line','open',0,0,rad+6,0,(M.sel/#M.list)*6.2832)
end
GC.pop()
end

View File

@@ -18,9 +18,9 @@ function scene.draw()
local b=math.floor(t*2)%16+1
gc.setShader(SHADER.blockSatur)
gc.setColor(1,1,1)
mDraw(SKIN.lib[SETTING.skinSet][b],0,0,t%MATH.tau,2)
mDraw(SKIN.lib[SETTING.skinSet][b],0,0,t%6.2832,2)
gc.setColor(1,1,1,t*2%1)
mDraw(SKIN.lib[SETTING.skinSet][b%16+1],0,0,t%MATH.tau,2)
mDraw(SKIN.lib[SETTING.skinSet][b%16+1],0,0,t%6.2832,2)
gc.setShader()
-- Draw center