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.
Declarative element:
<sk-radial-push-point-constraint>
Not on the sk.* global — construct via the declarative element or a module import.
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.
constructor(config?: { origin: SceneNode; distance?: number; field?: Field | null; fieldWeightRange?: readonly [number, number] })
Inherited from: PointConstraint, SkenraAnimatable
— see those pages for inherited members.
| Property | Type | Default | Description | Declared by |
|---|---|---|---|---|
originanimatable |
SceneNode |
— | The node whose world position is the push center, or null when the |
RadialPushPointConstraint |
distanceanimatable |
number |
0 |
How far points are pushed along the radial direction. | RadialPushPointConstraint |
fieldanimatableread-only |
Field | null |
— | The field used by this point constraint, if any. | PointConstraint |
fieldWeightRangeanimatable |
readonly [number, number] |
— | The [lo, hi] range the normalized field weight maps onto. |
PointConstraint |
| Property | Type | Default | Description | Declared by |
|---|---|---|---|---|
targetread-only |
ConstrainablePointsHost | null |
— | The target host this modifier applies to, or null before |
PointConstraint |
sceneread-only |
any |
— | Gets the Scene this animatable belongs to, if any. | SkenraAnimatable |
animationsread-only |
SkenraAnimation[] |
— | Public getter for the animations affecting this target. | SkenraAnimatable |
| Method | Description | Declared by |
|---|---|---|
animate(firstArg: TypedKeyframe<this>[] | TypedPropertyIndexedKeyframes<this> | Record<string, any> | globalThis.Keyframe[] | globalThis.PropertyIndexedKeyframes | null, secondArg?: number | KeyframeAnimationOptions | globalThis.KeyframeAnimationOptions): SkenraAnimation & Animation |
Creates a new SkenraAnimation for this target per Web Animations API. | SkenraAnimatable |
removeAnimation(animation: SkenraAnimation): boolean |
Removes a specific animation from this object. | SkenraAnimatable |
constrain(type: K, config: ConstraintConfigMap[K]): ConstraintReturnMap[K] |
Creates a constraint on this Animatable using a fluent API. | SkenraAnimatable |
const originNode = new SceneNode({ id: 'origin', x: 0, y: 2, z: 0 });
scene.appendChild(originNode);
const constraint = cloner.constrain('radial-push', {
origin: originNode,
distance: 3,
field: sphericalField,
});