-
Notifications
You must be signed in to change notification settings - Fork 0
Quad tree for compression of 2d tile maps.
ajuc/jsPointQuadtree
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Javascript Point Quadtree (jsPointQuadtree). (c) 2012 Sebastian "Ajuć" Pidek login on gmail: ajuc00 Distributed under MIT licence Downloaded from https://github.com/ajuc/jsPointQuadtree //TODO - add licence This is simple implementation of quadtree of points. Useful for compressing tiled maps, raster images, etc. Useless for keeping objects (lke enemies, buildings, players), in it. Also useless for space indexing. Assumptions: we have square grid, width == height == power of 2. At each point in this grid we can have some value. This quad tree can keep such data more efficiently, than regular 2d grid, if there are many regions with equal values (in the sense of === operator, or (in the future), in the sense of anonymous boolean function, supplied by the user of the library to the constructor of the quadtree). Compression is efficient for sparse grids, or grids with big regions of the same values. Work in progress. Unit tests are (surprisignly) in tests.html , and use jquery and qunit, just to test the library. Library has no dependnencies.
About
Quad tree for compression of 2d tile maps.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published