--track0:サイズ,0,800,30,0.1
--track1:凸幅,0,100,10,1
--track2:表示時間,0,100,0.5,0.1
--track3:表示間隔,0.01,100,0.2,0.01
--dialog:マスク形状/fig,local mfig="円";位置ズレX,local xx=5;位置ズレY,local yy=5;縦横比[-100-100],local asp=25;凸高さ,local dkw=0.5;ぼかし量,local bl=3;速度誤差,local rsd=3;乱数の種,local sd=100;
--■変数---------------------------------------------------------------------------------------
sz =obj.track0
dkh =obj.track1
life =obj.track2
gap =obj.track3
gap =math.max(0.1,gap)
num =math.ceil((obj.totaltime-life)/gap)
if(mfig=="四角形")then
mtyp=2
mnme=""
elseif(mfig=="三角形")then
mtyp=3
mnme=""
elseif(mfig=="五角形")then
mtyp=4
mnme=""
elseif(mfig=="六角形")then
mtyp=5
mnme=""
elseif(mfig=="星型")then
mtyp=6
mnme=""
elseif(mfig=="円")then
mtyp=1
mnme=""
else
mtyp=1
mnme=mfig
end
--■関数---------------------------------------------------------------------------------------
local function drp(ox,oy,al,asr)
obj.load("tempbuffer")
obj.effect("マスク","X",ox,"Y",oy,"サイズ",sz,"縦横比",asp+asr,"ぼかし",bl,"type",mtyp,"name",mnme,"マスクの反転", 0)
-- obj.effect("凸エッジ","幅",dkh,"高さ",dkw,"角度",180)
-- obj.effect("ぼかし","範囲",bl,"縦横比",-100)
obj.effect()
obj.draw(xx,yy,0,al)
end
--▼描画処理----------------------------------------------------------------------------------
ww =obj.screen_w/2
hh =obj.screen_h
obj.draw()
obj.copybuffer("tmp","obj")
for ii=1 ,num do
rd1 =obj.rand(1,20,ii,1)/10
rd2 =obj.rand(1,30,ii,1)/10
rd3 =math.max(0,obj.rand(-300,50,ii)/10)
rd4 =obj.rand(-10,10,ii,1)
ox =obj.rand(-ww,ww,ii,sd)+rd3
disp =(obj.time-ii*gap)/(life+rd2)
oy =-hh/2+hh*disp^rd1
if(0<=disp and disp<=1)then
al=1
else
al=0
end
drp(ox,oy,al,rd4)
end
最終更新:2013年02月25日 01:17