@weasel-js/geom 1.12.0 → 1.13.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -339,6 +339,12 @@ interface TrackNearestOptions {
339
339
  * the middle. */
340
340
  about?: number;
341
341
  }
342
+ /** How `at` treats a fraction past 0 or 1. */
343
+ interface TrackAtOptions {
344
+ /** Carry on past the ends rather than clamp: a line and an open path straight along their end, an arc and an ellipse
345
+ * round themselves, a closed path round its contour. Default false. */
346
+ open?: boolean;
347
+ }
342
348
  /** Which family a track shape belongs to. `'path'` is a shape over a measured `Path` (`pathShape`). */
343
349
  type TrackShapeKind = 'line' | 'arc' | 'ellipse' | 'path';
344
350
  /** A curve a control lies along, addressed by fraction 0..1 of its length. */
@@ -347,8 +353,8 @@ interface TrackShape {
347
353
  readonly length: number;
348
354
  /** True when the track's end meets its start: a whole circle or ellipse, or a path that is one closed contour. */
349
355
  readonly closed: boolean;
350
- /** The station at fraction `f`, clamped to 0..1. */
351
- at(f: number): TrackStation;
356
+ /** The station at fraction `f`, clamped to 0..1 unless `options.open`. */
357
+ at(f: number, options?: TrackAtOptions): TrackStation;
352
358
  /** The spot on the track nearest `p`. */
353
359
  nearest(p: Point, options?: TrackNearestOptions): TrackNearest;
354
360
  }
