• Preparing search index...
  • The search index is not available
{Shan, Shui}*
  • {Shan, Shui}*
  • utils/polytools
  • midPoint

Function midPoint

  • midPoint(points): Point
  • Calculates the midpoint of an array of points.

    Parameters

    • points: Point[]

      An array of Point instances.

    Returns Point

    The midpoint as a new Point.

    • Defined in src/utils/polytools.ts:135

Settings

Member Visibility

Theme

  • src
    • classes
      • elements
        • Blob.ts
          • Blob
        • Branch.ts
          • Branch
        • Stroke.ts
          • Stroke
      • layers
        • BackgroundMountainLayer.ts
          • BackgroundMountainLayer
        • BoatLayer.ts
          • BoatLayer
        • BottomMountainLayer.ts
          • BottomMountainLayer
        • MiddleMountainLayer.ts
          • MiddleMountainLayer
        • WaterLayer.ts
          • WaterLayer
      • structures
        • Bark.ts
          • Bark
        • Barkify.ts
          • Barkify
        • BottomMountainDecoration.ts
          • BottomMountainDecoration
        • Box.ts
          • Box
        • Cloth.ts
          • Cloth
        • Hat01.ts
          • Hat01
        • Hat02.ts
          • Hat02
        • House.ts
          • House
        • Hut.ts
          • Hut
        • Man.ts
          • Man
        • MiddleMountainFoot.ts
          • MiddleMountainFoot
        • Pagoda.ts
          • Pagoda
        • PagodaRoof.ts
          • PagodaRoof
        • Pavilion.ts
          • Pavilion
        • Rail.ts
          • Rail
        • Rock.ts
          • Rock
        • Roof.ts
          • Roof
        • Stick.ts
          • Stick
        • Texture.ts
          • Texture
        • Tower.ts
          • Tower
        • TransmissionTower.ts
          • TransmissionTower
        • Tree01.ts
          • Tree01
        • Tree02.ts
          • Tree02
        • Tree03.ts
          • Tree03
        • Tree04.ts
          • Tree04
        • Tree05.ts
          • Tree05
        • Tree06.ts
          • Tree06
        • Tree07.ts
          • Tree07
        • Tree08.ts
          • Tree08
        • Twig.ts
          • Twig
      • Bound.ts
        • Bound
      • Designer.ts
        • Designer
      • Element.ts
        • Element
      • Frame.ts
        • Frame
      • Layer.ts
        • Layer
      • PRNG.ts
        • PRNG
      • Perlin.ts
        • Perlin
      • Point.ts
        • Point
      • Range.ts
        • Range
      • Renderer.ts
        • Renderer
      • SketchLayer.ts
        • SketchLayer
      • Structure.ts
        • Structure
    • interfaces
      • IButton.ts
        • IButton
      • ILayer.ts
        • ILayer
      • IMenu.ts
        • IMenu
      • IPoint.ts
        • IPoint
      • IRange.ts
        • IRange
      • IScrollableCanvas.ts
        • IScrollableCanvas
      • ISettingPanel.ts
        • ISettingPanel
      • IStructure.ts
        • IStructure
    • types
      • LayerType.ts
        • LayerType
    • ui
      • Button.tsx
        • Button
      • Menu.tsx
        • Menu
      • ScrollableCanvas.tsx
        • ScrollableCanvas
      • SettingPanel.tsx
        • SettingPanel
    • utils
      • boxDecoration.ts
        • boxDecoration
      • generateVegetate.ts
        • generateVegetate
      • layerWorker.ts
        • workerBlobURL
      • polytools.ts
        • calculateBoundingBox
        • calculatePolygonArea
        • calculateSideLengths
        • calculateSliverRatio
        • distance
        • doIntersect
        • findBestEar
        • flipPolyline
        • isLineInPolygon
        • isOnSegment
        • isPointInPolygon
        • lineDivider
        • lineExpression
        • midPoint
        • shatterTriangle
        • transformPointsAlongLine
        • triangulate
      • utils.ts
        • debounce
        • expand
        • generateBezierCurve
        • normalizeNoise
    • App.tsx
      • App
    • config.ts
      • config
    • index.tsx

    Generated using TypeDoc