Class: Bounds

Tiny. Bounds

'Builder' pattern for bounds rectangles Axis-Aligned Bounding Box (AABB)
It is not a shape! Its mutable thing, no 'EMPTY' or that kind of problems

Members

maxXnumber

Default Value:
  • 0

maxYnumber

Default Value:
  • 0

minXnumber

Default Value:
  • 0

minYnumber

Default Value:
  • 0

Methods

Adds other Bounds

Name Type Description
bounds Tiny.Bounds

TODO

addBoundsArea(bounds, area)

Adds other Bounds, masked with Rectangle

Name Type Description
bounds Tiny.Bounds

TODO

area Tiny.Rectangle

TODO

addBoundsMask(bounds, mask)

Adds other Bounds, masked with Bounds

Name Type Description
bounds Tiny.Bounds

TODO

mask Tiny.Bounds

TODO

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

Adds sprite frame, transformed.

Name Type Description
transform Tiny.TransformBase

TODO

x0 number

TODO

y0 number

TODO

x1 number

TODO

y1 number

TODO

This function should be inlined when its possible.

Name Type Description
point Tiny.Point

The point to add.

Adds a quad, not transformed

Name Type Description
vertices Float32Array

The verts to add.

addVertices(transform, vertices, beginOffset, endOffset)

Add an array of vertices

Name Type Description
transform Tiny.TransformBase

TODO

vertices Float32Array

TODO

beginOffset number

TODO

endOffset number

TODO

Clears the bounds and resets.

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 Tiny.Rectangle

temporary object will be used if AABB is not empty

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

isEmpty(){boolean}

Checks if bounds are empty.

Returns:
Type Description
boolean True if empty.
Documentation generated by JSDoc 3.4.3 on Mon Dec 03 2018 17:48:51 GMT+0800 (CST)