Maker.js, a Microsoft Garage project, is a JavaScript library for creating and sharing modular line drawings for CNC and laser cutters.

View project on GitHub Star

Api - point Namespace

Index

Functions

add

average

clone

closest

  • closest(referencePoint: IPoint, pointOptions: IPoint[]): IPoint

distort

  • distort(pointToDistort: IPoint, scaleX: number, scaleY: number): IPoint

fromAngleOnCircle

fromArc

  • Get the two end points of an arc path.

    Parameters

    Returns IPoint[]

    Array with 2 elements: [0] is the point object corresponding to the start angle, [1] is the point object corresponding to the end angle.

fromPathEnds

  • fromPathEnds(pathContext: IPath, pathOffset?: IPoint): IPoint[]
  • Get the two end points of a path.

    Parameters

    • pathContext: IPath

      The path object.

    • Optional pathOffset: IPoint

    Returns IPoint[]

    Array with 2 elements: [0] is the point object corresponding to the origin, [1] is the point object corresponding to the end.

fromPolar

  • fromPolar(angleInRadians: number, radius: number): IPoint

fromSlopeIntersection

middle

  • Get the middle point of a path.

    Parameters

    • pathContext: IPath

      The path object.

    • Default value ratio: number = 0.5

      Optional ratio (between 0 and 1) of point along the path. Default is .5 for middle.

    Returns IPoint

    Point on the path, in the middle of the path.

mirror

  • mirror(pointToMirror: IPoint, mirrorX: boolean, mirrorY: boolean): IPoint

rotate

rounded

scale

subtract

zero

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc