-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path@CycleAffect.anm
More file actions
190 lines (148 loc) · 6.75 KB
/
@CycleAffect.anm
File metadata and controls
190 lines (148 loc) · 6.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
--[[
◇ CycleAffect ◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇
なんかばーっとでてばーっと戻るようなスクリプトが作りたかった。
円形配置の上位版みたいなあれです。なんかすごいです(語彙力皆無)
個別オブジェクトのテキストや図形などに設定してください。
基本的にはOptionsとセットで使います。
OptionsはCycleAffect本体より上に設定してください。
◆機能説明
=== CycleAffect (本体) ==========
・Size: 円形配置するサイズです。
・角度幅: 適用する角度を指定します。
個別オブジェクトの角度をしていしてエフェクトをかけたりします。
・追加角度: 円形配置の全体を回転させます。
・変化角度: 角度幅で指定した幅を回転させます。
簡易ルーピングにチェックすると、端との計算ができていませんが
簡易的にループさせることができます。
・簡易ルーピング: 簡易的にループさせることができます。計算が不十分なのでうまくできていませんが...
・Options使用: Optionを使用するときは必ずチェックを入れてください。
このチェックがないと正常に動作しません。
・単色化, 単色化の色: 適応幅内を単色化します。
きちんと指定角度から幅内にフェードするようにしています。
・変化率(0~100%)[Opiton時上書き]: 円形配置から通常のテキストは一の変化度です。
93氏のTA円形配置を参考にさせて頂きました。
・透明化, 変化透明率(0~100%)[Opiton時上書き]: 適応していない部分を透明にします。
変化透明率は透明に変化する度合いです。
・拡大化, 変化拡大率(-100~100%): 適応していない部分を拡大、縮小します。
変化拡大率は拡大する度合いです。
・ぼかし[0-2], ぼかし度: 適応していない部分をぼかします。
1で「ぼかし」、2で「レンズブラー」を指定します
ぼかし度はぼかす度合いです。
・サイズ差分[Opiton時上書き]: 適応外のサイズを設定します。
Sizeからその分引く形になります。
ダイアログ欄に『"all"』と入力すると、Sizeが指定されます。(中心に設定される)
・Obj回転[0-2]: 個別オブジェクトごとに回転させます。
0は回転なし、1は通常回転、2は変化ごとに回転させます。
=== Options ======================
・変化率%: 本体の「変化率(0~100%)」をトラックバーに対応したものです。
・透明変化率: 本体の「変化透明率(0~100%)」をトラックバーに対応したものです。
・size差分: 本体の「サイズ差分」をトラックバーに対応したものです。
1を指定すると自動的に『"all"』が入力されます。
・拡大変化率: 本体の「変化拡大率(0~100%)」をトラックバーに対応したものです。
・影響なしの色, ↑の色: 適応していない部分を単色化します。
基本的には本体の「単色化の色」と同じです。
・個別回転加算: オブジェクトの回転角度を加算します。
本体の「オブジェクトごとに回転」が無効になっている場合は使用できません。
・反対も同時影響: 円形配置の反対側も影響を受けます。(一部環境でバグが発生する可能性があります。ご了承くださいませ。)
◆ 更新履歴
ver1.01
- 簡易的なルーピング機能を付与
また、Optionにぼかし度を拡大変化率を変更。
ver1.00
- 正式に配布開始。
ver0.12
- Optionsを追加。本体の一部機能をTrackbarに対応した。
ver0.11
- 適応幅を追加した。特定の角度で発生するバグを修正。
ver0.10
- 本体を作成。角度ごとに単色化させることに成功した。
◆ その他
||| Developed by Aodaruma (Twitter:@Aodaruma_)
||| Last Edit: 22:09 2016/11/19
]]--
--------------------------------------------------------------------
@CycleAffect
--------------------------------------------------------------------
--track0:Size,0,2500,500
--track1:角度幅,0,1280,30
--track2:追加角度,-720,720,0
--track3:変化角度,-1280,1280,0
--check0:簡易ルーピング,0
--dialog:Options使用/chk,local isUseoption=0;単色化/chk,local isColm=1;単色化の色/col,local colmCol=0xF4DEB0;変化率(0~100%),local aff=100;透明化/chk,local isAlp=1;変化透明率(0~100%),local alpr=100;拡大化/chk,local isZooming=0;変化拡大率(-100~100%),local zooming=100;ぼかし[0-2],local isBlur=0; ぼかし度,local blur=5;サイズ差分,local dis=100;Obj回転[0-2],local isrotate=1;
local tx,ty=obj.ox, obj.oy
local num=obj.num
local r=obj.track0
local dif=obj.track1
local angr=obj.track3%360
local ang=obj.track2
local af,uf,x,y,alp,rz,d,tmp
local l="layer"..obj.layer
local fx,fy=obj.getvalue("x"),obj.getvalue("y")
local addrz=0
local isOpp=0
if(isUseoption==1) then
if(type(CA)=="table" and type(CA[l])=="table") then
aff=CA[l].af
alpr=CA[l].alpr
dis=CA[l].dis
zooming=CA[l].zoom
colmCol2=CA[l].colmCol
addrz=CA[l].addrz
isOpp=CA[l].isopp
end
end
if(type(dis)=="string") then if(dis=="all") then dis=r end end
d=(360/num)*obj.index+ang
rz=d+90+addrz
zooming=1-(zooming/100)
if( (angr+dif)>d and (angr-dif)<d ) then
af=1-math.abs(d-angr)/dif
uf=1-af
if(isColm==1 and colmCol2~=nil) then obj.effect("単色化","color",colmCol2, "輝度を保持する",0, "強さ",uf*100*(aff/100)) end
if(isColm==1) then obj.effect("単色化","color",colmCol, "輝度を保持する",0, "強さ",af*100*(aff/100)) end
if(isBlur==1) then obj.effect("ぼかし", "範囲",uf*blur*(aff/100)) elseif(isBlur==2) then obj.effect("レンズブラー", "範囲",uf*blur*(aff/100)) end
elseif( isOpp==1 and (angr+dif)+180>d+180 and (angr-dif)+180<d+180 ) then
af=1-math.abs((d+180)+(angr+180))/dif
uf=1-af
if(isColm==1 and colmCol2~=nil) then obj.effect("単色化","color",colmCol2, "輝度を保持する",0, "強さ",uf*100*(aff/100)) end
if(isColm==1) then obj.effect("単色化","color",colmCol, "輝度を保持する",0, "強さ",af*100*(aff/100)) end
if(isBlur==1) then obj.effect("ぼかし", "範囲",uf*blur*(aff/100)) elseif(isBlur==2) then obj.effect("レンズブラー", "範囲",uf*blur*(aff/100)) end
else
af=0
if(isColm==1 and colmCol2~=nil) then obj.effect("単色化","color",colmCol2, "輝度を保持する",0, "強さ",100*(aff/100)) end
if(isBlur==1) then obj.effect("ぼかし", "範囲",blur*(aff/100)) elseif(isBlur==2) then obj.effect("レンズブラー", "範囲",blur*(aff/100)) end
uf=1-af
end
x, y=
math.cos(math.rad(d))*r*af +math.cos(math.rad(d))*(r-dis)*uf,
math.sin(math.rad(d))*r*af +math.sin(math.rad(d))*(r-dis)*uf
if(isAlp==1) then alp=af*obj.alpha*(alpr/100)+obj.alpha*(1-alpr/100) else alp=1 end
if(isZooming==1) then obj.zoom=obj.zoom*zooming*af*(aff/100) +obj.zoom*(1-aff/100) end
obj.ox, obj.oy, obj.alpha=
x*(aff/100)+tx*(1-aff/100),
y*(aff/100)+ty*(1-aff/100),
alp*(aff/100)+obj.alpha*(1-aff/100)
if(isrotate==1) then obj.rz=rz*(aff/100)+obj.rz end
if(isrotate==2) then obj.rz=rz*(aff/100)*af+obj.rz end
--------------------------------------------------------------------
@Options
--------------------------------------------------------------------
--track0:変化率%,0,100,100
--track1:透明変化率,0,100,100
--track2:size差分,-1,2000,200,1
--track3:拡大変化率,-100,100,0
--dialog:影響なしの色/chk,local isColm=0;↑の色/col,local colmCol=0xcc333f;個別回転加算,local adrz=0;反対も同時影響/chk,local isOpp=0;
local l="layer"..obj.layer
local sizedif=obj.track2
if(type(CA)~="table") then CA={} end
if(isColm==1) then colm=colmCol else colm=nil end
if(sizedif==-1) then sizedif="all" end
CA[l]={
af=obj.track0,
alpr=obj.track1,
dis=sizedif,
zoom=obj.track3,
colmCol=colm,
addrz=adrz,
isopp=isOpp
}