Agent Harness
Публичная копия обвязки агентной разработки: гейты, journeys, скиллы и шаблоны. Без ключей и личных данных.
Публичная копия обвязки агентной разработки: гейты, journeys, скиллы и шаблоны. Без ключей и личных данных.
import * as THREE from 'three';
import { CRYSTAL_VERT, CRYSTAL_FRAG } from './frozen-lightning.glsl.js';
// Frozen Lightning (SPELLBOOK hybrid, ice + lightning): a bolt that freezes into a crystal lattice,
// then shatters. Charge: micro-arcs and ice motes gather on the focus while a frost ring creeps in
// at the target. Strike: a stepped leader runs focus -> target, return stroke and one restrike on
// the SAME branches (sparks, shock, Lichtenberg glow). Freeze: a front races back from the target
// along the channel and out along every branch and sub-branch; behind it each bolt segment becomes
// a faceted ice crystal (rime spurs sprout off it), so the exact bolt you saw hangs in the air as
// ice with its light trapped inside, pulses running through it, mist pouring off it, frost on the
// floor beneath it and ice spikes caging the target. Shatter: stress cracks flare, then the lattice
// bursts from the target end back to the caster into tumbling crystals, shards, glints and mist,
// and the trapped charge escapes as floor crawl arcs.
//
// The lattice geometry is written into preallocated buffers once per cast. The branch layout is a
// JS mirror of Bolts.js (same PCG hashes and lattice noise), so the ice lands on the bolt's branches.
const MAIN_SEG = 28, BR_SEG = 8
t x a b a t t t
s v
w s s s
w w
v
i x k i salt
a k b k
a b a x i
_T _Ub _Vb
_Ub _Vb _Ub
_T
_T
_T
_T
n1 n2 amp f freq
k k octaves k
s seed k
n1 amp t f s
n2 amp t f s
amp f
env jag t freeEnd
out t_Ub n1 env_Vb n2 env
th h ph h
outth_Ub th ph_Vb th ph
fx
mote
eMote
tMote
mist
lineMist
glint
lineGlint
shard
chip
spark
lineSpark
core glow tint glowDim lightCol
absorb inscat glowV coreV look
p
corep glowp tintp
glowDimglow
lightColglowcore
absorbtint tint tint
inscattint tint tint tint tint tint
glowVglow glow glow
coreVcore core core
look p p
lattices
i i i
geo
a size size a geoname a a
geo
geo
fx look absorb inscat glowV coreV
geo
fx
lattices
i i i latticesi latticesi latticesi
ring0 ring1
_u _c _e1 _e2 _t0 _t1 _n _ab _ac _cv _vel
i
i p i p i p
i _c i _c i _c i
i _u i _u i _u i
i i i i
i _vel i _vel i _vel
_n_abb a _acc a
_cva bc _c
_n_cv a b c a c b
_ub a
len _u
_u len
_ca b
hl len tl r kind tw
_u _e1_Ub _e2_Vb
k k k
ang tw k rr r
ring0k_c_u hl_e1 ang rr_e2 ang rr
ring1k_c_u hl_e1 ang rr kind _e2 ang rr kind
_t0_c_u hl tl
_t1_c_u hl tl
_ablineB lineA
h _ac_c lineA_ab _ab
_vel_c_abhlineA
_vel _vel
_vel
_vel _vel _vel
_velforce
tf kind r hl tl
k k k
j k
ring0k ring0j ring1j ring0k ring1j ring1k
ring1k ring1j _t1 ring0j ring0k _t0
tf
brA brB brSeed brLen brTf
st
_a _b _d _q0 _sB _dir
fx
rs
rs rs
core glowDim
a b branches sub jag width
glowWidth reveal snap
fx
x z radius frost glowAmt char pattern
seed x2 z2 width
fx
glow
pos r0 r1 dur thick
dist intensity ground
fx
jag h seed h bseed h
nb h ns nb h
th p force p
i i i i seed jag i
len
i i i len ii
d len
d len p
fromB len
spurs
i i i
sl ii
fromB sl
taper i
i i th taper fromB sl d rnd force
spurs p i i th fromB sl d rnd force spurs
bi bi nb bi
bh bseed bi
tb bh
tb seed jag brAbi
tb seed jag _dir
_dirbrAbi
bl bh
brBbibrAbi_dir bh _d bl
brSeedbi bh brLenbi bl brTfbi tb len d
k k k brAbi brBbi k brSeedbi jag k
k k k
tf brTfbi k bl d
k k th k tf rnd force
spurs p k k th tf rnd force spurs
j j ns j
strand j bi j nb
sh bseed strand
ts sh
brAbi brBbi ts brSeedbi jag _q0
brAbi brBbi ts brSeedbi jag _dir
_dir_q0
l2 sh brLenbi
_sB_q0_dir sh _d l2
s2 sh tf0 brTfbi ts brLenbi d
k k k _q0 _sB k s2 jag k
k k k k k th k tf0 k l2 d rnd force
i i i a i a a a a
_ub a
_u
ph el
_dir_Ubph_Vb phel_u el
_aa b
_b_a_dir r
_a _b r tf rnd force
d d
i i i di di
i i d i di
d d
d d d d
d d
p d stc
name
d
c p p
i i i di c c
d fx
d d d dlightCol d d
d fx
d d d dglowcore d
d d d d d d
name
i i i di di
c p d
name
c p d
name
d
p d stc d d
c
k c c
d dt
i i i
h di
h
d
hc_afx fx fx
hc_afx fx fx k fx
h
h p k fx
d d
motec mote mote p k dt
eMotec eMote eMote k dt
mistc mist mist mist p dt
c d d c c c k p k c c c c
tMotec c tMote tMote p k dt
c k p c
m d d
c
t c
m
t m t m p
m
d d m p c p d
d t d m p fx p
t m dt
fr t d d
strain c c t
hold p c c strain fx
m hold m p fr fx
ft t
u
u t ft
u
d dt
frozenAll ft
frozenAll d d
u c c p d d c c t p
fr ft d d
t fr
dd d fr
glintd glint glint p dt
mistd mist mist mist p dt
t
lineMistd lineMistd lineMist lineMist lineMist p dt
lineGlintd lineGlintd lineGlint lineGlint p dt
t t d
d t
fr ft d d
_ad d fr
d d p c _a _a
t m m
dt
t d d
fr ft d d
p fr c c
dt p c c
c fxc
fade c c
c
dt dt
c d
i i d i
h di
h
h fx fade p fade fade
fx h
c mistd mist mist mist p c dt
dt
dt
dc
dc
c d d
dd d
nb p
d d d nb nb p
d d dd dd d dlightCol
d
d d
rs c
d d d d p d rnd
d p
d
d d d d dd
d g d
fx p
spark spark spark p
d lineSparkd _a lineSpark lineSpark
g g p c
g g p c
fx core
fx g glow
_ag
fx
fx fx fx
d d d d p
n a0 fx
i i n i
ang a0 i n fx r fx
g ang r g ang r
ang ang
fx fx
i c
c i
fx
i i fx i
dm fxi dist dm g dm g
i c dist dm dm dm dist
d d g d
d d d
lineGlint lineGlint lineGlint lineGlint p
shard shard shard shard shard p
chip chip chip chip p
lineMist lineMist lineMist lineMist lineMist p
lineSpark lineSpark lineSpark p
glint glint glint p
_ag
fx g glow
d d p
d d d p
fx p
fx
fx fx
d
i i i
ang i fx len fx
_ag
_bg ang len g ang len
h _a _b
h dd h
g g c
i i fx i
dm fxi dist dm g dm g
i c dist dm dm_ddm dist