screenwrap

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

A ScreenWrap manipulated the XY of a point, if it travels outside the wrap space.

let topLeft = [50, 50]
    , bottomRight = [800, 800]

s = new ScreenWrap(topLeft, bottomRight)

Check and alter point positions as they move in the draw routine:

s.perform(point)

This is setup be default on the stage, saving the setup part and screen resize tracking:

stage.screenWrap.perform(point)
Meta Data
filepath_exists True
path screenwrap
filepath screenwrap.js
clean_files ()

  • ClassDeclaration
    class comments:
    wrap
    • property

      edgeMethod

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

      constructor

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

      setDimensions

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

      perform

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

      performWrap

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

      performMany

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

      isOutside

      (
      p , topLeft , bottomRight
      )
      from class_name
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
    dict_keys(['kind', 'word', 'parentName', 'type', 'body', 'comments', 'pos'])
  • ClassDeclaration
    class comments:
    Delete points from the associated points rather than _wrapping_ the point.
    • property

      edgeMethod

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

      performCull

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

      destroyPoint

      (
      point
      )
      from class_name
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
      console.log('destroyPoint')
    dict_keys(['kind', 'word', 'parentName', 'type', 'body', 'comments', 'pos'])
  • ClassDeclaration
    class comments:
    Cull to a box (the screen) this.screenWrap.cullBox( this.walkers, ) Provide a custom delete point function, accepting a point and manipulating the point list. this.screenWrap.cullBox( this.walkers, this.walkers.remove.bind(this.walkers) )
    • property

      edgeMethod

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

      constructor

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

      copyStageDimensions

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

      cullBox

      (
      points , deletePointFunction , topLeft , bottomRight
      )
      from class_name
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
      Cull to a box (the screen) this.screenWrap.cullBox( this.walkers, ) Provide a custom delete point function, accepting a point and manipulating the point list. this.screenWrap.cullBox( this.walkers, this.walkers.remove.bind(this.walkers) )
    dict_keys(['kind', 'word', 'parentName', 'type', 'body', 'comments', 'pos'])
  • ExpressionStatement

    :

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