-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path@DeveloperTool.anm
More file actions
126 lines (112 loc) · 2.76 KB
/
@DeveloperTool.anm
File metadata and controls
126 lines (112 loc) · 2.76 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
--[[このスクリプトはあくまで個人用です。そのため多少の機能不足はご了承願いますようお願いいたします]]--
--------------------------------------------------
@CustomColor
--------------------------------------------------
--track0:R,0,255,0,1
--track1:G,0,255,0,1
--track2:B,0,255,0,1
--track3:memory,1,100,1,1
--check0:表示,1
--dialog:Alpha追加(配列四番目)/chk,chkAlpha=0;Alpha数値(0~255),A=0;memory上書き可/chk,ckMemoryOvWrite=0;16進数へ変換/chk,ck16decimal=1;
local R=obj.track0
local G=obj.track1
local B=obj.track2
local memory=obj.track3
local ckDisplay=obj.check0
local tmp={}
display="TEST"
-- 16進数変換
if(obj.check0) then
if(chkAlpha==1) then
local result="16進数に変換する場合、Alphaは追加できません。設定を見直してください。"
else
local result=RGB(R,G,B)
end
else
local result={}
result[0]=R
result[1]=G
result[2]=B
display=string.format("R:%s, G:%s, B:%s",result[0],result[1],result[2])
if(chkAlpha==1) then
result[3]=A
display=string.format("%s, A:%s",display,result[3])
end
end
-- WriteMemory
if(DT==nil) then
DT={}
end
if(DT["CustomColor"][memory]==nil) then
DT["CustomColor"][memory]=result
else
if(ckMemoryOvWrite==1) then
DT["CustomColor"][memory]=result
else
display=string.format("%s \n(warning:NotOverWriteMemory[メモリーを上書してません。もし心当たりがなければ再度確認してください。])",display)
end
end
-- 表示
if(ckDisplay==1) then
obj.effect()
obj.load(display)
end
display=nil
--------------------------------------------------
@補色変換グラデーション
--------------------------------------------------
--track0:R,0,255,0,1
--track1:G,0,255,0,1
--track2:B,0,255,0,1
--track3:角度,-1280,1280,130
--check0:表示,1
--dialog:中心x,centerX=0;中心y,centerY=0;幅,width=300;
local R=obj.track0
local G=obj.track1
local B=obj.track2
local angle=obj.track3
if(obj.check0) then
local reR,reG,reB=255-R,255-G,255-B
local col=string.format("0x%02x%02x%02x",R,G,B)
local reCol=string.format("0x%02x%02x%02x",reR,reG,reB)
obj.effect(
"グラデーション",
"強さ",100,
"中心X",centerX,
"中心Y",centerY,
"角度",angle,
"幅",width,
"color",col,
"color2",reCol)
end
--------------------------------------------------
@VariableCoordinate
--------------------------------------------------
--track0:X,-9999,9999,0,0.01
--track1:Y,-9999,9999,0,0.01
--track2:Z,-9999,9999,0,0.01
--track3:格納場所,1,100,1,1
--check0:格納実行,0;
--dialog:XYのみにする/chk,local isxyonly=0;追加実行/chk,local isadd=0;
local x,y,z=obj.track0,obj.track1,obj.track2
local div=obj.track3
VC = VC or {}
local tmp = {}
if(isadd==1) then tmp = VC[div] or {} end
if(isxyonly==1) then
if(isadd==1)then
table.insert(tmp,x)
table.insert(tmp,y)
else
tmp={x,y}
end
else
if(isadd==1)then
table.insert(tmp,x)
table.insert(tmp,y)
table.insert(tmp,z)
else
tmp={x,y,z}
end
end
VC[div] = tmp