edgeGlowBand
The glowing band around the shape's edge, with drifting smoke, plus the angle around the shape.
edgeGlowBand(
fieldRaw: number,
sdfUV: v2f,
viewport: v2f,
scale: number,
thickness: number,
softness: number,
smokeSize: number,
smokeAmt: number,
animTime: number,
pulse: number,
beat: number,
): v2f
Import effects from shaders/std and use effects.edgeGlow.edgeGlowBand.
Takes the shape's signed distance (frame.surf0.member('r')), the shape-space uv (frame.sdfUV), the viewport size, the scale prop, thickness (0.01 to 1; 1 is about as wide as the default shape), softness (0 is a crisp ring, 1 a wide gradient), smokeSize and smokeAmt (0 to 1), the layer's clock, pulse (0 to 1) and the shared beat. Returns .x the band (0 to 1) and .y the angle around the shape in turns (0 to 1), which orbitSpotsAccum needs.
Parameters
| Name | Type | Notes |
|---|---|---|
args | [fieldRaw: number, sdfUV: v2f, viewport: v2f, scale: number, thickness: number, softness: number, smokeSize: number, smokeAmt: number, animTime: number, pulse: number, beat: number] |
Example
const band = call(edgeGlowBand, 'edgeGlowBand', [frame.surf0!.member('r'), frame.sdfUV!, params.ctx.viewportSize, uniforms.scale, uniforms.thickness, uniforms.softness, uniforms.smokeSize, uniforms.smoke, t, uniforms.pulse, beat])
See also
heartbeatPulse— A double heartbeat, 0 to 1, driven by the layer's clock.orbitSpotsAccum— The spots of one color orbiting the band, as coverage at this pixel.