@@ -59,6 +59,12 @@ new Dialog({
59
59
let brightLight = 0 ;
60
60
let lightAngle = 360 ;
61
61
let lockRotation = token . data . lockRotation ;
62
+ let lightAnimation = token . data . lightAnimation ;
63
+ let lightAlpha = token . data . lightAlpha ;
64
+ let lightColor = token . data . lightColor ;
65
+ const colorFire = "#f8c377" ;
66
+ const colorWhite = "#ffffff" ;
67
+ const colorMoonGlow = "#f4f1c9" ;
62
68
// Get Vision Type Values
63
69
switch ( visionType ) {
64
70
case "dim0" :
@@ -103,47 +109,73 @@ new Dialog({
103
109
case "none" :
104
110
dimLight = 0 ;
105
111
brightLight = 0 ;
112
+ lightAnimation = { type : "none" } ;
106
113
break ;
107
114
case "candle" :
108
115
dimLight = 10 ;
109
116
brightLight = 5 ;
117
+ lightAnimation = { type : "torch" , speed : 2 , intensity : 2 } ;
118
+ lightColor = colorFire ;
119
+ lightAlpha = 0.15 ;
110
120
break ;
111
121
case "lamp" :
112
122
dimLight = 45 ;
113
123
brightLight = 15 ;
124
+ lightAnimation = { type : "torch" , speed : 2 , intensity : 2 } ;
125
+ lightColor = colorFire ;
126
+ lightAlpha = 0.15 ;
114
127
break ;
115
128
case "bullseye" :
116
129
dimLight = 120 ;
117
130
brightLight = 60 ;
118
131
lockRotation = false ;
119
132
lightAngle = 52.5 ;
133
+ lightAnimation = { type : "torch" , speed : 2 , intensity : 2 } ;
134
+ lightColor = colorFire ;
135
+ lightAlpha = 0.15 ;
120
136
break ;
121
137
case "hooded-dim" :
122
138
dimLight = 5 ;
123
139
brightLight = 0 ;
140
+ lightAnimation = { type : "torch" , speed : 2 , intensity : 2 } ;
141
+ lightColor = colorFire ;
142
+ lightAlpha = 0.15 ;
124
143
break ;
125
144
case "hooded-bright" :
126
145
dimLight = 60 ;
127
146
brightLight = 30 ;
147
+ lightAnimation = { type : "torch" , speed : 2 , intensity : 2 } ;
148
+ lightColor = colorFire ;
149
+ lightAlpha = 0.15 ;
128
150
break ;
129
151
case "light" :
130
152
dimLight = 40 ;
131
153
brightLight = 20 ;
154
+ lightAnimation = { type : "none" } ;
155
+ lightColor = colorWhite ;
132
156
break ;
133
157
case "torch" :
134
158
dimLight = 40 ;
135
159
brightLight = 20 ;
160
+ lightAnimation = { type : "torch" , speed : 2 , intensity : 2 } ;
161
+ lightColor = colorFire ;
162
+ lightAlpha = 0.15 ;
136
163
break ;
137
164
case "moon-touched" :
138
165
dimLight = 30 ;
139
166
brightLight = 15 ;
167
+ lightAnimation = { type : "none" } ;
168
+ lightColor = colorMoonGlow ;
140
169
break ;
141
170
case "nochange" :
142
171
default :
143
172
dimLight = token . data . dimLight ;
144
173
brightLight = token . data . brightLight ;
145
174
lightAngle = token . data . lightAngle ;
146
175
lockRotation = token . data . lockRotation ;
176
+ lightAnimation = token . data . lightAnimation ;
177
+ lightAlpha = token . data . lightAlpha ;
178
+ lightColor = token . data . lightColor ;
147
179
}
148
180
// Update Token
149
181
console . log ( token ) ;
@@ -154,7 +186,10 @@ new Dialog({
154
186
dimLight : dimLight ,
155
187
brightLight : brightLight ,
156
188
lightAngle : lightAngle ,
157
- lockRotation : lockRotation
189
+ lockRotation : lockRotation ,
190
+ lightAnimation : lightAnimation ,
191
+ lightAlpha : lightAlpha ,
192
+ lightColor : lightColor
158
193
} ) ;
159
194
}
160
195
}
0 commit comments