@@ -410,6 +416,10 @@ declare function pathShape(path: Path, options?: {
410
416
  * `angle` the CSS rotation in degrees that tips an upright item to it (0 = upright, clockwise positive, in (-180, 180]). */
411
417
  interface TrackPlace extends TrackStation {
412
418
  angle: number;
419
+ /** True when `normal` points down the screen, so an item tipped by `angle` reads upside down. A run is turned over
420
+ * by one place alone, so one across 3 or 9 o'clock has turned places toward one end; an item that should read
421
+ * upright turns a half turn about its own center there. Nothing else in the place reflects it. */
422
+ turned: boolean;
413
423
  }
414
424
  /** The stretch `from..to` of a shape in reading order. It is itself a TrackShape: `at(g)` and `nearest(p).f` are
415
425
  * in reading order, g = 0 at the reading start. */
@@ -422,7 +432,7 @@ interface TrackRun extends TrackShape {
422
432
  readonly flipped: boolean;
423
433
  /** True when reading order runs against the shape's own direction. */
424
434
  readonly reversed: boolean;
425
- at(g: number): TrackPlace;
435
+ at(g: number, options?: TrackAtOptions): TrackPlace;
426
436
  }
427
437
  /** Which side of a shape a run's items stand on: `'auto'` whichever is upright, `'path'` the shape's own normal, `'flipped'`
428
438
  * the other. */
@@ -442,6 +452,23 @@ declare function trackRun(shape: TrackShape, from?: number, to?: number, options
442
452
  * 64-step polyline. A whole path shape is its path's own data. */
443
453
  declare function trackShapeD(shape: TrackShape, from?: number, to?: number): string;
444
454
 
455
+ /** Which way `shape` bends, against its own normal: 1 toward it, -1 away from it, 0 straight. A shape that bends both
456
+ * ways answers for the way it turns more in all. An arc and an ellipse bend away from their normal. */
457
+ declare function bendSide(shape: TrackShape): -1 | 0 | 1;
458
+ /**
459
+ * The track `shift` px along `shape`'s normal from it at every point — negative is against the normal — as a track
460
+ * of its own, addressed by fraction of its own length, its tangent and normal those of `shape` at the point it came
461
+ * from. Null when the shift reaches a center of curvature, where the track would fold back over itself: an arc shifted
462
+ * in by its radius or more.
463
+ */
464
+ declare function shiftTrack(shape: TrackShape, shift: number): TrackShape | null;
465
+
466
+ /**
467
+ * The stretch `from..to` of a shape (fractions of it, `from` below `to`) as a shape of its own, running the same way.
468
+ * An arc stays an arc and an ellipse an ellipse, so `trackShapeD` still draws it as one; any other shape is read through.
469
+ */
470
+ declare function trackSlice(shape: TrackShape, from: number, to: number): TrackShape;
471
+
445
472
  /** Where a sequence sits along a run: against its reading start, its middle, or its reading end. */
446
473
  type RunAlign = 'start' | 'center' | 'end';
447
474
  /** The order {@link placeAlongRun} lays items in: along the run's reading order, or from the end where the underlying
@@ -460,9 +487,12 @@ interface RunSpot {
460
487
  declare function runPlaces(lengths: readonly number[], gap: number, room: number, align: RunAlign, offset: number, at?: number): RunSpot[];
461
488
  /** How long items of `lengths` are laid end to end with `gap` between each two. */
462
489
  declare function runLength(lengths: readonly number[], gap: number): number;
463
- /** The place `distance` along `run`; past either end it carries on straight along that end, tipped as it is there. The
464
- * point then moves `shift` along the place's up. */
465
- declare function runStationAt(run: TrackRun, distance: number, shift?: number): TrackPlace;
490
+ /** How {@link runStationAt} carries a place past either end of its run: straight along that end, tipped as it is there
491
+ * (`'extend'`), or on along the run's shape itself (`'follow'`), as a shape's `at` reads `open`. */
492
+ type RunPast = 'extend' | 'follow';
493
+ /** The place `distance` along `run`, carried past either end as `past` says (default `'extend'`). The point then moves
494
+ * `shift` along the place's up. */
495
+ declare function runStationAt(run: TrackRun, distance: number, shift?: number, past?: RunPast): TrackPlace;
466
496
  /** How {@link placeAlongRun} lays its items: spacing, alignment, offset, anchor, stand-off, wrap and past-end handling. */
467
497
  interface PlaceAlongRunOptions {
468
498
  /** Space between each two items, along the run. Default 0. */
@@ -478,8 +508,9 @@ interface PlaceAlongRunOptions {
478
508
  /** Carry items on round a closed run past its seam, and count an item past once it is a whole lap on from the first
479
509
  * item's start. Default false. */
480
510
  wrap?: boolean;
481
- /** Where an item wholly past an end is placed: carried on beyond it (`'extend'`, the default) or held at it. */
482
- past?: 'extend' | 'hold';
511
+ /** Where an item past an end is placed: carried on straight beyond it (`'extend'`, the default), or on along the run's
512
+ * own shape (`'follow'`); `'hold'` follows the shape until the item is wholly past, then holds it at that end. */
513
+ past?: RunPast | 'hold';
483
514
  /** `'reading'` (the default) lays item 1 at the run's reading start. `'track'` lays it at the shape's own start and
484
515
  * proceeds in the shape's direction; items still stand as the run reads them. In `'track'` order `align`, `at`,
485
516
  * `offset` and each `center` are measured from the shape's start. */
@@ -3074,4 +3105,4 @@ declare function reviveTypedArrays(value: unknown): unknown;
3074
3105
  /** `tagTypedArrays` as a `JSON.stringify` replacer. */
3075
3106
  declare function typedArrayReplacer(_key: string, value: unknown): unknown;
3076
3107
 
3077
- export { ANCHOR_FIELDS, type Affine, type AnchorField, type AnchorFieldValues, type AnchorPair, type AnchorPathMeasure, AnchorSet, type AnchorSubpathMeasure, type AnchorSymmetry, type ArcTrackShape, type ArcTrackSpec, type AverageAxis, type BendAlongPathOptions, type BendGrip, type BezierEasing, type BlendPathsOptions, type Box, CONSTRAINT_TOLERANCE, CORNER_RESTORE_TOLERANCE, type ConflictingConstraintsOptions, type ConstrainPathEditOptions, type ConstrainedPathEdit, type ConstrainedPathsEdit, type ConstraintPoint, type CornerCut, type CornerFrame, CornerPiece, CornerSpec, type CornerTrace, type CubicContour, type CubicCoords, type CubicSegment, type CurveNearest, DEFAULT_FLATTEN_TOLERANCE, type DirectionMark, EASINGS, EPS, type EasingFn, type EasingName, type EasingSpec, type EllipseTrackShape, type EllipseTrackSpec, type ExtendToMeetOptions, type FramedBox, type GlMat3, type GrowRegionOptions, type HandleBalance, type HandleRef, type JoinOptions, type LengthenMode, type LineCoords, type MeasureAnchorPathOptions, type MeasurePathOptions, type MergeRegionOptions, type NumberEntry, type NumberTypedArray, type OpenPathEnd, PATH_C, PATH_CMD_LENGTHS, PATH_COMMANDS, PATH_L, PATH_M, PATH_Q, PATH_SNAP_KINDS, PATH_Z, Path, type PathAnchorHit, type PathAwayFromAnchors, type PathBlend, PathBuilder, type PathCommandCode, type PathCommandName, type PathConstraint, type PathConstraintKind, type PathCrossing, type PathEndFrame, PathFillRule, type PathInWorldPose, type PathLink, type PathMeasure, type PathNearest, type PathNearestStation, PathOpenFill, type PathSegment, type PathSnapHit, type PathSnapIndex, type PathSnapKind, type PathSnapQuery, type PathSnapTarget, type PathStation, type PathStop, type PathTrackShape, type PathsEditItem, PenAnchor, type PlaceAlongRunOptions, type PlaceRectOptions, type PlacedRect, type Placement, type PlacementAlign, type PlacementSide, Point, type PointAlongPathOptions, type PointInPathOptions, type PointOrigin, type PolygonIntersectsPathOptions, PolygonPath, type PoseLinear, type PoseRotation, type QuadraticCoords, type Rect, RectPath, type RepeatAlongPathOptions, type RepeatStation, type ResamplePathOptions, type ResolvedCorners, type RunAlign, type RunOrder, type RunPlace, type RunSpot, SPRING_PRESETS, Scale2, type SegmentCrossing, type SegmentMeasure, type SegmentRef, type SegmentType, type SimplifyPathOptions, type SmudgePathOptions, type SoftFalloff, type SolveConstraintsOptions, type SolveConstraintsResult, type SolvePathConstraintsResult, type SpiroContour, SpiroKind, type SpiroPath, SpiroPoint, type SpiroToPathOptions, type SpringPreset, type SpringPresetName, type StaticPathSnapKind, type StrokeHitTestOptions, type SubpathEnd, TYPED_ARRAY_CONSTRUCTORS, type TaggedTypedArray, type TrackNearest, type TrackNearestOptions, type TrackPlace, type TrackRun, type TrackRunOptions, type TrackShape, type TrackShapeKind, type TrackSide, type TrackStation, type TrimPathOptions, type TrimResult, type TypedArrayTag, type UnsatisfiedConstraintsOptions, type View, ZOOM_FLOOR, addExtremaAnchors, anchorOriginsOf, anchorSymmetries, anchorSymmetry, anchorsBefore, anchorsUnderBrush, anchorsWhere, applyToPoint, approxEq, arcShape, asPolygonPath, averageAnchorsAt, balanceFactorToward, bendAlongPath, bendSegment, blendPaths, boundsOfCoords, boundsOfPath, boxContainsBox, boxContainsPoint, boxToBox, circlePath, clamp, clampRectWithin, closestOpenEnds, composePath, conflictingConstraints, constrainPathEdit, constrainPathsEdit, constraintAnchors, constraintApplies, constraintFits, convertSegments, cornerAnchors, cornerCuts, cornerFrameAt, cornerFrames, cornerTraces, createPathSnapIndex, cross, cubicAxisExtremaTs, cubicBezierEasing, cubicBounds, cubicContoursToPath, cubicEvalAt, decomposePath, defaultOpenFill, directionMarks, dot, easeIn, easeInBack, easeInBounce, easeInCirc, easeInCubic, easeInElastic, easeInExpo, easeInOut, easeInOutBack, easeInOutBounce, easeInOutCirc, easeInOutCubic, easeInOutElastic, easeInOutExpo, easeInOutQuad, easeInOutQuart, easeInOutQuint, easeInOutSine, easeInQuad, easeInQuart, easeInQuint, easeInSine, easeOut, easeOutBack, easeOutBounce, easeOutCirc, easeOutCubic, easeOutElastic, easeOutExpo, easeOutQuad, easeOutQuart, easeOutQuint, easeOutSine, editAnchorSetTracked, elevateQuadraticToCubic, ellipsePath, ellipseShape, equalizeSegmentHandles, everyNthAnchor, extendToMeet, fillsOpenSubpaths, findPathSnap, findPathSnaps, fitAffine, fitCubicThroughDeletion, fitCubicWithTangents, flatIndexesAfterReverse, flattenCubic, flattenCubicWithArcLen, flattenQuadratic, flattenQuadraticWithArcLen, forEachSegment, growAnchorSelection, growRegion, handleAlongItsAngle, handleAtItsLength, handleBalances, harmonizeAnchors, hasOpenSubpath, identity$1 as identity, intersectSegments, invert$1 as invert, invertAnchorSelection, isSegmentStraight, joinAnchorsAt, joinSubpathEnds, keepCorners, len2, lengthToward, lengthenOpenEnd, lengthenPathEnd, linePath, lineShape, linear, makeHandlesSymmetric, mapConstraintAnchors, mat3, meanScale, measureAnchorPath, measurePath, mergeRegion, moveHandleSymmetric, multiply$1 as multiply, nearestOnCubic, nearestOnLine, nearestOnPath, nearestOnQuadratic, nearestPathAnchor, normalizeZoom, offsetCornerTraces, openEndAt, openEndRay, openPathEnds, pathAnchorPoints, pathAwayFromAnchors, pathCommandCoordCount, pathContainsPoint, pathContainsPolygon, pathContainsRect, pathCrossings, pathDistanceToPoint, pathEndAnchorIndex, pathEndFrame, pathFromD, pathInPoseFrame, pathInWorld, pathIntersectsPolygon, pathIntersectsRect, pathSegments, pathShape, pathSignedArea, pathThroughPoseFrame, pathToCubicContours, pathToD, placeAlongRun, placeRect, pointAlongPath, pointInPath, pointInPolygon, pointSegmentDist2, polygonContainsPath, polygonFromPoints, polygonIntersectsPath, polylineFromPoints, portControls, portCurvePoints, poseFrameInverseOf, poseFrameOf, poseLinearOf, poseRotationOf, prepareBlend, quadraticEvalAt, readAnchorFields, rectMarkerPath, rectPath, rectToContour, regularPolygonPath, remapAnchorValues, remapConstraints, remapPerAnchor, remapPointValues, repeatAlongPath, resamplePath, resolveCorners, resolveCornersWithSources, resolveEasing, restoreCorners, retractHandles, reverseAnchors, reversePath, reverseSubpaths, reviveTypedArrays, rotate, rotateAboutPoint, rotatePathAround, roundRectPath, runLength, runPlaces, runStationAt, scale, scalePathToBounds, scaleSegmentHandles, schneiderFit, segmentBetween, segmentExtremaTs, segmentsBetweenAnchors, segmentsCross, setDefaultOpenFill, setSubpathStart, shrinkAnchorSelection, sign, simplifyAnchorsAt, simplifyPath, simplifySpan, simplifySubpath, smoothAnchors, smudgePath, softFalloff, softSelectionBand, softSelectionWeights, solveConstraints, solvePathConstraints, spiroContoursFromControl, spiroContoursOf, spiroControlPath, spiroToPath, splitByClosure, splitCubicAt, splitLineAt, splitQuadraticAt, splitSubpaths, squarePath, starPath, stationsAlongPath, strokeHitTest, sub, subpathEndAt, subpathsOfAnchors, tagTypedArray, tagTypedArrays, trackRun, trackShapeD, transformCoords, transformPath, translate, translateAnchorsSymmetric, translatePath, trimPathAt, typedArrayReplacer, unionBoundsPath, unionBox, unsatisfiedConstraints, untagTypedArray, viewToMat3, withAnchorPoints, worldEditToStorage, writeAnchorField };
3108
+ export { ANCHOR_FIELDS, type Affine, type AnchorField, type AnchorFieldValues, type AnchorPair, type AnchorPathMeasure, AnchorSet, type AnchorSubpathMeasure, type AnchorSymmetry, type ArcTrackShape, type ArcTrackSpec, type AverageAxis, type BendAlongPathOptions, type BendGrip, type BezierEasing, type BlendPathsOptions, type Box, CONSTRAINT_TOLERANCE, CORNER_RESTORE_TOLERANCE, type ConflictingConstraintsOptions, type ConstrainPathEditOptions, type ConstrainedPathEdit, type ConstrainedPathsEdit, type ConstraintPoint, type CornerCut, type CornerFrame, CornerPiece, CornerSpec, type CornerTrace, type CubicContour, type CubicCoords, type CubicSegment, type CurveNearest, DEFAULT_FLATTEN_TOLERANCE, type DirectionMark, EASINGS, EPS, type EasingFn, type EasingName, type EasingSpec, type EllipseTrackShape, type EllipseTrackSpec, type ExtendToMeetOptions, type FramedBox, type GlMat3, type GrowRegionOptions, type HandleBalance, type HandleRef, type JoinOptions, type LengthenMode, type LineCoords, type MeasureAnchorPathOptions, type MeasurePathOptions, type MergeRegionOptions, type NumberEntry, type NumberTypedArray, type OpenPathEnd, PATH_C, PATH_CMD_LENGTHS, PATH_COMMANDS, PATH_L, PATH_M, PATH_Q, PATH_SNAP_KINDS, PATH_Z, Path, type PathAnchorHit, type PathAwayFromAnchors, type PathBlend, PathBuilder, type PathCommandCode, type PathCommandName, type PathConstraint, type PathConstraintKind, type PathCrossing, type PathEndFrame, PathFillRule, type PathInWorldPose, type PathLink, type PathMeasure, type PathNearest, type PathNearestStation, PathOpenFill, type PathSegment, type PathSnapHit, type PathSnapIndex, type PathSnapKind, type PathSnapQuery, type PathSnapTarget, type PathStation, type PathStop, type PathTrackShape, type PathsEditItem, PenAnchor, type PlaceAlongRunOptions, type PlaceRectOptions, type PlacedRect, type Placement, type PlacementAlign, type PlacementSide, Point, type PointAlongPathOptions, type PointInPathOptions, type PointOrigin, type PolygonIntersectsPathOptions, PolygonPath, type PoseLinear, type PoseRotation, type QuadraticCoords, type Rect, RectPath, type RepeatAlongPathOptions, type RepeatStation, type ResamplePathOptions, type ResolvedCorners, type RunAlign, type RunOrder, type RunPast, type RunPlace, type RunSpot, SPRING_PRESETS, Scale2, type SegmentCrossing, type SegmentMeasure, type SegmentRef, type SegmentType, type SimplifyPathOptions, type SmudgePathOptions, type SoftFalloff, type SolveConstraintsOptions, type SolveConstraintsResult, type SolvePathConstraintsResult, type SpiroContour, SpiroKind, type SpiroPath, SpiroPoint, type SpiroToPathOptions, type SpringPreset, type SpringPresetName, type StaticPathSnapKind, type StrokeHitTestOptions, type SubpathEnd, TYPED_ARRAY_CONSTRUCTORS, type TaggedTypedArray, type TrackAtOptions, type TrackNearest, type TrackNearestOptions, type TrackPlace, type TrackRun, type TrackRunOptions, type TrackShape, type TrackShapeKind, type TrackSide, type TrackStation, type TrimPathOptions, type TrimResult, type TypedArrayTag, type UnsatisfiedConstraintsOptions, type View, ZOOM_FLOOR, addExtremaAnchors, anchorOriginsOf, anchorSymmetries, anchorSymmetry, anchorsBefore, anchorsUnderBrush, anchorsWhere, applyToPoint, approxEq, arcShape, asPolygonPath, averageAnchorsAt, balanceFactorToward, bendAlongPath, bendSegment, bendSide, blendPaths, boundsOfCoords, boundsOfPath, boxContainsBox, boxContainsPoint, boxToBox, circlePath, clamp, clampRectWithin, closestOpenEnds, composePath, conflictingConstraints, constrainPathEdit, constrainPathsEdit, constraintAnchors, constraintApplies, constraintFits, convertSegments, cornerAnchors, cornerCuts, cornerFrameAt, cornerFrames, cornerTraces, createPathSnapIndex, cross, cubicAxisExtremaTs, cubicBezierEasing, cubicBounds, cubicContoursToPath, cubicEvalAt, decomposePath, defaultOpenFill, directionMarks, dot, easeIn, easeInBack, easeInBounce, easeInCirc, easeInCubic, easeInElastic, easeInExpo, easeInOut, easeInOutBack, easeInOutBounce, easeInOutCirc, easeInOutCubic, easeInOutElastic, easeInOutExpo, easeInOutQuad, easeInOutQuart, easeInOutQuint, easeInOutSine, easeInQuad, easeInQuart, easeInQuint, easeInSine, easeOut, easeOutBack, easeOutBounce, easeOutCirc, easeOutCubic, easeOutElastic, easeOutExpo, easeOutQuad, easeOutQuart, easeOutQuint, easeOutSine, editAnchorSetTracked, elevateQuadraticToCubic, ellipsePath, ellipseShape, equalizeSegmentHandles, everyNthAnchor, extendToMeet, fillsOpenSubpaths, findPathSnap, findPathSnaps, fitAffine, fitCubicThroughDeletion, fitCubicWithTangents, flatIndexesAfterReverse, flattenCubic, flattenCubicWithArcLen, flattenQuadratic, flattenQuadraticWithArcLen, forEachSegment, growAnchorSelection, growRegion, handleAlongItsAngle, handleAtItsLength, handleBalances, harmonizeAnchors, hasOpenSubpath, identity$1 as identity, intersectSegments, invert$1 as invert, invertAnchorSelection, isSegmentStraight, joinAnchorsAt, joinSubpathEnds, keepCorners, len2, lengthToward, lengthenOpenEnd, lengthenPathEnd, linePath, lineShape, linear, makeHandlesSymmetric, mapConstraintAnchors, mat3, meanScale, measureAnchorPath, measurePath, mergeRegion, moveHandleSymmetric, multiply$1 as multiply, nearestOnCubic, nearestOnLine, nearestOnPath, nearestOnQuadratic, nearestPathAnchor, normalizeZoom, offsetCornerTraces, openEndAt, openEndRay, openPathEnds, pathAnchorPoints, pathAwayFromAnchors, pathCommandCoordCount, pathContainsPoint, pathContainsPolygon, pathContainsRect, pathCrossings, pathDistanceToPoint, pathEndAnchorIndex, pathEndFrame, pathFromD, pathInPoseFrame, pathInWorld, pathIntersectsPolygon, pathIntersectsRect, pathSegments, pathShape, pathSignedArea, pathThroughPoseFrame, pathToCubicContours, pathToD, placeAlongRun, placeRect, pointAlongPath, pointInPath, pointInPolygon, pointSegmentDist2, polygonContainsPath, polygonFromPoints, polygonIntersectsPath, polylineFromPoints, portControls, portCurvePoints, poseFrameInverseOf, poseFrameOf, poseLinearOf, poseRotationOf, prepareBlend, quadraticEvalAt, readAnchorFields, rectMarkerPath, rectPath, rectToContour, regularPolygonPath, remapAnchorValues, remapConstraints, remapPerAnchor, remapPointValues, repeatAlongPath, resamplePath, resolveCorners, resolveCornersWithSources, resolveEasing, restoreCorners, retractHandles, reverseAnchors, reversePath, reverseSubpaths, reviveTypedArrays, rotate, rotateAboutPoint, rotatePathAround, roundRectPath, runLength, runPlaces, runStationAt, scale, scalePathToBounds, scaleSegmentHandles, schneiderFit, segmentBetween, segmentExtremaTs, segmentsBetweenAnchors, segmentsCross, setDefaultOpenFill, setSubpathStart, shiftTrack, shrinkAnchorSelection, sign, simplifyAnchorsAt, simplifyPath, simplifySpan, simplifySubpath, smoothAnchors, smudgePath, softFalloff, softSelectionBand, softSelectionWeights, solveConstraints, solvePathConstraints, spiroContoursFromControl, spiroContoursOf, spiroControlPath, spiroToPath, splitByClosure, splitCubicAt, splitLineAt, splitQuadraticAt, splitSubpaths, squarePath, starPath, stationsAlongPath, strokeHitTest, sub, subpathEndAt, subpathsOfAnchors, tagTypedArray, tagTypedArrays, trackRun, trackShapeD, trackSlice, transformCoords, transformPath, translate, translateAnchorsSymmetric, translatePath, trimPathAt, typedArrayReplacer, unionBoundsPath, unionBox, unsatisfiedConstraints, untagTypedArray, viewToMat3, withAnchorPoints, worldEditToStorage, writeAnchorField };
package/dist/index.js CHANGED
@@ -93,8 +93,8 @@ function lineShape(from, to) {
93
93
  kind: "line",
94
94
  length: length2,
95
95
  closed: false,
96
- at(f) {
97
- const t = clamp(f, 0, 1);
96
+ at(f, options) {
97
+ const t = options?.open ? f : clamp(f, 0, 1);
98
98
  return {
99
99
  point: { x: from.x + t * dx2, y: from.y + t * dy2 },
100
100
  tangent: { ...tangent },
@@ -119,8 +119,8 @@ function arcShape(spec) {
119
119
  const raw = mod360(sign2 * (spec.end - start));
120
120
  const sweep = raw === 0 ? 360 : raw;
121
121
  const length2 = radius * sweep * RAD;
122
- const at2 = (f) => {
123
- const t = clamp(f, 0, 1);
122
+ const at2 = (f, options) => {
123
+ const t = options?.open ? f : clamp(f, 0, 1);
124
124
  const theta = (start + sign2 * t * sweep) * RAD;
125
125
  const s = Math.sin(theta);
126
126
  const c = Math.cos(theta);
@@ -249,8 +249,18 @@ function ellipseShape(spec) {
249
249
  const raw = mod3602(sign2 * (param(spec.end) - e.t0));
250
250
  const sweep = raw === 0 ? 360 : raw;
251
251
  const { length: length2, lengthTo, offsetAt } = lengthTable(e, sweep);
252
- const at2 = (f) => {
253
- const u = offsetAt(clamp(f, 0, 1));
252
+ const offsetPast = (f) => {
253
+ if (raw === 0) return offsetAt((f % 1 + 1) % 1);
254
+ let u = f * sweep;
255
+ for (let i = 0; i < 8; i++) {
256
+ const v = speed(e, u);
257
+ if (!(v > 0)) break;
258
+ u -= (lengthTo(u) - f * length2) / v;
259
+ }
260
+ return u;
261
+ };
262
+ const at2 = (f, options) => {
263
+ const u = options?.open && (f < 0 || f > 1) ? offsetPast(f) : offsetAt(clamp(f, 0, 1));
254
264
  const t = (e.t0 + sign2 * u) * RAD2;
255
265
  const s = Math.sin(t);
256
266
  const c = Math.cos(t);
@@ -407,9 +417,12 @@ function pathShape(path, options = {}) {
407
417
  kind: "path",
408
418
  length: length2,
409
419
  closed,
410
- at(f) {
411
- const { point, tangent } = measure2.at(clamp(f, 0, 1) * length2, true);
412
- return { point, tangent, normal: { x: tangent.y, y: -tangent.x } };
420
+ at(f, options2) {
421
+ const open = options2?.open === true && (f < 0 || f > 1);
422
+ const g = open && closed ? (f % 1 + 1) % 1 : clamp(f, 0, 1);
423
+ const { point, tangent } = measure2.at(g * length2, true);
424
+ const past = open && !closed ? (f - g) * length2 : 0;
425
+ return { point: { x: point.x + past * tangent.x, y: point.y + past * tangent.y }, tangent, normal: { x: tangent.y, y: -tangent.x } };
413
426
  },
414
427
  nearest(p, opts) {
415
428
  const n = measure2.nearest(p);
@@ -425,10 +438,11 @@ function pathShape(path, options = {}) {
425
438
  }
426
439
 
427
440
  // src/track/run.ts
441
+ var pointsDown = (normal2) => normal2.y > 1e-9;
428
442
  function trackRun(shape, from = 0, to = 1, options = {}) {
429
443
  const { side = "auto", about = (from + to) / 2 } = options;
430
444
  const mid = shape.at(about);
431
- const flipped = side === "auto" ? mid.normal.y > 1e-9 : side === "flipped";
445
+ const flipped = side === "auto" ? pointsDown(mid.normal) : side === "flipped";
432
446
  const sgn = flipped ? -1 : 1;
433
447
  const reading = (n) => ({ x: -(sgn * n.y), y: sgn * n.x });
434
448
  const r0 = reading(mid.normal);
@@ -437,15 +451,17 @@ function trackRun(shape, from = 0, to = 1, options = {}) {
437
451
  const lo = Math.min(from, to);
438
452
  const hi = Math.max(from, to);
439
453
  const toF = (g) => reversed3 ? to - g * span : from + g * span;
440
- const at2 = (g) => {
441
- const s = shape.at(toF(clamp(g, 0, 1)));
454
+ const at2 = (g, options2) => {
455
+ const s = options2?.open ? shape.at(toF(g), options2) : shape.at(toF(clamp(g, 0, 1)));
442
456
  const dir = reading(s.normal);
443
457
  const angle = Math.atan2(dir.y, dir.x) * 180 / Math.PI;
458
+ const normal2 = { x: sgn * s.normal.x, y: sgn * s.normal.y };
444
459
  return {
445
460
  point: s.point,
446
461
  tangent: dir,
447
- normal: { x: sgn * s.normal.x, y: sgn * s.normal.y },
448
- angle: angle === 0 ? 0 : angle === -180 ? 180 : angle
462
+ normal: normal2,
463
+ angle: angle === 0 ? 0 : angle === -180 ? 180 : angle,
464
+ turned: pointsDown(normal2)
449
465
  };
450
466
  };
451
467
  const toG = (f) => span === 0 ? 0 : reversed3 ? (to - f) / span : (f - from) / span;
@@ -545,6 +561,109 @@ function trackShapeD(shape, from = 0, to = 1) {
545
561
  return d;
546
562
  }
547
563
 
564
+ // src/track/shift.ts
565
+ var SAMPLES2 = 256;
566
+ var dot2 = (a, b) => a.x * b.x + a.y * b.y;
567
+ function bendSide(shape) {
568
+ let turn = 0;
569
+ let prev = shape.at(0);
570
+ for (let i = 1; i <= SAMPLES2; i++) {
571
+ const next = shape.at(i / SAMPLES2);
572
+ turn += dot2({ x: next.tangent.x - prev.tangent.x, y: next.tangent.y - prev.tangent.y }, prev.normal);
573
+ prev = next;
574
+ }
575
+ return Math.abs(turn) < 1e-9 ? 0 : turn > 0 ? 1 : -1;
576
+ }
577
+ function shiftTrack(shape, shift) {
578
+ if (shift === 0) return shape;
579
+ const moved2 = (s) => ({ ...s, point: { x: s.point.x + shift * s.normal.x, y: s.point.y + shift * s.normal.y } });
580
+ const table = new Float64Array(SAMPLES2 + 1);
581
+ let prev = moved2(shape.at(0));
582
+ for (let i = 1; i <= SAMPLES2; i++) {
583
+ const next = moved2(shape.at(i / SAMPLES2));
584
+ const step = { x: next.point.x - prev.point.x, y: next.point.y - prev.point.y };
585
+ const tangent = { x: prev.tangent.x + next.tangent.x, y: prev.tangent.y + next.tangent.y };
586
+ if (shape.length > 0 && dot2(step, tangent) <= 0) return null;
587
+ table[i] = table[i - 1] + Math.hypot(step.x, step.y);
588
+ prev = next;
589
+ }
590
+ const length2 = table[SAMPLES2];
591
+ const per = shape.length / SAMPLES2;
592
+ const startRatio = table[1] > 0 ? per / table[1] : 1;
593
+ const endRatio = table[SAMPLES2] - table[SAMPLES2 - 1] > 0 ? per / (table[SAMPLES2] - table[SAMPLES2 - 1]) : 1;
594
+ const toBase = (f) => {
595
+ const d = f * length2;
596
+ if (length2 <= 0 || shape.length <= 0) return f;
597
+ if (d < 0) return d * startRatio / shape.length;
598
+ if (d > length2) return 1 + (d - length2) * endRatio / shape.length;
599
+ let lo = 0;
600
+ let hi = SAMPLES2;
601
+ while (hi - lo > 1) {
602
+ const mid = lo + hi >> 1;
603
+ if (table[mid] <= d) lo = mid;
604
+ else hi = mid;
605
+ }
606
+ const span = table[hi] - table[lo];
607
+ return (lo + (span > 0 ? (d - table[lo]) / span : 0)) / SAMPLES2;
608
+ };
609
+ const fromBase = (g) => {
610
+ if (length2 <= 0 || shape.length <= 0) return g;
611
+ if (g < 0) return g * shape.length / startRatio / length2;
612
+ if (g > 1) return (length2 + (g - 1) * shape.length / endRatio) / length2;
613
+ const x = g * SAMPLES2;
614
+ const i = Math.min(SAMPLES2 - 1, Math.floor(x));
615
+ return (table[i] + (x - i) * (table[i + 1] - table[i])) / length2;
616
+ };
617
+ const at2 = (f, options) => moved2(shape.at(toBase(options?.open ? f : clamp(f, 0, 1)), options));
618
+ return {
619
+ kind: shape.kind,
620
+ length: length2,
621
+ closed: shape.closed,
622
+ at: at2,
623
+ nearest(p, options) {
624
+ const base = shape.nearest(p, options?.open ? { open: true, about: toBase(options.about ?? 0.5) } : void 0);
625
+ const f = fromBase(base.f);
626
+ const q = at2(f, options).point;
627
+ return { f, dist: Math.hypot(p.x - q.x, p.y - q.y) };
628
+ }
629
+ };
630
+ }
631
+
632
+ // src/track/slice.ts
633
+ var RAD3 = Math.PI / 180;
634
+ var seen = (c, p) => Math.atan2(p.x - c.x, c.y - p.y) / RAD3;
635
+ function trackSlice(shape, from, to) {
636
+ const lo = clamp(Math.min(from, to), 0, 1);
637
+ const hi = clamp(Math.max(from, to), 0, 1);
638
+ if (lo === 0 && hi === 1) return shape;
639
+ const a = shape.at(lo).point;
640
+ const b = shape.at(hi).point;
641
+ if (shape.kind === "line") return lineShape(a, b);
642
+ if (shape.kind === "arc" && "arc" in shape) {
643
+ const { center, radius, direction } = shape.arc;
644
+ if (hi === lo) return arcShape({ center, radius: 0, start: 0, end: 0 });
645
+ return arcShape({ center, radius, start: seen(center, a), end: seen(center, b), direction });
646
+ }
647
+ if (shape.kind === "ellipse" && "ellipse" in shape) {
648
+ const { center, radiusX, radiusY, direction } = shape.ellipse;
649
+ if (hi === lo) return ellipseShape({ center, radiusX: 0, radiusY: 0, start: 0, end: 0 });
650
+ return ellipseShape({ center, radiusX, radiusY, start: seen(center, a), end: seen(center, b), direction });
651
+ }
652
+ const span = hi - lo;
653
+ return {
654
+ kind: shape.kind,
655
+ length: shape.length * span,
656
+ closed: false,
657
+ at: (f, options) => shape.at(lo + (options?.open ? f : clamp(f, 0, 1)) * span, options),
658
+ nearest(p) {
659
+ const n = shape.nearest(p);
660
+ const f = clamp(n.f, lo, hi);
661
+ const q = shape.at(f).point;
662
+ return { f: span === 0 ? 0 : (f - lo) / span, dist: Math.hypot(p.x - q.x, p.y - q.y) };
663
+ }
664
+ };
665
+ }
666
+
548
667
  // src/track/place.ts
549
668
  var clipOf = (lo, hi, start, end, hair = 0) => lo >= start - hair && hi <= end + hair ? "none" : hi <= start + hair || lo >= end - hair ? "past" : "part";
550
669
  function runPlaces(lengths, gap, room, align, offset2, at2) {
@@ -562,14 +681,19 @@ function runPlaces(lengths, gap, room, align, offset2, at2) {
562
681
  function runLength(lengths, gap) {
563
682
  return lengths.reduce((sum, length2, i) => sum + length2 + (i > 0 ? gap : 0), 0);
564
683
  }
565
- function runStationAt(run2, distance, shift = 0) {
684
+ function runStationAt(run2, distance, shift = 0, past = "extend") {
566
685
  const { length: length2 } = run2;
686
+ if (past === "follow" && length2 > 0) {
687
+ const place2 = run2.at(distance / length2, { open: true });
688
+ const { point: point2, normal: normal3 } = place2;
689
+ return { ...place2, point: { x: point2.x + shift * normal3.x, y: point2.y + shift * normal3.y } };
690
+ }
567
691
  const place = run2.at(length2 === 0 ? 0 : distance / length2);
568
- const past = distance < 0 ? distance : distance > length2 ? distance - length2 : 0;
692
+ const beyond = distance < 0 ? distance : distance > length2 ? distance - length2 : 0;
569
693
  const { point, tangent, normal: normal2 } = place;
570
694
  return {
571
695
  ...place,
572
- point: { x: point.x + past * tangent.x + shift * normal2.x, y: point.y + past * tangent.y + shift * normal2.y }
696
+ point: { x: point.x + beyond * tangent.x + shift * normal2.x, y: point.y + beyond * tangent.y + shift * normal2.y }
573
697
  };
574
698
  }
575
699
  function placeAlongRun(run2, lengths, options = {}) {
@@ -584,7 +708,7 @@ function placeAlongRun(run2, lengths, options = {}) {
584
708
  let distance = spot.center;
585
709
  if (past === "hold" && clipped === "past") distance = clamp(distance, lap?.start ?? 0, lap?.end ?? length2);
586
710
  if (lap && length2 > 0) distance = (distance % length2 + length2) % length2;
587
- return { ...runStationAt(run2, mirror ? length2 - distance : distance, shift), center: spot.center, clipped };
711
+ return { ...runStationAt(run2, mirror ? length2 - distance : distance, shift, past === "extend" ? "extend" : "follow"), center: spot.center, clipped };
588
712
  });
589
713
  }
590
714
  function wrapWindow(first, firstLength, length2) {
@@ -1592,9 +1716,9 @@ function arcToCubics(x1, y1, x2, y2, rx, ry, xAxisRotationDeg, largeArc, sweep,
1592
1716
  const cx = cosPhi * cxp - sinPhi * cyp + (x1 + x2) / 2;
1593
1717
  const cy = sinPhi * cxp + cosPhi * cyp + (y1 + y2) / 2;
1594
1718
  const angle = (ux, uy, vx, vy) => {
1595
- const dot2 = ux * vx + uy * vy;
1719
+ const dot3 = ux * vx + uy * vy;
1596
1720
  const len = Math.sqrt((ux * ux + uy * uy) * (vx * vx + vy * vy));
1597
- let a = Math.acos(Math.max(-1, Math.min(1, dot2 / len)));
1721
+ let a = Math.acos(Math.max(-1, Math.min(1, dot3 / len)));
1598
1722
  if (ux * vy - uy * vx < 0) a = -a;
1599
1723
  return a;
1600
1724
  };
@@ -2311,12 +2435,12 @@ function createPathSnapIndex(paths, extra = []) {
2311
2435
  if (kind === "center") return out;
2312
2436
  if (kind === "anchor") {
2313
2437
  segments.forEach((segs, path) => {
2314
- const seen = /* @__PURE__ */ new Set();
2438
+ const seen2 = /* @__PURE__ */ new Set();
2315
2439
  for (const s of segs) {
2316
2440
  for (const p of [s.pts[0], s.pts[s.pts.length - 1]]) {
2317
2441
  const key = `${p.x},${p.y}`;
2318
- if (seen.has(key)) continue;
2319
- seen.add(key);
2442
+ if (seen2.has(key)) continue;
2443
+ seen2.add(key);
2320
2444
  out.push({ kind: "anchor", x: p.x, y: p.y, paths: [path] });
2321
2445
  }
2322
2446
  }
@@ -3304,7 +3428,7 @@ function unit(p) {
3304
3428
 
3305
3429
  // src/paths/growRegion.ts
3306
3430
  var MAX_DEPTH2 = 6;
3307
- var SAMPLES2 = [0.2, 0.35, 0.5, 0.65, 0.8];
3431
+ var SAMPLES3 = [0.2, 0.35, 0.5, 0.65, 0.8];
3308
3432
  function growRegion(path, distance, opts = {}) {
3309
3433
  const b = new PathBuilder();
3310
3434
  if (!(distance > 0)) return b.build();
@@ -3343,15 +3467,15 @@ function joinPieces(prev, next, v, tin, tout, ctx) {
3343
3467
  const gap = Math.hypot(b[0] - a[0], b[1] - a[1]);
3344
3468
  if (gap <= ctx.tol * 1e-3) return [];
3345
3469
  const cross2 = tin[0] * tout[1] - tin[1] * tout[0];
3346
- const dot2 = tin[0] * tout[0] + tin[1] * tout[1];
3347
- const convex = ctx.sigma * cross2 > 0 || Math.abs(cross2) < 1e-9 && dot2 < 0;
3470
+ const dot3 = tin[0] * tout[0] + tin[1] * tout[1];
3471
+ const convex = ctx.sigma * cross2 > 0 || Math.abs(cross2) < 1e-9 && dot3 < 0;
3348
3472
  if (gap <= ctx.tol) return snap(prev, next, a);
3349
3473
  if (!convex) {
3350
3474
  if (trimAtCrossing(prev, next)) return [];
3351
3475
  return [lineSegment(a[0], a[1], v[0], v[1]), lineSegment(v[0], v[1], b[0], b[1])];
3352
3476
  }
3353
3477
  const nin = normal(tin, ctx.sigma), nout = normal(tout, ctx.sigma);
3354
- if (ctx.join === "round") return arc(v, ctx.d, nin, Math.atan2(cross2, dot2));
3478
+ if (ctx.join === "round") return arc(v, ctx.d, nin, Math.atan2(cross2, dot3));
3355
3479
  const cos = nin[0] * nout[0] + nin[1] * nout[1];
3356
3480
  if (1 + cos < 1e-9 || Math.sqrt(2 / (1 + cos)) > ctx.miterLimit) return [lineSegment(a[0], a[1], b[0], b[1])];
3357
3481
  const k = ctx.d / (1 + cos);
@@ -3477,7 +3601,7 @@ function offsetSeg(seg, ctx, depth) {
3477
3601
  }
3478
3602
  function offsetError(c, q, ctx) {
3479
3603
  let worst2 = 0;
3480
- for (const t of SAMPLES2) {
3604
+ for (const t of SAMPLES3) {
3481
3605
  const [dx2, dy2] = derivative(c, t);
3482
3606
  const len = Math.hypot(dx2, dy2);
3483
3607
  if (len < 1e-12) continue;
@@ -6663,6 +6787,6 @@ function typedArrayReplacer(_key, value) {
6663
6787
  return tagTypedArray(value) ?? value;
6664
6788
  }
6665
6789
 
6666
- export { ANCHOR_FIELDS, CONSTRAINT_TOLERANCE, EASINGS, PATH_SNAP_KINDS, SPRING_PRESETS, TYPED_ARRAY_CONSTRUCTORS, ZOOM_FLOOR, addExtremaAnchors, anchorAt, anchorCount, anchorOriginsOf, anchorSymmetries, anchorSymmetry, anchorsBefore, anchorsInRect, anchorsUnderBrush, anchorsWhere, applyToPoint, arcShape, averageAnchorsAt, balanceFactorToward, bendAlongPath, bendSegment, blendPaths, boxToBox, circlePath, clampRectWithin, closestOpenEnds, composePath, conflictingConstraints, constrainPathEdit, constrainPathsEdit, constraintAnchors, constraintApplies, constraintFits, convertSegments, cornerAnchors, createPathSnapIndex, cubicBezierEasing, cubicContoursToPath, decomposePath, deleteAnchorsAt, directionMarks, easeIn, easeInBack, easeInBounce, easeInCirc, easeInCubic, easeInElastic, easeInExpo, easeInOut, easeInOutBack, easeInOutBounce, easeInOutCirc, easeInOutCubic, easeInOutElastic, easeInOutExpo, easeInOutQuad, easeInOutQuart, easeInOutQuint, easeInOutSine, easeInQuad, easeInQuart, easeInQuint, easeInSine, easeOut, easeOutBack, easeOutBounce, easeOutCirc, easeOutCubic, easeOutElastic, easeOutExpo, easeOutQuad, easeOutQuart, easeOutQuint, easeOutSine, editAnchorSet, editAnchorSetTracked, ellipseShape, equalizeSegmentHandles, everyNthAnchor, extendToMeet, findPathSnap, findPathSnaps, fitAffine, fitCubicThroughDeletion, flatAnchorIndex, flatIndexesAfterReverse, growAnchorSelection, growRegion, handleAlongItsAngle, handleAtItsLength, handleBalances, harmonizeAnchors, hasOpenSubpath, identity, insertAnchorOnSegment, intersectSegments, invert, invertAnchorSelection, isSegmentStraight, joinAnchorsAt, joinSubpathEnds, lengthToward, lengthenOpenEnd, lengthenPathEnd, lineShape, linear, locateAnchor, makeHandlesSymmetric, mapConstraintAnchors, mat3, meanScale, measureAnchorPath, measurePath, mergeRegion, moveHandleSymmetric, moveHandleTo, multiply, nearestPathAnchor, normalizeZoom, offsetCornerTraces, openEndAt, openEndRay, openPathEnds, openSubpathAt, pathAnchorPoints, pathAwayFromAnchors, pathContainsPoint, pathContainsPolygon, pathContainsRect, pathCrossings, pathDistanceToPoint, pathEndAnchorIndex, pathEndFrame, pathFromD, pathInPoseFrame, pathInWorld, pathIntersectsPolygon, pathIntersectsRect, pathSegments, pathShape, pathSignedArea, pathThroughPoseFrame, pathToCubicContours, pathToD, placeAlongRun, placeRect, pointAlongPath, pointInPath, polygonContainsPath, polygonIntersectsPath, portControls2 as portControls, portCurvePoints2 as portCurvePoints, poseFrameInverseOf, poseFrameOf, poseLinearOf, poseRotationOf, prepareBlend, pxExtent, readAnchorFields, rectMarkerPath, remapAnchorValues, remapConstraints, remapPointValues, repeatAlongPath, resamplePath, resolveEasing, retractHandles, reverseAnchors, reversePath, reverseSubpaths, reviveTypedArrays, rotate, rotateAboutPoint, rotatePathAround, roundRectPath, runLength, runPlaces, runStationAt, scale, scaleDelta, scalePathToBounds, scaleSegmentHandles, screenAngleOf, segmentAt2 as segmentAt, segmentBetween, segmentExtremaTs, segmentsBetweenAnchors, setSubpathStart, shrinkAnchorSelection, simplifyAnchorsAt, simplifyPath, simplifySpan, simplifySubpath, smoothAnchors, smudgePath, softFalloff, softSelectionBand, softSelectionWeights, solveConstraints, solvePathConstraints, splitByClosure, splitSubpaths, squarePath, standoff, stationsAlongPath, strokeHitTest, subpathEndAt, subpathsOfAnchors, tagTypedArray, tagTypedArrays, trackRun, trackShapeD, transformCoords, transformPath, translate, translateAnchorBy, translateAnchorsSymmetric, translatePath, trimPathAt, typedArrayReplacer, unionBoundsPath, unsatisfiedConstraints, untagTypedArray, viewToMat3, withAnchorPoints, withinPxBox, withinPxRadius, worldEditToStorage, writeAnchorField };
6790
+ export { ANCHOR_FIELDS, CONSTRAINT_TOLERANCE, EASINGS, PATH_SNAP_KINDS, SPRING_PRESETS, TYPED_ARRAY_CONSTRUCTORS, ZOOM_FLOOR, addExtremaAnchors, anchorAt, anchorCount, anchorOriginsOf, anchorSymmetries, anchorSymmetry, anchorsBefore, anchorsInRect, anchorsUnderBrush, anchorsWhere, applyToPoint, arcShape, averageAnchorsAt, balanceFactorToward, bendAlongPath, bendSegment, bendSide, blendPaths, boxToBox, circlePath, clampRectWithin, closestOpenEnds, composePath, conflictingConstraints, constrainPathEdit, constrainPathsEdit, constraintAnchors, constraintApplies, constraintFits, convertSegments, cornerAnchors, createPathSnapIndex, cubicBezierEasing, cubicContoursToPath, decomposePath, deleteAnchorsAt, directionMarks, easeIn, easeInBack, easeInBounce, easeInCirc, easeInCubic, easeInElastic, easeInExpo, easeInOut, easeInOutBack, easeInOutBounce, easeInOutCirc, easeInOutCubic, easeInOutElastic, easeInOutExpo, easeInOutQuad, easeInOutQuart, easeInOutQuint, easeInOutSine, easeInQuad, easeInQuart, easeInQuint, easeInSine, easeOut, easeOutBack, easeOutBounce, easeOutCirc, easeOutCubic, easeOutElastic, easeOutExpo, easeOutQuad, easeOutQuart, easeOutQuint, easeOutSine, editAnchorSet, editAnchorSetTracked, ellipseShape, equalizeSegmentHandles, everyNthAnchor, extendToMeet, findPathSnap, findPathSnaps, fitAffine, fitCubicThroughDeletion, flatAnchorIndex, flatIndexesAfterReverse, growAnchorSelection, growRegion, handleAlongItsAngle, handleAtItsLength, handleBalances, harmonizeAnchors, hasOpenSubpath, identity, insertAnchorOnSegment, intersectSegments, invert, invertAnchorSelection, isSegmentStraight, joinAnchorsAt, joinSubpathEnds, lengthToward, lengthenOpenEnd, lengthenPathEnd, lineShape, linear, locateAnchor, makeHandlesSymmetric, mapConstraintAnchors, mat3, meanScale, measureAnchorPath, measurePath, mergeRegion, moveHandleSymmetric, moveHandleTo, multiply, nearestPathAnchor, normalizeZoom, offsetCornerTraces, openEndAt, openEndRay, openPathEnds, openSubpathAt, pathAnchorPoints, pathAwayFromAnchors, pathContainsPoint, pathContainsPolygon, pathContainsRect, pathCrossings, pathDistanceToPoint, pathEndAnchorIndex, pathEndFrame, pathFromD, pathInPoseFrame, pathInWorld, pathIntersectsPolygon, pathIntersectsRect, pathSegments, pathShape, pathSignedArea, pathThroughPoseFrame, pathToCubicContours, pathToD, placeAlongRun, placeRect, pointAlongPath, pointInPath, polygonContainsPath, polygonIntersectsPath, portControls2 as portControls, portCurvePoints2 as portCurvePoints, poseFrameInverseOf, poseFrameOf, poseLinearOf, poseRotationOf, prepareBlend, pxExtent, readAnchorFields, rectMarkerPath, remapAnchorValues, remapConstraints, remapPointValues, repeatAlongPath, resamplePath, resolveEasing, retractHandles, reverseAnchors, reversePath, reverseSubpaths, reviveTypedArrays, rotate, rotateAboutPoint, rotatePathAround, roundRectPath, runLength, runPlaces, runStationAt, scale, scaleDelta, scalePathToBounds, scaleSegmentHandles, screenAngleOf, segmentAt2 as segmentAt, segmentBetween, segmentExtremaTs, segmentsBetweenAnchors, setSubpathStart, shiftTrack, shrinkAnchorSelection, simplifyAnchorsAt, simplifyPath, simplifySpan, simplifySubpath, smoothAnchors, smudgePath, softFalloff, softSelectionBand, softSelectionWeights, solveConstraints, solvePathConstraints, splitByClosure, splitSubpaths, squarePath, standoff, stationsAlongPath, strokeHitTest, subpathEndAt, subpathsOfAnchors, tagTypedArray, tagTypedArrays, trackRun, trackShapeD, trackSlice, transformCoords, transformPath, translate, translateAnchorBy, translateAnchorsSymmetric, translatePath, trimPathAt, typedArrayReplacer, unionBoundsPath, unsatisfiedConstraints, untagTypedArray, viewToMat3, withAnchorPoints, withinPxBox, withinPxRadius, worldEditToStorage, writeAnchorField };
6667
6791
  //# sourceMappingURL=index.js.map
6668
6792
  //# sourceMappingURL=index.js.map