Mirror

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

Reflect points with a Mirror.

const mirror = new Mirror(points)
mirror.step()
Meta Data
title Mirror
dependencies ()
unused_keys ()
unknown_keys ()
filepath_exists True
path mirror
filepath mirror.js
clean_files ()

  • FunctionDeclaration
    function

    reflectPoint

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

    intersectionPoint

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

    reflectPointOnSameSide

    (
    origin , line
    )
    dict_keys(['kind', 'word', 'generator', 'expression', 'async', 'params', 'id', 'pos', 'type'])
  • ClassDeclaration
    class comments:
    Accept two points as the primary line, _add_ many points to 'reflect' _collect_ the reflected points _ and a free draw function _
    • property

      renderLine

      = true
      from class_name
      dict_keys(['kind', 'word', 'computed', 'static', 'value', 'type', 'pos'])
    • property

      renderPoints

      = true
      from class_name
      dict_keys(['kind', 'word', 'computed', 'static', 'value', 'type', 'pos'])
    • property

      renderReflections

      = true
      from class_name
      dict_keys(['kind', 'word', 'computed', 'static', 'value', 'type', 'pos'])
    • constructor

      constructor

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

      step

      (
      )
      from class_name
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
      iterate all the reflectPoints, and update the mirror point positions. We avoid rewriting the points, so they're more persistent.
    • method

      reflect

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

      reflectSiblings

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

      reflectSegment

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

      clean

      (
      )
      from class_name
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
      Remove any old references from the mirror map; 1: Any undefined positions 2: any point greater than the reflectpointsIndex
    • method

      getMirrorIndex

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

      draw

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

      drawLine

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

      drawPoints

      (
      ctx
      )
      from class_name
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
      this.stroke.wrap(()=>this.points.pen.stroke(ctx))
    • method

      pointStroke

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

      drawPointsNew

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

      drawReflections

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

      add

      (
      )
      from class_name
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
      Synonmous to 'push', but this isn't an Array - so we avoid it Mirror.add(point, point)
    dict_keys(['kind', 'word', 'parentName', 'type', 'body', 'comments', 'pos'])
  • ExpressionStatement

    :

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