Constructor
new ScreenCulling()
Methods
cull(rect)
Toggle the renderable state of objects based on the current viewport rectangle
Parameters:
Name | Type | Description |
---|---|---|
rect |
Rectangle |
intersects(rect, bounds) → {boolean}
Test whether rectangular bounds intersect
Parameters:
Name | Type | Description |
---|---|---|
rect |
Rectangle | The target rectangle (the screen) |
bounds |
Rectangle | The reference rectangle (the object) |
Returns:
Do they intersect?
- Type
- boolean