makepad/apps/vj/resources/effects/230_video_box.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

48 lines
1.6 KiB
Text

// VIDEO BOX — five video-faced boxes riding a slow carousel, each tumbling
// at its own hashed rate while bobbing on detuned sines. The whole ring
// drifts past the orbiting camera so there is always a face arriving and a
// face leaving. Pattern taught here: a multi-instance fx_place — carousel
// angle from the instance id plus per-instance spin from the stream hash.
{
name: "Video Box"
engine: "videomesh"
shape: "box"
seed: 8
instances: 5
size: 1.5
spread: 3.4
fly: 0.7
beat_pulse: 0.4
input0: "test"
color_bg: #x070510
color_a: #xf0a840
color_b: #x40c8f0
color_c: #xffe9c8
fog: 0.02
glow: 1.0
stages: [
{kind: "bloom", threshold: 0.72, strength: 0.7, levels: 2}
]
// THE LOOK LIVES HERE — carousel placement + the lit face.
shader: draw.DrawVjFxVideomesh {
fx_place: fn(id: float, hash: float, t: float) -> vec4 {
let a = (id / 5.0 + t * 0.03) * 6.2831853
let r = self.shape.w
let y = 0.55 * sin(t * 0.6 + id * 2.3)
let spin = t * (0.35 + hash * 0.5) * (1.0 + clamp(self.user.x, 0.0, 4.0))
return vec4(sin(a) * r, y, cos(a) * r, spin)
}
fx_color: fn(t: float, attr: vec4, content: vec4, cmix: float) -> vec4 {
let lit = content.xyz * (t * (0.5 + 0.5 * attr.z))
let rim = self.col_a.xyz.mix(self.col_b.xyz, attr.x) * (1.0 - attr.z)
* (0.35 + self.time_beat.w * 1.0 + clamp(self.user.z, 0.0, 4.0))
return vec4((lit + rim) * self.fog.y, 1.0)
}
}
}