Pushes every point of a host outward from a center node, as far as a field's weight allows — the way to blow a cloud of clones apart or pull it together.
JavaScript API:
RadialPushPointConstraint
This is the radial-push member of the PointConstraint family: like every
point-constraint it runs a GPU
kernel over all of its host's points at once — the clones of a sk-cloner,
or the vertices of a mesh or spline. For each point it forms the direction from a
center node to that point and slides the point along it, so a whole cloud (or
surface) expands or contracts from one center — the classic radial "effector".
Key attributes. origin is REQUIRED — it names the center node the push
radiates from, by #id; because it is a real node it can be parented and animated,
moving the whole burst's center. distance is how far each clone slides (negative
pulls inward), and it is animatable, so keyframing it 0 → distance plays an
explosion. An optional field (by #id, a SpatialField) with
field-weight-range modulates the push per clone — only clones where the field is
strong move; with no field every clone pushes at full strength.
Related. Sibling point-constraints include sk-simple-point-constraint
(field-driven translate/scale/rotate) and sk-target-at-point-constraint
(aim every clone at a node). Its single-node CPU cousin is
sk-field-constraint.
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.
<!-- A flat grid of clones is pushed outward from `origin="#center"` — but only
as much as the spherical field allows, so the burst fades out past the
field's outer radius. `origin` is required (the push center); `distance`
is how far a fully-weighted clone slides. The field's `visualize` markers
show the falloff driving it. -->
<sk-scene>
<sk-directional-light p="52deg" h="23deg" intensity="1.0"></sk-directional-light>
<sk-ambient-light intensity="0.4"></sk-ambient-light>
<sk-scene-node id="center"></sk-scene-node>
<sk-spherical-gradient-field id="push" inner-radius="0" outer-radius="6"
visualize="true"></sk-spherical-gradient-field>
<sk-plain-material id="mat" base-color="#e0a030"></sk-plain-material>
<sk-cloner mode="vertex">
<sk-grid-points-source count-x="12" count-y="1" count-z="12"
spacing-x="0.8" spacing-y="0.8" spacing-z="0.8"></sk-grid-points-source>
<sk-sphere radius="0.15">
<sk-surface-paint material="#mat"></sk-surface-paint>
</sk-sphere>
<sk-radial-push-point-constraint origin="#center" field="#push" distance="2"></sk-radial-push-point-constraint>
</sk-cloner>
</sk-scene>
| Attribute | Type | Default | Description |
|---|---|---|---|
originanimatable |
<id-ref> |
— | The SceneNode whose world position is the push center. reference by id |
fieldanimatable |
<id-ref> |
— | Optional field that modulates the push effect per-point. reference by id |
field-weight-rangeanimatable |
<field-weight-range> ([<number>, <number>]) |
— | The [lo, hi] range the field weight maps onto. |
distanceanimatable |
<number> |
0 |
How far points are pushed along the radial direction. |