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 ScreenWrap
      dict_keys(['kind', 'word', 'computed', 'static', 'value', 'type', 'pos', 'class_name'])
    • constructor

      constructor

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

      setDimensions

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

      perform

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

      performWrap

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

      wrap

    • method

      performMany

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

      isOutside

      (
      p , topLeft , bottomRight
      )
      from ScreenWrap
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos', 'class_name'])
    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 ScreenWrapCull
      dict_keys(['kind', 'word', 'computed', 'static', 'value', 'type', 'pos', 'class_name'])
    • method

      performCull

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

      wrap

    • method

      destroyPoint

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

      console.log('destroyPoint')

    • property

      edgeMethod

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

      constructor

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

      setDimensions

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

      perform

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

      performWrap

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

      wrap

    • method

      performMany

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

      isOutside

      (
      p , topLeft , bottomRight
      )
      from ScreenWrap
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos', 'class_name'])
    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 StageScreenWrap
      dict_keys(['kind', 'word', 'computed', 'static', 'value', 'type', 'pos', 'class_name'])
    • constructor

      constructor

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

      copyStageDimensions

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

      cullBox

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

      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

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

      performCull

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

      wrap

    • method

      destroyPoint

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

      console.log('destroyPoint')

    • property

      edgeMethod

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

      constructor

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

      setDimensions

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

      perform

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

      performWrap

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

      wrap

    • method

      performMany

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

      isOutside

      (
      p , topLeft , bottomRight
      )
      from ScreenWrap
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos', 'class_name'])
    dict_keys(['kind', 'word', 'parentName', 'type', 'body', 'comments', 'pos'])
  • ExpressionStatement

    :

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