<sk-spline-progress-gradient-field>

← prev index next →

Weight that ramps along a spline from start to end — the field for "grade this effect by how far along the path you are."

Remarks

This is the spline-progress 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 "where" is measured along a reference spline: the weight is the normalized arc-length position of the nearest point on the curve.

Key attributes. spline-id names the sk-spline to measure along, by #id. Sampling anywhere in space takes the nearest point on the curve, so the weight is 0 at the spline's start, 1 at its end, and normalized in between; the inherited remap-curve can reshape the ramp. visualize draws the reference so the direction of increase is clear.

Related. It shares the field="#id" model with every field. Its companion is sk-spline-distance-gradient-field (weight by distance from a spline rather than progress along it); other shapes include sk-linear-gradient-field and sk-spherical-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 whose progress drives this field.
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