From 5761f7f54332879ca01a08078624afdd5927b938 Mon Sep 17 00:00:00 2001 From: MrZ_26 <1046101471@qq.com> Date: Mon, 12 Dec 2022 11:37:05 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4galaxy=E5=92=8Cquarks?= =?UTF-8?q?=E8=83=8C=E6=99=AF=E7=9A=84=E7=B2=92=E5=AD=90=E9=A2=9C=E8=89=B2?= =?UTF-8?q?=EF=BC=8C=E4=B8=8D=E5=BD=B1=E5=93=8D=E6=B8=B8=E6=88=8F=E7=94=BB?= =?UTF-8?q?=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/backgrounds/galaxy.lua | 6 +++--- parts/backgrounds/quarks.lua | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/parts/backgrounds/galaxy.lua b/parts/backgrounds/galaxy.lua index 21c3f8a1..da1f2280 100644 --- a/parts/backgrounds/galaxy.lua +++ b/parts/backgrounds/galaxy.lua @@ -30,11 +30,11 @@ function back.draw() for i=1,#sDist do local d,r=sDist[i],sRev[i] if d<5 then - setColor(hsv(.088,(d-2)/7,1,.7)) + setColor(hsv(.088,(d-2)/7,1,.2)) else - setColor(hsv(.572,d/70+.1,(22-d)/12,.7)) + setColor(hsv(.572,d/70+.1,(22-d)/12,.2)) end - circle('fill',8*d*cos(r),24*d*sin(r),3) + circle('fill',8*d*cos(r),24*d*sin(r),5) end end diff --git a/parts/backgrounds/quarks.lua b/parts/backgrounds/quarks.lua index eef2d265..2159d677 100644 --- a/parts/backgrounds/quarks.lua +++ b/parts/backgrounds/quarks.lua @@ -1,13 +1,13 @@ local gc=love.graphics local hsv=COLOR.hsv local circle,push,pop,rot,translate,setColor=gc.circle,gc.push,gc.pop,gc.rotate,gc.translate,gc.setColor -local rnd,sin,cos,log,ceil=math.random,math.sin,math.cos,math.log,math.ceil +local rnd,sin,cos,log=math.random,math.sin,math.cos,math.log local back={} local qX,qY,qdX,qdY={},{},{},{} -- quark data in SoA [size, X, Y, dx, dy, color] -local ptcclr={{1,0,0},{0,1,0},{0,0,1}} -local apcclr={{0,1,1},{1,0,1},{1,1,0}} +local ptcclr={{1,0,0,.5},{0,1,0,.5},{0,0,1,.5}} +local apcclr={{0,1,1,.5},{1,0,1,.5},{1,1,0,.5}} local blasts={} -- data about annihilation blasts from particles and antiparticles colliding local ptc={} -- particle-antiparticle data (antiparticle is a mirror of particle) @@ -115,9 +115,9 @@ function back.draw() translate(-10,-10) -- Draw quarks in R/G/B - setColor(1,0,0,.8) for i=1, math.floor(quarkCount/3) do circle('fill',qX[i],qY[i],size) end - setColor(0,1,0,.8) for i=math.floor(quarkCount/3)+1, math.floor(quarkCount*2/3) do circle('fill',qX[i],qY[i],size) end - setColor(0,0,1,.8) for i=math.floor(quarkCount*2/3)+1,quarkCount do circle('fill',qX[i],qY[i],size) end + setColor(1,0,0,.5) for i=1, math.floor(quarkCount/3) do circle('fill',qX[i],qY[i],size) end + setColor(0,1,0,.5) for i=math.floor(quarkCount/3)+1, math.floor(quarkCount*2/3) do circle('fill',qX[i],qY[i],size) end + setColor(0,0,1,.5) for i=math.floor(quarkCount*2/3)+1,quarkCount do circle('fill',qX[i],qY[i],size) end for i=1,#ptc do local p=ptc[i]