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.
31 lines
1.1 KiB
Text
31 lines
1.1 KiB
Text
// STRETCH — independent horizontal and vertical zoom about the frame
|
|
// centre, with a beat pump added to both axes at once.
|
|
{
|
|
name: "Stretch"
|
|
engine: "screen"
|
|
input0: "test"
|
|
|
|
// PERFORMANCE DIALS — mid-knob = the stock look, exact.
|
|
p0: 0.5 p1: 0.5 p2: 0.5
|
|
dials: [
|
|
{name: "WIDE", bind: "p0", default: 0.5},
|
|
{name: "TALL", bind: "p1", default: 0.5},
|
|
{name: "PUMP", bind: "p2", default: 0.5}
|
|
]
|
|
|
|
stages: [
|
|
{kind: "bloom", threshold: 0.6, strength: 1.05, levels: 2}
|
|
]
|
|
|
|
shader: draw.DrawVjFxScreen {
|
|
fx_color: fn(uv: vec2, content: vec4, cmix: float) -> vec4 {
|
|
let sx = 0.2 + 1.6 * self.user.x
|
|
let sy = 0.2 + 1.6 * self.user.y
|
|
let pump = 1.0 + self.time_beat.w * 0.3 * (0.2 + 1.6 * self.user.z)
|
|
let c = uv - vec2(0.5, 0.5)
|
|
let w = vec2(c.x / (sx * pump), c.y / (sy * pump)) + vec2(0.5, 0.5)
|
|
let tex = self.tex0.sample_as_bgra(clamp(w, vec2(0.0, 0.0), vec2(1.0, 1.0)))
|
|
return vec4(tex.xyz, 1.0)
|
|
}
|
|
}
|
|
}
|