Crafty.HashMap Class

Properties

Methods

Back to top

Crafty.HashMap.constructor

public void Crafty.HashMap([cellsize])
cellsize

the cell size. If omitted, cellsize is 64.

Set cellsize. And create this.map.

Back to top

Crafty.HashMap.key()

public Object Crafty.HashMap.key(Object obj)
obj

an Object that has .mbr() or _x, _y, _w and _h.

Get the rectangular region (in terms of the grid, with grid size cellsize), where the object may fall in. This region is determined by the object's bounding box. The cellsize is 64 by default.

See Also