<sk-spline-distance-gradient-field>

← prev index next →

A tube of influence around a curve — full weight near a spline, fading with distance, the field for "strongest along this path."

Remarks

This is the spline-distance member of the SpatialField family: like every field it turns where into how much — a scalar weight over space that consumers read by #id (field="#id") to vary an effect from place to place. Here the weight follows distance to the nearest point on a reference spline, so the influence wraps the curve as a tube.

Key attributes. spline-id names the sk-spline to measure from, by #id. inner-radius is the full-weight core hugging the curve (weight 1 within it) and outer-radius is where the weight reaches 0, fading linearly between, with an optional inherited remap-curve available to reshape the 0→1. visualize highlights the reference spline and draws the field's bounding box so its extent is clear.

Related. It shares the field="#id" model with every field. Its companion is sk-spline-progress-gradient-field (weight by progress along the spline rather than distance from it); the straight-tube analogue is sk-cylinder-gradient-field. Typical consumers are a sk-tonemap (mask the shading), a sk-simple-point-constraint (per-clone strength), and sk-field-constraint (drive one property).

Serve these docs to run the live example. WebGPU needs a secure context — open this page via grunt serve rather than double-clicking the file. The Markup tab works from disk.

Attributes

AttributeTypeDefaultDescription
id <id> The element's unique identifier — the standard HTML global id attribute.
remap-curveanimatable <remap-curve> Optional remapping curve to reshape the field's [0, 1] output.
remap-phaseanimatable <number> 0 Horizontal remap phase — an animatable scalar that translates a present
spline-id <id-ref> "" Id of the spline node this field measures distance from.
inner-radiusanimatable <number> 0 Inner radius — weight = 1 within this distance.
outer-radiusanimatable <number> 5 Outer radius — weight = 0 beyond this distance.
visualize <boolean> false Whether to show visualization (wireframe splines + center marker). Default: false
interactive-controls <boolean> false Whether to show interactive controls (draggable markers). Requires visualize. Default: false