makepad/apps/vj/resources/effects/75_coin_fountain.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

68 lines
2.2 KiB
Text

// COIN FOUNTAIN — the greedy Kick Forge variant: fewer, FAT gold chips
// with high spin and maximum glint, tossed in slower arcs (moderate
// gravity = lower but longer flights) so the payout hangs tumbling and
// strobing. Pattern taught: the glint channel driven hard by `high` —
// hats literally make the money sparkle — and low `falloff` so the whole
// drum pays out, not just the centre.
{
name: "Coin Fountain"
engine: "forge"
seed: 77
shards: 1200
radius: 3.6
impulse: 8.0
gravity: 34.0
spin: 2.6
membrane_wave: 0.35
shard_size: 0.26
scatter: 0.8
falloff: 0.35
pile: 0.5
glint: 2.6
beat_pulse: 0.5
p0: "0.7 + 2.0*bass"
p1: "0.2 + 0.8*bass"
p2: "0.4 + 2.5*high"
// PERFORMANCE DIALS — the engine's own p-levers; touching one holds
// its audio binding above at a fixed gain.
dials: [
{name: "HEAT", bind: "p0", default: 0.5},
{name: "RING", bind: "p1", default: 0.5},
{name: "EMBER", bind: "p2", default: 0.5}
]
color_bg: #x0a0806
color_a: #xc9a12c // old gold
color_b: #xffd86a // bright gold
color_c: #xfff7d0 // glint white
cam_orbit: 0.14
cam_fov: 54.0
fog: 0.028
glow: 1.25
stages: [
{kind: "bloom", threshold: 0.5, strength: "1.3 + 1.0*high", levels: 3},
{kind: "tiltshift", focus: 0.5, width: 0.35, levels: 2}
]
// THE LOOK LIVES HERE. This block is not a reference to the
// engine's shader — it IS the pixel math this effect runs.
// Rewrite it and the effect looks different; everything else
// (geometry, motion, the content coupling, the beat) keeps
// working, because the block SUBCLASSES the engine shader.
// Inputs: t = flight heat 0..1, attr = (id, aux, r0, r1).
// Signals: self.time_beat (time, beat, phase, pulse),
// self.sig (bar, bpm, energy, dt), self.user (p0..p3),
// self.col_a/b/c/bg, self.fog (density, glow, content, -).
shader: draw.DrawVjFxForge {
fx_color: fn(t: float, attr: vec4, normal: vec3, wpos: vec3) -> vec4 {
let base = self.col_a.mix(self.col_b, fract(attr.w * 7.93))
let flash = self.col_c * (t * 0.55)
return vec4(base.xyz + flash.xyz, 1.0)
}
}
}