cone

<script src="./point_src/cone"></script>

Project and render a point-owned cone shape.

Object.assign(point.cone.settings, {
    distance: 200,
    container: stage.dimensions
})

let cone = point.cone.renderData()
point.cone.fill(ctx, cone)
point.cone.renderOutline(ctx, cone)

Reusable settings helpers in this file can also be used directly when the class wrapper is not needed.

Meta Data
filepath_exists True
path cone
filepath cone.js
clean_files ()

  • VariableDeclaration
    const

    CONE_DEFAULT_SETTINGS

    =
    ObjectExpression

    , fillColor: 'rebeccapurple'

  • VariableDeclaration
    const

    CONE_OUTLINE_MODES

    =
    ObjectExpression
  • FunctionDeclaration
    function

    resolveConeSettings

    (
    point , baseSettings = {} , settings = {}
    )
    dict_keys(['kind', 'word', 'generator', 'expression', 'async', 'params', 'id', 'pos', 'type'])
  • FunctionDeclaration
    function

    getConeOutlineSettings

    (
    settings = {}
    )
    dict_keys(['kind', 'word', 'generator', 'expression', 'async', 'params', 'id', 'pos', 'type'])
  • FunctionDeclaration
    function

    normalizeConeCurveValue

    (
    value , invert
    )
    dict_keys(['kind', 'word', 'generator', 'expression', 'async', 'params', 'id', 'pos', 'type'])
  • FunctionDeclaration
    function

    withinCone

    (
    point , cone
    )
    dict_keys(['kind', 'word', 'generator', 'expression', 'async', 'params', 'id', 'pos', 'type'])
  • ClassDeclaration
    class comments:

    Apply changes for the persistent info

    • constructor

      constructor

      (
      point , settings = {}
      )
      from PointCone
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
    • method

      update

      (
      settings
      )
      from PointCone
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])

      Apply changes for the persistent info

    • method

      resolveSettings

      (
      settings = {}
      )
      from PointCone
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
    • method

      renderData

      (
      settings = {}
      )
      from PointCone
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
    • method

      points

      (
      settings = {}
      )
      from PointCone
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
    • method

      hitPolygon

      (
      settings = {}
      )
      from PointCone
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
    • method

      fill

      (
      ctx , settings = {}
      )
      from PointCone
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
    • method

      renderOutline

      (
      ctx , settings = {}
      )
      from PointCone
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
    • method

      tracePath

      (
      ctx , settings = {}
      )
      from PointCone
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
    • method

      traceOutline

      (
      ctx , settings = {} , outline = undefined
      )
      from PointCone
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
    • method

      drawEdgePath

      (
      ctx , data , curveValue
      )
      from PointCone
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
    • method

      drawQuadraticPath

      (
      ctx , points
      )
      from PointCone
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
    • method

      drawStraightEdge

      (
      ctx , points
      )
      from PointCone
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
    • method

      appendHitOuterPoints

      (
      polygon , data
      )
      from PointCone
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
    • method

      appendHitInnerPoints

      (
      polygon , data
      )
      from PointCone
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
    • method

      appendQuadraticPathPoints

      (
      polygon , pathPoints
      )
      from PointCone
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
    • method

      appendQuadraticSamplePoints

      (
      polygon , start , control , end , sampleCount = undefined
      )
      from PointCone
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
    • method

      appendArcSamplePoints

      (
      polygon , originPoint , start , end , anticlockwise , sampleCount = undefined
      )
      from PointCone
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
    • method

      getConeCurveControl

      (
      originPoint , settings , start , end , curveValue
      )
      from PointCone
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])

      A full positive curve follows the matching circular arc passing through the edge points, then interpolates beyond that centerline.

    • method

      drawInnerCurve

      (
      ctx , originPoint , settings , start , end , curveValue
      )
      from PointCone
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
    • method

      drawConeArc

      (
      ctx , originPoint , start , end , anticlockwise
      )
      from PointCone
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
    • method

      getEdgePoint

      (
      angle , settings = {}
      )
      from PointCone
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
    • method

      getConeCorners

      (
      startAngle , endAngle , settings = {}
      )
      from PointCone
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
    • method

      getWallIntersection

      (
      angle , settings = {}
      )
      from PointCone
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
    • method

      projectDistance

      (
      point , angle , distance
      )
      from PointCone
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
    • method

      hitAtX

      (
      point , wallX , dx , dy , settings = {}
      )
      from PointCone
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
    • method

      hitAtY

      (
      point , wallY , dx , dy , settings = {}
      )
      from PointCone
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
    • method

      getContainer

      (
      settings = {}
      )
      from PointCone
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
    • method

      angleTo

      (
      point , target
      )
      from PointCone
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
    • method

      wrapAngle

      (
      value
      )
      from PointCone
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
    • method

      getCurveSettings

      (
      settings = {}
      )
      from PointCone
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
    • method

      getInnerOffset

      (
      settings = {}
      )
      from PointCone
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
    • method

      getOutlineSettings

      (
      settings = {}
      )
      from PointCone
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
    • method

      normalizeCurveValue

      (
      value , invert
      )
      from PointCone
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
    • method

      hasEqualRadius

      (
      originPoint , start , end
      )
      from PointCone
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
    • method

      samePoint

      (
      a , b
      )
      from PointCone
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
    • method

      pushUniquePoint

      (
      points , point
      )
      from PointCone
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
    • method

      ensureRenderData

      (
      settings = {}
      )
      from PointCone
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
    • method

      isRenderData

      (
      value
      )
      from PointCone
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
    dict_keys(['kind', 'word', 'parentName', 'type', 'body', 'comments', 'pos'])
  • ExpressionStatement

    :

    dict_keys(['type', 'expression', 'pos'])
  • ExpressionStatement

    :

    dict_keys(['type', 'expression', 'pos'])