PIXI.Bounds

class 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.

Summary


Properties from Bounds

Methods from Bounds

Public Properties


maxX Bounds.ts:20
maxX: number = -Infinity
maxY Bounds.ts:23
maxY: number = -Infinity
minX Bounds.ts:14
minX: number = Infinity
minY Bounds.ts:17
minY: number = Infinity
updateID Bounds.ts:28
updateID: number

It is updated to _boundsID of corresponding object to keep bounds in sync with content. Updated from outside, thus public modifier.

Public Methods


addBounds Bounds.ts:317
addBounds(bounds: PIXI.Bounds) → {void}

Adds other Bounds.

Parameters:
Name Type Description
bounds PIXI.Bounds

The Bounds to be added

Returns:
Type Description
void
addBoundsArea Bounds.ts:370
addBoundsArea(bounds: PIXI.Bounds, area: PIXI.Rectangle) → {void}

Adds other Bounds, masked with Rectangle.

Parameters:
Name Type Description
bounds PIXI.Bounds

TODO

area PIXI.Rectangle

TODO

Returns:
Type Description
void
addBoundsMask Bounds.ts:334
addBoundsMask(bounds: PIXI.Bounds, mask: PIXI.Bounds) → {void}

Adds other Bounds, masked with Bounds.

Parameters:
Name Type Description
bounds PIXI.Bounds

The Bounds to be added.

mask PIXI.Bounds

TODO

Returns:
Type Description
void
addBoundsMatrix Bounds.ts:360
addBoundsMatrix(bounds: PIXI.Bounds, matrix: PIXI.Matrix) → {void}

Adds other Bounds, multiplied by matrix. Bounds shouldn't be empty.

Parameters:
Name Type Description
bounds PIXI.Bounds

other bounds

matrix PIXI.Matrix

multiplicator

Returns:
Type Description
void
addFrame Bounds.ts:162
addFrame(transform: PIXI.Transform, x0: number, y0: number, x1: number, y1: number) → {void}

Adds sprite frame, transformed.

Parameters:
Name Type Description
transform PIXI.Transform

transform to apply

x0 number

left X of frame

y0 number

top Y of frame

x1 number

right X of frame

y1 number

bottom Y of frame

Returns:
Type Description
void
addFrameMatrix Bounds.ts:175
addFrameMatrix(matrix: PIXI.Matrix, x0: number, y0: number, x1: number, y1: number) → {void}

Adds sprite frame, multiplied by matrix

Parameters:
Name Type Description
matrix PIXI.Matrix

matrix to apply

x0 number

left X of frame

y0 number

top Y of frame

x1 number

right X of frame

y1 number

bottom Y of frame

Returns:
Type Description
void
addFramePad Bounds.ts:413
addFramePad(x0: number, y0: number, x1: number, y1: number, padX: number, padY: number) → {void}

Adds padded frame. (x0, y0) should be strictly less than (x1, y1)

Parameters:
Name Type Description
x0 number

left X of frame

y0 number

top Y of frame

x1 number

right X of frame

y1 number

bottom Y of frame

padX number

padding X

padY number

padding Y

Returns:
Type Description
void
addPoint Bounds.ts:86
addPoint(point: IPointData) → {void}

This function should be inlined when its possible.

Parameters:
Name Type Description
point IPointData

The point to add.

Returns:
Type Description
void
addPointMatrix Bounds.ts:98
addPointMatrix(matrix: PIXI.Matrix, point: IPointData) → {void}

Adds a point, after transformed. This should be inlined when its possible.

Parameters:
Name Type Description
matrix PIXI.Matrix
point IPointData
Returns:
Type Description
void
addQuad Bounds.ts:116
addQuad(vertices: Float32Array) → {void}

Adds a quad, not transformed

Parameters:
Name Type Description
vertices Float32Array

The verts to add.

Returns:
Type Description
void
addVertexData Bounds.ts:232
addVertexData(vertexData: Float32Array, beginOffset: number, endOffset: number) → {void}

Adds screen vertices from array

Parameters:
Name Type Description
vertexData Float32Array

calculated vertices

beginOffset number

begin offset

endOffset number

end offset, excluded

Returns:
Type Description
void
addVertices Bounds.ts:262
addVertices(transform: PIXI.Transform, vertices: Float32Array, beginOffset: number, endOffset: number) → {void}

Add an array of mesh vertices

Parameters:
Name Type Description
transform PIXI.Transform

mesh transform

vertices Float32Array

mesh coordinates in array

beginOffset number

begin offset

endOffset number

end offset, excluded

Returns:
Type Description
void
addVerticesMatrix Bounds.ts:274
addVerticesMatrix(matrix: PIXI.Matrix, vertices: Float32Array, beginOffset: number, endOffset: number, padX: number, padY) → {void}

Add an array of mesh vertices.

Parameters:
Name Type Default Description
matrix PIXI.Matrix

mesh matrix

vertices Float32Array

mesh coordinates in array

beginOffset number

begin offset

endOffset number

end offset, excluded

padX number 0

x padding

padY

y padding

Returns:
Type Description
void
clear Bounds.ts:54
clear() → {void}

Clears the bounds and resets.

Returns:
Type Description
void
getRectangle Bounds.ts:63
getRectangle(rect: PIXI.Rectangle) → {PIXI.Rectangle}

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

Parameters:
Name Type Attributes Description
rect PIXI.Rectangle

<optional>

Temporary object will be used if AABB is not empty

Returns:
Type Description
PIXI.Rectangle
  • A rectangle of the bounds
isEmpty Bounds.ts:45
isEmpty() → {boolean}

Checks if bounds are empty.

Returns:
Type Description
boolean
  • True if empty.
pad Bounds.ts:396
pad(paddingX: number, paddingY) → {void}

Pads bounds object, making it grow in all directions. If paddingY is omitted, both paddingX and paddingY will be set to paddingX.

Parameters:
Name Type Default Description
paddingX number 0

The horizontal padding amount.

paddingY

The vertical padding amount.

Returns:
Type Description
void

Powered by webdoc!