pointlock

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

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

  • ClassDeclaration
    class comments:

    Linear lock.

    A linear locked point can move only along the given axis - the direction.

    For dragging and interaction, the point is locked by the linear direction relative to other.

    point.lock.linear(other)
    

    The point may only move towards, or away from the other, disregarding the point direction. When other position changes, the linear lock will reflect this.


    The point may only move in the direction of itself (forward or reverse)

    point.lock.linear()
    

    When rotating the point, the linear lock will reflect this.


    Lock between two. Essentially the same as other (only a), but with a max limit.

    point.lock.linear(a, b)
    
    • constructor

      constructor

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

      linear

      (
      a , b
      )
      from PointLock
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos', 'class_name'])

      perform a to b

    • method

      facing

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

      Locked to the pointing direction of self, assuming a ray case from the center through the tip of this (self) point. Only moving forward or backward but not sliding.

      The constraint is applied only when this method is called.

    • method

      between

      (
      a , b
      )
      from PointLock
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos', 'class_name'])

      self point may only exist between the two given points.

    • method

      radial

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

      cast from the origin, no sliding.

      Note, this is already set from the existing origin. such that from the first call the sight-line is assumed. When moving the point, the origin can move freely, where this self point may only move along the cast ray from the origin.

      luckily moving the origin doesn't affect the target (self) point.

    • method

      ray

      (
      origin , min , max = Infinity
      )
      from PointLock
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos', 'class_name'])

      cast from the origin, allowing sliding along the ray within the min and max bounds.

      Bounds are signed multiples of origin.radius; negative values extend behind the origin.

      1. (default 0) min is the minimum multiple.
      2. (default Infinity) max is the maximum multiple.

      Examples:

      // lock to the outside of a point.
      point.lock.ray(other, 1)
      
      // lock one half inside.
      point.lock.ray(other, .5, 1)
      
      // axis lock
      point.lock.ray(other, -1, 1)
      
      // lock between 1/3 of the radius, to a max of 3X the radius.
      point.lock.ray(other,  .3,  3)
      
    dict_keys(['kind', 'word', 'parentName', 'type', 'body', 'comments', 'pos'])
  • ExpressionStatement

    :

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

    :

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