makepad/apps/vj/resources/effects/130_trans_ring_bloom.splash
Arena Agent d8d5ea8b6a Repair integration manifests and port nigig exports onto upstream widget families
Restore missing required asset/flow packages from the pinned nigig revision; retain upstream script isolation, X11 hover, and widget-core fixes. Validated makepad-widgets data feature with Rust 1.97.1.
2026-10-26 11:23:26 +00:00

29 lines
1.2 KiB
Text

// RING BLOOM — deck B blooms outward from centre inside a set of
// concentric ripples, so the growing edge looks like rings rather than
// a plain circle. RINGS sets the ripple count.
{
name: "Ring Bloom"
engine: "transition"
p1: 0.5
dials: [
{name: "SOFT", bind: "p0", default: 0.08},
{name: "RINGS", bind: "p1", default: 0.5},
{name: "DIP", bind: "p2", default: 0.0}
]
shader: draw.DrawVjFxDuo {
trans: fn(uv: vec2, t: float) -> vec4 {
let c2 = vec2((uv.x - 0.5) * self.aspect(), uv.y - 0.5)
let r = length(c2)
let rmax = 0.5 * sqrt(self.aspect() * self.aspect() + 1.0)
let rings = 3.0 + floor(self.user.y * 5.0)
let ripple = sin(r * rings * 6.2832) * 0.03
let field = r + ripple
let soft = 0.01 + self.user.x * 0.15
let edge = t * (rmax + 2.0 * soft) - soft
let inside = smoothstep(edge + soft, edge - soft, field)
let c = self.deck_a(uv).mix(self.deck_b(uv), inside)
let dim = 1.0 - 4.0 * clamp(t, 0.0, 1.0) * (1.0 - clamp(t, 0.0, 1.0)) * self.user.z * 0.9
return vec4(c.xyz * dim, 1.0)
}
}
}