<sk-cylinder-gradient-field>

← prev index next →

A tube-shaped falloff around an axis — full weight near a finite cylinder, fading with distance, the field for influence along a shaft or column.

Remarks

This is the cylinder 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 finite cylinder, so the influence hugs a shaft with rounded ends.

Key attributes. inner-radius is the full-weight core (weight 1 within it) and outer-radius is where the weight reaches 0, fading linearly between; height sets the cylinder's finite length along the axis, and past the ends the distance rounds off around the caps. The inherited remap-curve can reshape the 0→1. Because the field is a scene-graph node, the cylinder axis is its local Y axis — rotate the field to aim the tube, move it to place it. visualize draws the inner/outer shells.

Related. It shares the field="#id" model with every field: the capped variant is sk-capsule-gradient-field; other shapes include sk-spherical-gradient-field and sk-torus-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
inner-radiusanimatable <number> 1.0 Inner radius — weight = 1 inside this cylinder radius.
outer-radiusanimatable <number> 5.0 Outer radius — weight = 0 outside this cylinder radius.
heightanimatable <number> 4.0 Height of the cylinder along local Y axis.
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