Agent Harness · VibeGit
Agent Harness Публичная копия обвязки агентной разработки: гейты, journeys, скиллы и шаблоны. Без ключей и личных данных.
agent-harness / tools / spells-assets / ue / spells / hybrid / black-flame.js 298 строк · изменён 6 нояб., 03:45
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
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
import * as THREE from 'three' ;
const MAX = 2 ;
rim core
list
i i count i
h fx
rim core
h h h
h
list h
rim core
h list h h h h
h die
h
ra hy ra ra
h base hy base
h ra hy ra
h time seed
h skin swirl die density
h base base
h h
_a _b _col
x
t x a b a t t t
fx
mass fx
lickEm
coronaEm
emberEm
cinderEm
groundEm
moteIn
ashEm
smokeEm
rim mass core mass
slots
s slots s s s
lastRim lastCore
p
p lastRim p lastCore
lastRim p lastCore p
rim p core p
core rim rim
rim core rim
rim core rim
k k
x z radius char corruption
pattern seed width
fx
c c p p
p
r
r r r
k k
p d c
name
d
d d d c c
d
d mass d fx
d fx d fx
d d p c rim
d fx
d d d
d d d p d d d rim
d d d d p d d d d
d d d d d d p
name
b d
b
fx
fx fx
b p fx
cinderEm b b cinderEm cinderEm p
emberEm b b emberEm emberEm p emberEm p
lickEm b b lickEm lickEm p lickEm p lickEm
b b p p c
fx _a b b p rim
c
dm fx c
dm _a c p
name
d mass d
d d d d
d d d d d
d d
d d
fx _col
p d c b d
b
c c c p
rel tl
die tl on die
c p die
d
d mass d b c p d p die p
fx rim tl
d
d
d tl
d dt
d
d b b d b b
d rim
d p rel on d
d d b d p on rel d on rel d on d
d d b b d on
k
moteIn b b moteIn p moteIn k dt
groundEm b b groundEm p groundEm groundEm p groundEm k dt
d d b b p p c
burn on rel
burn
y fx w y
lickEm b y b lickEm w lickEm lickEm p lickEm burn dt
coronaEm b fx b coronaEm coronaEm coronaEm p coronaEm burn p dt
emberEm b fx b emberEm emberEm emberEm p burn dt
ashEm b b ashEm ashEm p burn dt
tl
k tl
groundEm b b groundEm p groundEm groundEm p groundEm k dt
emberEm b b emberEm emberEm emberEm p k dt
smokeEm b b smokeEm smokeEm p smokeEm p tl dt
d dt
d burn
d
c
dm fx c
dm b dm b p
dm dm
dm dm
dm _b fx fx p
b fx b fx p p c
const
MASS_GLSL
=
`
uniform vec4 uBF; // radius m, height m, time s, seed
uniform vec4 uBF2; // skin gain, swirl, die (0 -> 1), body density
uniform vec3 uBFBase; // floor centre
uniform vec3 uBFRim; // corona colour (linear)
uniform vec3 uBFCore; // root colour (linear)
void volumeSample(vec3 pw, vec3 pl, out float sigma, out vec3 albedo, out vec3 emission) {
sigma = 0.0; albedo = vec3(0.0); emission = vec3(0.0);
float R = uBF.x, H = uBF.y, time = uBF.z, die = uBF2.z;
vec3 q = pw - uBFBase;
float h = q.y / H;
if (h < -0.05 || h > 1.35) return;
// profile: a wide root hugging the target, necking in, tongues tearing off above
float rad = R * (0.62 - 0.42 * h + 0.3 * exp(-h * 6.0));
float amp = R * (0.28 + 0.55 * h);
float d0 = rad - length(q.xz);
if (d0 < -amp) return;
// a frame that turns with the vortex, faster low down; band-limited rising noise as fire.js
float ang = uBF2.y * time * (1.5 - 0.8 * h);
float c = cos(ang), s = sin(ang);
vec2 xz = vec2(c * q.x - s * q.z, s * q.x + c * q.z);
// stretched upwards (flame tongues are tall), rising fast; a slow lobe octave and a detail octave
float f = 0.36 / R;
vec3 np = vec3(xz.x, q.y * 0.4 - time * 2.2, xz.y) * f + uBF.w;
np += curl3(np * 0.45 + vec3(0.0, -0.3 * time, uBF.w)) * 0.35;
float n1 = noise3(np), n2 = noise3(np * vec3(2.2, 1.6, 2.2) + vec3(0.31, -0.7 * f * time, 0.17));
float detail = 1.0 - smoothstep(0.35, 0.9, gVolDt / R);
float d = d0 + (n1 - 0.5) * 2.2 * amp + (n2 - 0.5) * 0.7 * amp * detail - die * R * 0.9;
// the top tears into separate tongues: the cut-off height itself is noise
float top = 1.0 - smoothstep(0.55, 1.0, h + (n1 - 0.5) * 1.1 + (n2 - 0.5) * 0.35 + die * 0.6);
float body = smoothstep(0.0, 0.3 * R, d) * top;
// the burning skin: a thin glow just outside the black surface (sharp on the inside)
float skin = (d < 0.0 ? exp(d / (0.1 * R)) : exp(-d / (0.02 * R))) * top;
if (body + skin < 2e-3) return;
// it burns at the column's outline, the tongue tips and the roots, and hardly where the camera
// looks straight into the black (so the body reads black face-on, like the sodium flame)
vec2 vd = normalize(cameraPosition.xz - pw.xz + 1e-4), rd = q.xz / max(length(q.xz), 1e-3);
float sil = 1.0 - abs(dot(rd, vd));
float root = exp(-max(q.y, 0.0) / 0.22);
float sil2 = sil * sil;
float burn = 2.4 * sil2 * sil2 + 0.6 * sil2 * smoothstep(0.6, 1.0, h) + 1.6 * root;
float sb = body * 11.0 * uBF2.w, ss = skin * 0.5;
sigma = (sb + ss) / R;
vec3 L = mix(uBFRim, uBFCore, 0.6 * root) * (0.3 + 1.4 * n2 * n2) * burn;
emission = ss * L * uBF2.x / R;
// albedo stays 0: a pure absorber (the violet light inside would otherwise light it up), and
// zero-albedo samples skip the lighting taps entirely
} `
;
function
makeFlameMass
(
fx, count
)
{
const
=
new
THREE. Color
(
)
,
=
new
THREE. Color
(
)
;
const
=
[
]
;
for
(
let
=
0
;
<
;
++
)
{
const
=
.
volumes
.
add
(
{
shape
:
'capsule'
,
glsl
:
MASS_GLSL
,
maxSteps
:
28
,
uniforms
:
{
uBF
:
{
value
:
new
THREE. Vector4
(
)
}
,
uBF2
:
{
value
:
new
THREE. Vector4
(
)
}
,
uBFBase
:
{
value
:
new
THREE. Vector3
(
)
}
,
uBFRim
:
{
value
:
}
,
uBFCore
:
{
value
:
}
}
,
}
)
;
.
g
=
0.2
;
.
ambient
=
1
;
.
sun
=
1
;
.
busy
=
false
;
.
push
(
)
;
}
return
{
,
,
acquire
(
)
{
for
(
const
of
)
if
(
!
.
busy
)
{
.
busy
=
true
;
.
visible
=
false
;
return
;
}
return
null
;
}
,
drive
(
h, base, R , H , time, seed, skin, swirl, die, density
)
{
.
visible
=
H
>
0.05
&&
<
1
;
if
(
!
.
visible
)
return
;
const
=
R
*
1.6
,
=
Math
.
max
(
(
1.3
*
H
+
)
*
0.5
,
)
;
.
position
.
set
(
.
x
,
1.3
*
H
-
,
.
z
)
;
.
scale
.
set
(
,
,
)
;
.
uniforms
.
uBF
.
value
.
set
(
R
,
H
,
,
)
;
.
uniforms
.
uBF2
.
value
.
set
(
,
,
,
)
;
.
uniforms
.
uBFBase
.
value
.
set
(
.
x
,
0
,
.
z
)
;
}
,
release
(
h
)
{
.
visible
=
false
;
.
busy
=
false
;
}
,
}
;
}
const
=
new
THREE. Vector3
(
)
,
=
new
THREE. Vector3
(
)
,
=
new
THREE. Color
(
)
;
const
SPLAT
=
{
x
:
0
,
z
:
0
,
radius
:
1
,
char
:
0
,
corruption
:
0
,
glow
:
0
,
pattern
:
'noise'
,
seed
:
0
,
width
:
0
}
;
const
SHOCK
=
{
pos
:
new
THREE. Vector3
(
)
,
radius0
:
0.3
,
radius1
:
4
,
duration
:
0.5
,
thickness
:
0.7
,
distortion
:
0.05
,
intensity
:
0
,
ground
:
true
,
color
:
null
}
;
const
SIGIL
=
{
pos
:
new
THREE. Vector3
(
)
,
radius
:
1.8
,
style
:
'void'
,
intensity
:
0
,
reveal
:
0
,
seed
:
0
,
color
:
null
}
;
const
clamp01
=
(
x
)
=>
Math
.
min
(
1
,
Math
.
max
(
0
,
)
)
;
const
smooth
=
(
a, b, x
)
=>
{
const
=
clamp01
(
(
-
)
/
(
-
)
)
;
return
*
*
(
3
-
2
*
)
;
}
;
export
default
{
id
:
'black-flame'
,
name
:
'Black Flame'
,
element
:
'hybrid'
,
order
:
70
,
hue
:
'#7a2dff'
,
shape
:
'area'
,
radius
:
0.4
,
params
:
{
size
:
1
,
height
:
1
,
intensity
:
1
,
absorb
:
1
,
embers
:
1
,
swirl
:
1
,
smoke
:
1
,
corruption
:
1
,
knockback
:
1
,
rim
:
'#8a3dff'
,
core
:
'#efdcff'
}
,
ranges
:
{
size
:
[
0.5
,
1.8
,
0.01
]
,
height
:
[
0.5
,
1.8
,
0.01
]
,
intensity
:
[
0
,
3
,
0.01
]
,
absorb
:
[
0.2
,
2
,
0.01
]
,
embers
:
[
0
,
3
,
0.01
]
,
swirl
:
[
0
,
3
,
0.01
]
,
smoke
:
[
0
,
3
,
0.01
]
,
corruption
:
[
0
,
3
,
0.01
]
,
knockback
:
[
0
,
3
,
0.01
]
}
,
presets
:
{
hellmouth
:
{
rim
:
'#ff3a1e'
,
core
:
'#ffd9b8'
,
embers
:
1.6
,
swirl
:
1.4
}
,
'soul fire'
:
{
rim
:
'#2dffc0'
,
core
:
'#dafff2'
,
absorb
:
0.8
,
smoke
:
0.5
}
,
eclipse
:
{
rim
:
'#ffae3a'
,
core
:
'#fff3d6'
,
absorb
:
1.6
,
intensity
:
1.4
,
height
:
1.25
,
embers
:
0.6
}
,
}
,
timing
:
{
charge
:
1.0
,
impact
:
3.0
,
linger
:
2.2
}
,
kinds
:
{
lick
:
{
style
:
'media'
,
absorbing
:
true
,
lightResponse
:
0.1
,
drag
:
2.6
,
buoyancy
:
4.4
,
curl
:
3.0
,
curlScale
:
0.55
,
forceResponse
:
0
,
life
:
[
0.3
,
0.7
]
,
size
:
[
0.16
,
0.42
]
,
sizePow
:
0.6
,
color
:
[
'#030206'
,
'#010102'
]
,
alpha
:
[
0.95
,
0
]
,
density
:
9
,
erosion
:
1.7
,
fadeIn
:
0.08
,
fadeOut
:
0.45
}
,
corona
:
{
style
:
'media'
,
emissive
:
3
,
drag
:
3.2
,
buoyancy
:
3.6
,
curl
:
3.2
,
curlScale
:
0.5
,
forceResponse
:
0
,
life
:
[
0.2
,
0.5
]
,
size
:
[
0.14
,
0.32
]
,
sizePow
:
0.7
,
color
:
[
'#c9a0ff'
,
'#6a20ff'
]
,
alpha
:
[
0.7
,
0
]
,
density
:
4
,
erosion
:
1.6
,
fadeIn
:
0.05
,
fadeOut
:
0.5
}
,
ember
:
{
style
:
'glow'
,
drag
:
1.7
,
buoyancy
:
2.3
,
gravity
:
1.1
,
curl
:
5.5
,
curlScale
:
0.75
,
restitution
:
0.3
,
friction
:
0.4
,
life
:
[
1.4
,
3.2
]
,
size
:
[
0.026
,
0.01
]
,
sizePow
:
0.5
,
stretch
:
0.03
,
emissive
:
16
,
flicker
:
0.65
,
color
:
[
'#b47dff'
,
'#2a0a5c'
]
,
alpha
:
[
1
,
0.15
]
,
fadeIn
:
0.1
,
fadeOut
:
0.35
,
paints
:
'corruption'
,
paintAmount
:
0.04
}
,
cinder
:
{
style
:
'glow'
,
drag
:
0.6
,
gravity
:
9.8
,
restitution
:
0.35
,
friction
:
0.3
,
forceResponse
:
0.4
,
life
:
[
0.6
,
1.5
]
,
size
:
[
0.03
,
0.012
]
,
stretch
:
0.012
,
emissive
:
11
,
flicker
:
0.5
,
color
:
[
'#9a55ff'
,
'#260850'
]
,
alpha
:
[
1
,
0.2
]
,
paints
:
'corruption'
,
paintAmount
:
0.06
}
,
}
,
create
(
fx
)
{
const
S
=
this
,
P
=
.
particles
;
const
=
makeFlameMass
(
,
MAX
)
;
const
=
P
.
emitter
(
'black-flame.lick'
,
{
shape
:
'shell'
,
radius
:
0.45
,
spread
:
0.5
,
radial
:
0.7
}
)
;
const
=
P
.
emitter
(
'black-flame.corona'
,
{
shape
:
'shell'
,
radius
:
0.5
,
spread
:
0.5
,
radial
:
0.8
}
)
;
const
=
P
.
emitter
(
'black-flame.ember'
,
{
shape
:
'shell'
,
radius
:
0.6
,
spread
:
0.8
,
radial
:
1.1
}
)
;
const
=
P
.
emitter
(
'black-flame.cinder'
,
{
shape
:
'sphere'
,
radius
:
0.4
,
spread
:
1.6
,
radial
:
3.2
}
)
;
const
=
P
.
emitter
(
'black-flame.lick'
,
{
shape
:
'disk'
,
radius
:
1.1
,
spread
:
0.3
}
)
;
const
=
P
.
emitter
(
'void.mote'
,
{
shape
:
'shell'
,
radius
:
2.6
,
spread
:
0.3
,
radial
:
-
2.2
}
)
;
const
=
P
.
emitter
(
'void.ash'
,
{
shape
:
'sphere'
,
radius
:
0.6
,
spread
:
0.6
}
)
;
const
=
P
.
emitter
(
'void.smoke'
,
{
shape
:
'sphere'
,
radius
:
0.6
,
spread
:
0.5
}
)
;
const
=
.
rim
,
=
.
core
;
const
=
Array
.
from
(
{
length
:
MAX
}
,
(
)
=>
(
{
busy
:
false
,
base
:
new
THREE. Vector3
(
)
}
)
)
;
const
takeSlot
=
(
)
=>
{
for
(
const
of
)
if
(
!
.
busy
)
{
.
busy
=
true
;
return
;
}
return
null
;
}
;
const
KC
=
{
corona
:
{
color
:
[
new
THREE. Color
(
)
,
new
THREE. Color
(
)
]
}
,
ember
:
{
color
:
[
new
THREE. Color
(
)
,
new
THREE. Color
(
)
]
}
,
cinder
:
{
color
:
[
new
THREE. Color
(
)
,
new
THREE. Color
(
)
]
}
}
;
let
=
''
,
=
''
;
function
retint
(
)
{
const
=
S
.
params
;
if
(
.
rim
===
&&
.
core
===
)
return
;
=
.
rim
;
=
.
core
;
.
set
(
.
rim
)
;
.
set
(
.
core
)
;
KC
.
corona
.
color
[
0
]
.
copy
(
)
.
lerp
(
,
0.5
)
;
KC
.
corona
.
color
[
1
]
.
copy
(
)
.
multiplyScalar
(
0.7
)
;
KC
.
ember
.
color
[
0
]
.
copy
(
)
.
lerp
(
,
0.3
)
;
KC
.
ember
.
color
[
1
]
.
copy
(
)
.
multiplyScalar
(
0.18
)
;
KC
.
cinder
.
color
[
0
]
.
copy
(
)
.
lerp
(
,
0.1
)
;
KC
.
cinder
.
color
[
1
]
.
copy
(
)
.
multiplyScalar
(
0.15
)
;
for
(
const
in
KC
)
P
.
setKind
(
` black-flame. ${ k} `
,
KC
[
]
)
;
}
retint
(
)
;
function
splat
(
x, z, radius, char, corruption, pattern, seed, width = 0
)
{
SPLAT
.
x
=
;
SPLAT
.
z
=
;
SPLAT
.
radius
=
;
SPLAT
.
char
=
;
SPLAT
.
corruption
=
;
SPLAT
.
glow
=
0
;
SPLAT
.
pattern
=
;
SPLAT
.
seed
=
%
100
;
SPLAT
.
width
=
;
.
ground
.
splat
(
SPLAT
)
;
}
function
heightAt
(
c, p
)
{
const
T
=
.
age
,
Tc
=
.
durations
.
charge
,
Hm
=
4.4
*
.
height
*
.
size
;
if
(
T
<
Tc
)
return
0.45
*
.
size
*
smooth
(
0.45
,
1.0
,
T
)
;
const
=
T
-
Tc
;
return
Hm
*
(
1
-
Math
.
exp
(
-
*
7
)
)
*
(
1
+
0.18
*
Math
.
exp
(
-
*
2.5
)
*
Math
.
sin
(
*
8
)
)
;
}
return
{
onParam
(
k
)
{
if
(
===
'rim'
||
===
'core'
)
retint
(
)
;
}
,
phase
(
c, name
)
{
const
=
S
.
params
,
=
.
data
;
retint
(
)
;
if
(
===
'charge'
)
{
.
s
=
takeSlot
(
)
;
.
base
=
.
s
?
.
s
.
base
.
set
(
.
to
.
x
,
0
,
.
to
.
z
)
:
null
;
if
(
!
.
base
)
return
;
.
mass
=
.
acquire
(
)
;
.
light
=
.
lights
.
acquire
(
)
;
.
vortex
=
.
forces
.
acquire
(
)
;
.
attr
=
.
forces
.
acquire
(
)
;
SIGIL
.
pos
.
set
(
.
base
.
x
,
0.03
,
.
base
.
z
)
;
SIGIL
.
radius
=
1.9
*
.
size
;
SIGIL
.
seed
=
.
seed
%
997
;
SIGIL
.
color
=
;
SIGIL
.
intensity
=
0
;
SIGIL
.
reveal
=
0
;
.
sigil
=
.
sigils
.
acquire
(
SIGIL
)
;
.
hitT
=
0.1
;
.
ring
=
false
;
.
flick
=
0
;
if
(
.
light
)
{
.
light
.
type
=
1
;
.
light
.
range
=
8
*
.
size
;
.
light
.
intensity
=
0
;
.
light
.
shadow
=
true
;
.
light
.
color
.
copy
(
)
;
}
if
(
.
vortex
)
{
.
vortex
.
type
=
1
;
.
vortex
.
dir
.
set
(
0
,
1
,
0
)
;
.
vortex
.
p
[
0
]
=
0.6
*
.
size
;
.
vortex
.
p
[
1
]
=
0
;
.
vortex
.
p
[
2
]
=
0
;
.
vortex
.
p
[
3
]
=
0
;
.
vortex
.
w
=
5
;
}
if
(
.
attr
)
{
.
attr
.
type
=
2
;
.
attr
.
p
[
0
]
=
0
;
.
attr
.
p
[
1
]
=
0.5
;
.
attr
.
p
[
2
]
=
0.35
;
.
attr
.
p
[
3
]
=
4.5
*
.
size
;
}
}
else
if
(
===
'release'
)
{
const
=
.
base
;
if
(
!
)
return
;
.
rig
.
shake
(
0.3
,
10
)
;
if
(
!
.
reduced
)
.
rig
.
punch
(
1.2
,
0.08
)
;
SHOCK
.
pos
.
copy
(
)
;
SHOCK
.
radius1
=
4.5
*
.
size
;
SHOCK
.
distortion
=
0.05
;
.
shocks
?.
spawn
(
SHOCK
)
;
.
pos
.
set
(
.
x
,
0.4
,
.
z
)
;
.
vel
.
set
(
0
,
3.5
,
0
)
;
.
burst
(
90
*
.
embers
)
;
.
pos
.
set
(
.
x
,
0.5
,
.
z
)
;
.
vel
.
set
(
0
,
2.6
,
0
)
;
.
radius
=
0.6
*
.
size
;
.
burst
(
260
*
.
embers
)
;
.
pos
.
set
(
.
x
,
0.5
,
.
z
)
;
.
vel
.
set
(
0
,
3.5
,
0
)
;
.
radius
=
0.5
*
.
size
;
.
size
=
.
size
;
.
burst
(
60
)
;
splat
(
.
x
,
.
z
,
2.2
*
.
size
,
0.6
,
1.4
*
.
corruption
,
'radial'
,
.
seed
)
;
.
impacts
.
add
(
'corruption'
,
.
set
(
.
x
,
0.4
,
.
z
)
,
2.4
*
.
size
,
1
,
8
,
)
;
if
(
.
target
>=
0
)
{
const
=
.
dummies
[
.
target
]
;
.
hit
(
.
copy
(
.
dir
)
.
setY
(
0
)
.
normalize
(
)
,
0.35
*
.
knockback
)
;
}
}
else
if
(
===
'done'
)
{
if
(
.
mass
)
.
release
(
.
mass
)
;
.
light
?.
release
(
)
;
.
vortex
?.
release
(
)
;
.
attr
?.
release
(
)
;
.
sigil
?.
release
(
)
;
.
mass
=
.
light
=
.
vortex
=
.
attr
=
.
sigil
=
null
;
if
(
.
s
)
.
s
.
busy
=
false
;
.
s
=
.
base
=
null
;
.
arena
.
setFocus
(
.
set
(
S
.
hue
)
,
2.5
)
;
}
}
,
update
(
c, dt
)
{
const
=
S
.
params
,
=
.
data
,
=
.
base
;
if
(
!
)
return
;
const
T
=
.
age
,
Tc
=
.
durations
.
charge
,
Ti
=
.
durations
.
impact
,
R
=
0.8
*
.
size
;
const
=
T
-
Tc
,
=
T
-
Tc
-
Ti
;
const
=
smooth
(
0
,
1.5
,
)
,
=
1
-
;
const
H
=
heightAt
(
,
)
*
(
1
-
0.55
*
)
;
.
flick
=
0.85
+
0.15
*
Math
.
sin
(
T
*
31
+
Math
.
sin
(
T
*
13
)
*
2
)
*
Math
.
sin
(
T
*
7.3
)
;
if
(
.
mass
)
.
drive
(
.
mass
,
,
R
,
Math
.
max
(
H
,
0.06
)
,
T
,
(
.
seed
%
83
)
*
0.41
,
4
*
.
intensity
*
.
flick
,
1.3
*
.
swirl
,
,
.
absorb
)
;
.
arena
.
setFocus
(
,
0.15
+
2.4
*
(
1
-
smooth
(
0.05
,
0.85
,
T
)
)
+
2.2
*
smooth
(
0.6
,
2.0
,
)
)
;
if
(
.
sigil
)
{
.
sigil
.
reveal
=
smooth
(
0
,
0.85
,
T
)
;
.
sigil
.
intensity
=
1.6
*
smooth
(
0
,
0.3
,
T
)
*
(
1
-
smooth
(
0.2
,
1.6
,
)
)
;
.
sigil
.
rotation
+=
*
0.35
;
}
if
(
.
light
)
{
.
light
.
pos
.
set
(
.
x
,
0.25
,
.
z
)
;
.
light
.
end
.
set
(
.
x
,
0.25
+
Math
.
max
(
0.2
,
H
*
0.55
)
,
.
z
)
;
.
light
.
color
.
copy
(
)
;
.
light
.
intensity
=
(
T
<
Tc
?
4
*
smooth
(
0.4
,
1
,
T
)
:
16
*
.
intensity
*
smooth
(
0
,
0.12
,
)
*
)
*
.
flick
;
}
if
(
.
vortex
)
{
.
vortex
.
pos
.
copy
(
)
;
.
vortex
.
p
[
1
]
=
7
*
.
swirl
*
*
smooth
(
0
,
0.3
,
)
;
.
vortex
.
p
[
2
]
=
3.5
*
*
smooth
(
0
,
0.3
,
)
;
.
vortex
.
p
[
3
]
=
1.4
*
;
.
vortex
.
w
=
H
+
1
;
}
if
(
.
attr
)
{
.
attr
.
pos
.
set
(
.
x
,
0.9
,
.
z
)
;
.
attr
.
p
[
0
]
=
4
*
*
smooth
(
0.3
,
1.0
,
T
)
;
}
if
(
T
<
Tc
)
{
const
=
smooth
(
0.15
,
1
,
T
/
Tc
)
;
.
pos
.
set
(
.
x
,
0.5
,
.
z
)
;
.
radius
=
2.6
*
.
size
;
.
rate
(
700
*
,
)
;
.
pos
.
set
(
.
x
,
0.05
,
.
z
)
;
.
radius
=
0.9
*
.
size
;
.
vel
.
set
(
0
,
0.8
,
0
)
;
.
size
=
0.6
*
.
size
;
.
rate
(
40
*
,
)
;
if
(
!
.
ring
&&
T
>
0.25
)
{
.
ring
=
true
;
splat
(
.
x
,
.
z
,
1.9
*
.
size
,
0
,
0.9
*
.
corruption
,
'ring'
,
.
seed
+
7
,
0.3
)
;
}
return
;
}
const
=
*
smooth
(
0
,
0.1
,
)
;
if
(
>
0.01
)
{
const
=
H
*
(
0.6
+
0.4
*
.
rand
(
)
)
,
=
Math
.
max
(
0.15
,
1
-
/
Math
.
max
(
H
,
0.1
)
)
;
.
pos
.
set
(
.
x
,
,
.
z
)
;
.
radius
=
R
*
(
0.3
+
0.4
*
)
;
.
vel
.
set
(
0
,
2.4
,
0
)
;
.
size
=
.
size
;
.
rate
(
40
*
,
)
;
.
pos
.
set
(
.
x
,
H
*
(
0.75
+
0.3
*
.
rand
(
)
)
,
.
z
)
;
.
radius
=
0.35
*
R
;
.
vel
.
set
(
0
,
2.2
,
0
)
;
.
size
=
0.7
*
.
size
;
.
rate
(
30
*
*
.
intensity
,
)
;
.
pos
.
set
(
.
x
,
0.3
+
.
rand
(
)
*
H
*
0.5
,
.
z
)
;
.
radius
=
0.7
*
R
;
.
vel
.
set
(
0
,
1.4
,
0
)
;
.
rate
(
150
*
.
embers
*
,
)
;
.
pos
.
set
(
.
x
,
H
*
0.75
,
.
z
)
;
.
vel
.
set
(
0
,
1.6
,
0
)
;
.
rate
(
30
*
.
smoke
*
,
)
;
}
if
(
>
0
)
{
const
=
1
-
smooth
(
0.3
,
2.0
,
)
;
.
pos
.
set
(
.
x
,
0.05
,
.
z
)
;
.
radius
=
1.0
*
.
size
;
.
vel
.
set
(
0
,
0.9
,
0
)
;
.
size
=
0.7
*
.
size
;
.
rate
(
55
*
,
)
;
.
pos
.
set
(
.
x
,
0.2
,
.
z
)
;
.
radius
=
0.9
*
R
;
.
vel
.
set
(
0
,
0.8
,
0
)
;
.
rate
(
80
*
.
embers
*
,
)
;
.
pos
.
set
(
.
x
,
Math
.
max
(
0.6
,
H
*
0.8
)
,
.
z
)
;
.
vel
.
set
(
0
,
1.1
,
0
)
;
.
size
=
0.35
*
.
size
;
.
rate
(
4
*
.
smoke
*
(
1
-
smooth
(
0.4
,
1.6
,
)
)
,
)
;
}
.
hitT
-=
;
if
(
.
hitT
<=
0
&&
>
0.2
)
{
.
hitT
=
0.3
;
if
(
.
target
>=
0
)
{
const
=
.
dummies
[
.
target
]
;
if
(
Math
.
hypot
(
.
pos
.
x
-
.
x
,
.
pos
.
z
-
.
z
)
<
1.6
*
.
size
)
{
.
status
.
corrupt
=
Math
.
max
(
.
status
.
corrupt
,
1
)
;
.
status
.
burn
=
Math
.
max
(
.
status
.
burn
,
0.3
)
;
.
hit
(
.
set
(
.
rand
(
)
-
0.5
,
0
,
.
rand
(
)
-
0.5
)
.
normalize
(
)
,
0.08
*
.
knockback
)
;
}
}
splat
(
.
x
+
(
.
rand
(
)
-
0.5
)
*
1.6
*
R
,
.
z
+
(
.
rand
(
)
-
0.5
)
*
1.6
*
R
,
0.9
*
.
size
,
0.35
,
0.5
*
.
corruption
,
'noise'
,
.
seed
+
T
*
37
)
;
}
}
,
}
;
}
,
}
;