Class: Bounds

PIXI.Bounds

'Builder' pattern for bounds rectangles.

This could be called an Axis-Aligned Bounding Box. It is not an actual shape. It is a mutable thing; no 'EMPTY' or those kind of problems.

new PIXI.Bounds ()

Members

maxX number

Default Value:
  • 0

maxY number

Default Value:
  • 0

minX number

Default Value:
  • 0

minY number

Default Value:
  • 0

Methods

addBounds (bounds)

Adds other Bounds

Name Type Description
bounds PIXI.Bounds

TODO

addBoundsArea (bounds, area)

Adds other Bounds, masked with Rectangle

Name Type Description
bounds PIXI.Bounds

TODO

area PIXI.Rectangle

TODO

addBoundsMask (bounds, mask)

Adds other Bounds, masked with Bounds

Name Type Description
bounds PIXI.Bounds

TODO

mask PIXI.Bounds

TODO

addFrame (transform, x0, y0, x1, y1)

Adds sprite frame, transformed.

Name Type Description
transform PIXI.Transform

TODO

x0 number

TODO

y0 number

TODO

x1 number

TODO

y1 number

TODO

addPoint (point)

This function should be inlined when its possible.

Name Type Description
point PIXI.Point

The point to add.

addQuad (vertices)

Adds a quad, not transformed

Name Type Description
vertices Float32Array

The verts to add.

addVertexData (vertexData, beginOffset, endOffset)

Adds screen vertices from array

Name Type Description
vertexData Float32Array

calculated vertices

beginOffset number

begin offset

endOffset number

end offset, excluded

addVertices (transform, vertices, beginOffset, endOffset)

Add an array of mesh vertices

Name Type Description
transform PIXI.Transform

mesh transform

vertices Float32Array

mesh coordinates in array

beginOffset number

begin offset

endOffset number

end offset, excluded

clear ()

Clears the bounds and resets.

getRectangle (rect)PIXI.Rectangle

Can return Rectangle.EMPTY constant, either construct new rectangle, either use your rectangle It is not guaranteed that it will return tempRect

Name Type Description
rect PIXI.Rectangle

temporary object will be used if AABB is not empty

Returns:
Type Description
PIXI.Rectangle A rectangle of the bounds

isEmpty ()boolean

Checks if bounds are empty.

Returns:
Type Description
boolean True if empty.