<sk-spherical-gradient-field>

← prev index next →

A radial falloff around a point — weight fades from full at the centre to zero past an outer radius, the field for "strongest here, weaker with distance."

Remarks

This is the spherical 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 depends only on distance from the field's centre, so it makes a soft sphere of influence.

Key attributes. inner-radius is the full-weight core (weight 1 inside it); outer-radius is where the weight reaches 0; between them it fades linearly, and the inherited remap-curve can reshape that 0→1 transition. Because the field is a scene-graph node, its centre is its own position — move, parent, or animate it and the sphere of influence follows; a non-uniform scale multiplies the effective radii (by the average of sx, sy, sz). visualize draws the inner/outer shells so the falloff is visible while composing.

Related. It shares the field="#id" model with every field: sibling shapes include sk-linear-gradient-field, sk-cube-gradient-field, and sk-torus-gradient-field; sk-noise-spatial-field shapes weight by noise instead of distance. 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
inner-radiusanimatable <number> 1.0 Inner radius — weight = 1 inside this.
outer-radiusanimatable <number> 5.0 Outer radius — weight = 0 outside this.
xanimatable <number> 0 X position.
yanimatable <number> 0 Y position.
zanimatable <number> 0 Z position.
hanimatable <angle> 0 Heading (Y-axis rotation) in radians.
panimatable <angle> 0 Pitch (X-axis rotation) in radians.
banimatable <angle> 0 Bank (Z-axis rotation) in radians.
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