Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Loop

Represents a two-way linked loop of Curves - mostly used internally to conveniently represent shape boundaries.

Index

Constructors

constructor

  • new Loop(beziers?: number[][][]): Loop
  • Parameters

    • Default value beziers: number[][][] = []

      A pre-ordered array of bezier curves to add initially.

    Returns Loop

Properties

beziers

beziers: number[][][]

A pre-ordered array of bezier curves to add initially.

curves

curves: Curve[]

The curves that represent the shape boundary as an array.

head

head: Curve

A handle on the linked loop.

Methods

toBeziers

  • toBeziers(): number[][][]
  • Returns the loop as an array of beziers.

    Returns number[][][]

Static fromBeziers

  • fromBeziers(items?: number[][][]): Loop
  • Creates and returns a Loop from the given array of beziers.

    Parameters

    • Default value items: number[][][] = []

    Returns Loop

Static fromCubicBeziers

  • fromCubicBeziers(beziers?: number[][][]): Loop
  • Creates and returns a Loop from the given array of cubic beziers.

    Parameters

    • Default value beziers: number[][][] = []

      An array of cubic beziers.

    Returns Loop

Static Private perturb

  • Perturbs the loop. Not used.

    Parameters

    • loop: Loop
    • x: number

    Returns Loop

Generated using TypeDoc