relative

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

The relative motion addon supplied Point.relative methods, to

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

  • VariableDeclaration
    const

    cosSin

    =
    function ( value =1 )
    The relative motion addon supplied `Point.relative` methods, to
    The cosSin object is a simple helper for cos/sin of a value. cs = cosSin(100) cs.cos() cs.sin() Provide a multiplier - useful when rotating around a _point_ (such as a normalised value) cs.sin(.4)
  • ClassDeclaration
    class comments:
    An Addon applies some core functionality on the polypoint mixin such as a constructor, and destroy methods.
    dict_keys(['kind', 'word', 'parentName', 'type', 'body', 'comments', 'pos'])
  • VariableDeclaration
    const

    impartOnRads

    =
    function ( radians , direction )
    Push a XY in a direction relative to the radians. const r = impartOnRads(a.radians, direction) For example - pointing _right_ and applying the _{1,0}_ direction (denoting forward) will push the point further right, applying _{0, 1}_ pushes the point _left_ relative to its direction. Or to rephase, imagine a engine on the back of the point - pushing _forward_.
  • ClassDeclaration
    class comments:
    Normalize the direction vector
    • constructor

      constructor

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

      _relativeMove

      (
      direction , speed = undefined , minSpeed , maxSpeed = 1
      )
      from class_name
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])

      Normalize the direction vector

    • method

      move

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

      left

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

      right

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

      forward

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

      backward

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

      towards

      (
      other , turnSpeed = 0.1 , speed , minSpeed , maxSpeed
      )
      from class_name
      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'])