screenwrap
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 | () |
-
ClassDeclarationclass
ScreenWrap
extends NoneClassDeclarationclassScreenWrapCull
extends ScreenWrapclass comments:Delete points from the associated points rather than wrapping the point.
ClassDeclarationclassStageScreenWrap
extends ScreenWrapCullclass 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) )
-
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) )
ExpressionStatement:
dict_keys(['type', 'expression', 'pos'])
wrap