Class Shape2

Curved Path - a curve path is simply a array of connected curves, but retains the api of a curve

Hierarchy

Constructors

Properties

arcLengthDivisions: number = 200

This value determines the amount of divisions when calculating the cumulative segment lengths of a curve via .getLengths. To ensure precision when using methods like .getSpacedPoints, it is recommended to increase .arcLengthDivisions if the curve is very large.

autoClose: boolean = false
cacheArcLengths: number[]
cacheLengths: number[]
currentPoint: Vector2
curves: Curve<Vector2>[] = []
holes: Path2[]
needsUpdate: boolean = false

Methods

  • Parameters

    • aX: number = 0
    • aY: number = 0
    • aRadius: number = 1
    • aStartAngle: number = 0
    • aEndAngle: number = ...
    • aClockwise: boolean = false

    Returns Shape2

  • Parameters

    • aX: number = 0
    • aY: number = 0
    • xRadius: number = 1
    • yRadius: number = 1
    • aStartAngle: number = 0
    • aEndAngle: number = ...
    • aClockwise: boolean = false
    • aRotation: number = 0

    Returns Shape2

  • Parameters

    • aX: number = 0
    • aY: number = 0
    • aRadius: number = 1
    • aStartAngle: number = 0
    • aEndAngle: number = ...
    • aClockwise: boolean = false

    Returns Shape2

  • Parameters

    • aX: number = 0
    • aY: number = 0
    • xRadius: number = 1
    • yRadius: number = 1
    • aStartAngle: number = 0
    • aEndAngle: number = ...
    • aClockwise: boolean = false
    • aRotation: number = 0

    Returns Shape2

  • Parameters

    • Optional divisions: number

    Returns {
        holes: number[][];
        points: number[];
    }

    • holes: number[][]
    • points: number[]
  • Returns a unit vector tangent at t. If the subclassed curve do not implement its tangent derivation, 2 points a small delta apart will be used to find its gradient which seems to give a reasonable approximation getTangent(t: number, optionalTarget?: T): T;

    Parameters

    Returns Vector2

  • Given u ( 0 .. 1 ), get a t to find p. This gives you points which are equi distance

    Parameters

    • u: number
    • Optional distance: number

    Returns number

  • Parameters

    • geometry: {
          indices: number[];
          points: number[];
      } = ...
      • indices: number[]
      • points: number[]

    Returns {
        indices: number[];
        points: number[];
    }

    • indices: number[]
    • points: number[]
  • Parameters

    • points: number[]
    • holes: number[][] = []
    • geometry: {
          indices: number[];
          points: number[];
      } = ...
      • indices: number[]
      • points: number[]

    Returns {
        indices: number[];
        points: number[];
    }

    • indices: number[]
    • points: number[]

Generated using TypeDoc