Skip to content

Documentation / loaders / applyStrandOriginAnchor

Function: applyStrandOriginAnchor() ​

applyStrandOriginAnchor(sets, anchor): [number, number, number]

Defined in: libs/loaders/src/curves/origin.ts:143

Moves an anchor point of the sets' shared bounding box onto the origin.

Parameters ​

sets ​

StrandPositionSet[]

Strand sets to move, modified in place.

anchor ​

StrandOriginAnchor

Point of the bounding box to bring to the origin.

Returns ​

[number, number, number]

The offset added to every point, or null when the sets held nothing measurable and were left alone.

Remarks ​

Modifies the control points in place. Runs before the unit scale is recorded and is unaffected by it, since scaling about the origin leaves a groom that has been anchored there anchored there.

Released under the MIT License.