Commit graph

13 commits

Author SHA1 Message Date
Michael Hadley
bdea565586 Better optimized calc/recalc faces methods for tiles
These eliminate the need for the preventRecalc method from v2. If an individual tile is changed with putTileAt, only the min number of faces will be recalculated (vs all faces being recalculated in v2)
2017-11-21 19:16:46 -06:00
Michael Hadley
105dc755ce Tilemap & layers: optimized SetCollision methods
v2 was structured in a way where a full pass through ALL tiles would occur if SetCollisionBetween or SetCollisionByExclusion was used. That's a huge penalty for large tilemaps, so this version duplicates some loop code for the sake of speed.
2017-11-20 20:08:50 -06:00
Michael Hadley
3f14382951 Make naming consistent for accessing individual tiles (e.g. getTile vs getTileAt) 2017-11-18 15:41:26 -06:00
Michael Hadley
d2f72fbe58 Create CullTiles component to allow static and dynamic layers to cull when needed
Fixes performance issue with canvas static tile renderer on large maps
2017-11-18 08:31:59 -06:00
Michael Hadley
3266974ea0 Tilemap & layer WorldXY methods: get, has, put, remove 2017-11-17 07:58:33 -06:00
Michael Hadley
b34d18e10c World to Tile conversion on maps and layers - both accounting for camera scroll 2017-11-16 20:36:45 -06:00
Michael Hadley
63fb2e863f Tilemap & layer: ReplaceByIndex, FindByIndex, SwapByIndex 2017-11-16 19:08:58 -06:00
Michael Hadley
e6c6d1ddce TIlemap & layers: GetTileAtWorldXY 2017-11-16 13:27:52 -06:00
Michael Hadley
c2268f3dee PutTile, RemoveTile & Tile#Copy 2017-11-16 13:09:07 -06:00
Michael Hadley
355d9accf3 More tilemap & layer fun: Copy, FIll, Randomize, Shuffle, GetTilesWithin
Note: methods that mutate the tiles are not installed on StaticTilemapLayer
2017-11-15 20:06:07 -06:00
Michael Hadley
b714e2afdf Add methods for looping over & accessing groups of tiles to map & layers 2017-11-15 16:36:41 -06:00
Michael Hadley
74842aae1d Tilemap & Layers: hasTileAt & better naming 2017-11-15 15:28:15 -06:00
Michael Hadley
84a86ae0f7 Share GetTileAt across tilemap layers and tilemap 2017-11-15 13:50:56 -06:00