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.
64 lines
2.3 KiB
Text
64 lines
2.3 KiB
Text
// CONVEYOR WALL — the endless belt: alternate tile rows stream the picture
|
|
// in opposite directions forever, rolling away over the lip at each edge.
|
|
// Pattern taught here: the conveyor's motion NEVER speed-modulates (a
|
|
// time-scaled position would jump when a binding moved) — the beat lives
|
|
// in the light instead: lanes flash in golden-ratio sequence every beat
|
|
// (shader-side) and p2 pumps the grout lattice.
|
|
{
|
|
name: "Conveyor Wall"
|
|
engine: "tiles"
|
|
mode: "conveyor"
|
|
seed: 31
|
|
|
|
grid: 30
|
|
spread: 8.5
|
|
aspect: 0.72
|
|
gap: 0.08
|
|
amp: 0.35
|
|
freq: 1.5
|
|
|
|
beat_pulse: 0.8
|
|
p2: "0.10 + 0.30 * pulse"
|
|
p0: 0.5 p1: 0.5
|
|
glow: "0.25 + 1.5*p0"
|
|
|
|
// PERFORMANCE DIALS — GROUT is the engine's own p2 lever (touching it
|
|
// holds the lattice pump); GLOW and SPLIT route p0/p1 through the glow
|
|
// key and the chroma stage. Mid-knob = the stock look, exact.
|
|
dials: [
|
|
{name: "GLOW", bind: "p0", default: 0.5},
|
|
{name: "SPLIT", bind: "p1", default: 0.5},
|
|
{name: "GROUT", bind: "p2", default: 0.5}
|
|
]
|
|
|
|
input0: "test"
|
|
|
|
color_bg: #x120806
|
|
color_a: #xffb35a
|
|
color_b: #xd84518
|
|
color_c: #xffd9a8
|
|
|
|
stages: [
|
|
{kind: "chroma", p1: "(0.10 + 0.14 * pulse) * (0.2 + 1.6*p1)", p2: 0.0},
|
|
{kind: "bloom", threshold: 0.6, strength: 1.0, levels: 3}
|
|
]
|
|
|
|
// 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 = the mode highlight drive, attr = (shade, edge, stagger, tumble).
|
|
// 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.DrawVjFxTiles {
|
|
fx_color: fn(t: float, attr: vec4, content: vec4, cmix: float) -> vec4 {
|
|
let border = attr.y
|
|
let lit = content.xyz * (attr.x * (0.35 + 0.65 * border))
|
|
let glowline = self.col_c.xyz * (1.0 - border)
|
|
* (t + clamp(self.user.z, 0.0, 4.0))
|
|
return vec4((lit + glowline) * self.fog.y, 1.0)
|
|
}
|
|
}
|
|
}
|