<sk-torus-gradient-field>

← prev index next →

A ring-shaped falloff — full weight near a circular tube, fading with distance, the field for a halo or ring of influence.

Remarks

This is the torus 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 from a ring, so the influence forms a circular halo rather than a solid blob.

Key attributes. major-radius is the ring size (centre to tube centre); inner-radius is the full-weight tube core (weight 1) and outer-radius is where the weight reaches 0, fading linearly between, with an optional inherited remap-curve available to reshape the 0→1. The ring lies in the field's local x-z plane; because the field is a scene-graph node, a quarter-turn of pitch stands the ring up, and moving the field places the halo. visualize draws the tube shells.

Related. It shares the field="#id" model with every field: other shapes include sk-spherical-gradient-field, sk-cylinder-gradient-field, and sk-cube-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
major-radiusanimatable <number> 3.0 Distance from torus center to tube center.
inner-radiusanimatable <number> 0.5 Tube radius where weight = 1.
outer-radiusanimatable <number> 3.0 Tube radius where weight = 0.
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