pointlistshape

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

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

  • ClassDeclaration
    class comments:
    Shape an existing Array, editing points _in place_.
    • constructor

      constructor

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

      length

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

      linear

      (
      spread , keys = [] , altValue = undefined , altKeys = []
      )
      from class_name
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
      order the items in a flat linear list. Spread across the key axis. If the altValue is undefined, the _other_ position key is not changed. // Spread across X by 20 per step. Y becomes 100 for each. pointList.shape.linear(20, 'x', 100) // diagonal, the altValue is not useful here: plRandom.shape.linear(20, ['x', 'y'])
    • method

      random

      (
      multiplier = 100
      )
      from class_name
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
      move all points to a random position within a space.
    • method

      grid

      (
      spread , rowCount = 10 , pos
      )
      from class_name
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
      Distribute across a plane, similar to linear, but with a reset stepper. spread of 50, with 5 per row, drawing from position[0]: plRandom.shape.grid(50, 5); Set the position then draw: plRandom[0].set(50,50) plRandom.shape.grid(50, 6); Spread of 30, with 6 items per row, at a position: plRandom.shape.grid(30, 6, point(100,100));
    • method

      radial

      (
      point , radius
      )
      from class_name
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
      "Radial" plots the points around the a given point. Unlike "circle" or "radius" of which draw from an origin, This method rotates around the origin. if the given point is undefined, the center of the point list is used. If radius is undefined, the point radius is used.
    • method

      radius

      (
      radius , pos
      )
      from class_name
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
      Return a list of points distrubuted evenly around a circle. If the position is not given, the fist point in the array is used. Notably this may cause the circle to _march_ for every render. plRandom.shape.radius(50); plRandom.shape.radius(50); // moves to the _new_ x plRandom.shape.radius(50); // moves to the _new_ x Apply a position to pin the circle at a location: plRandom.shape.radius(50, point(100,100)); plRandom.shape.radius(50, point(100,100)); // does not march // follow mouse plRandom.shape.radius(50, Point.mouse.position);
    dict_keys(['kind', 'word', 'parentName', 'type', 'body', 'comments', 'pos'])