makepad/apps/vj/resources/effects/240_beam_fan.splash
Admin cb49b032df vjfx: 104 presets, engine hooks + hold stage, the videomesh engine, the audio picture, livecodable effects, and mp4 thumbnail sheets
Squashed from work; the fine-grained history is under tag archive/work-2026-08-26:
- vjfx: 104 new presets — the transition lane fills out and the screen family goes wide
- vjfx: three lanes land — engine hooks + hold stage, the videomesh engine, and the audio picture
- vj: the thumbnail pipeline becomes one honest machine, and effects go livecodable
- vj: thumbnails become mp4 — hardware-coded sheets at measured-4K cells, and the bake stops racing the GPU
- store: the ceremony dies — batch publish, one transaction, and the engine stops re-reading its own log
- store: the ceremony dies — batch publish, one transaction, and the engine stops re-reading its own log
- vj: the console grows real transports, and the deck stops lying about reverse
- vj: reverse earns a memory, and the effects stop aging
- fab: a 3D creation shell and the viewer built on it
2026-08-26 08:49:48 +02:00

58 lines
1.9 KiB
Text

// BEAM FAN — twelve thin video beams pivoting through one centre like a
// folding hand of cards: each slat carries its own horizontal band of the
// clip (`uv_split: "bands_y"`), the fan opens and closes on slow sines and
// the whole hand swings, so the picture keeps almost assembling and then
// shearing into rays of light. Pattern taught here: thin `grid` slats +
// band windows + a rotation-only fx_place with per-slat z offsets to keep
// the crossing beams from fighting.
{
name: "Beam Fan"
engine: "videomesh"
shape: "grid"
seed: 12
instances: 12
uv_split: "bands_y"
size: 2.6
aspect: 0.085
spread: 0.6
fly: 0.4
alt: 0.3
beat_pulse: 0.45
input0: "test"
color_bg: #x05040c
color_a: #x40c8f0
color_b: #xb04ff0
color_c: #xe8f4ff
fog: 0.0
glow: 1.0
stages: [
{kind: "bloom", threshold: 0.6, strength: 1.1, levels: 3}
]
// THE LOOK LIVES HERE — the fan placement (angle per slat, breathing
// spread, swinging root) and the beam fragment.
shader: draw.DrawVjFxVideomesh {
fx_axis: fn(id: float, hash: float) -> vec3 {
return vec3(0.0, 0.0, 1.0)
}
fx_place: fn(id: float, hash: float, t: float) -> vec4 {
let n = max(self.shape.y, 2.0)
let open = 1.15 + 0.35 * sin(t * 0.33)
let swing = 0.25 * sin(t * 0.21)
let ang = (id / (n - 1.0) - 0.5) * open + swing
return vec4(0.0, 0.0, id * 0.03 - n * 0.015, ang)
}
fx_color: fn(t: float, attr: vec4, content: vec4, cmix: float) -> vec4 {
let lit = content.xyz * t
let ray = self.col_a.xyz.mix(self.col_b.xyz, attr.w / max(self.shape.y, 1.0))
* (1.0 - attr.z)
* (0.35 + self.time_beat.w * 1.2 + clamp(self.user.z, 0.0, 4.0))
return vec4((lit + ray) * self.fog.y, 1.0)
}
}
}