Michael Hadley
a0b4362979
createFromObjects: allow sprite to have any origin while still matching Tiled
2017-11-29 07:25:04 -06:00
Michael Hadley
ee5190660c
Tilemap: upgraded version of createFromObjects from v2
2017-11-28 22:40:48 -06:00
Michael Hadley
68634a0deb
Tilemap & layer methods: FilterTiles & CreateFromTiles
2017-11-28 20:49:24 -06:00
Michael Hadley
80185eb5eb
Fill update: jsdocs & allow fill to update tile collisions + faces
2017-11-26 09:19:57 -06:00
Michael Hadley
6ca7c9ecfd
Copy update: copy all tile props and recalculate faces within dest region
2017-11-26 08:58:38 -06:00
Michael Hadley
8ec6528d20
Tilemap & layers: replace v2 raycasting with getTilesWithinShape
2017-11-26 07:55:44 -06:00
Michael Hadley
c31147df19
Add filtering options to forEachTile, GetTilesWithin, GetTilesWithinWorldXY
2017-11-25 18:03:21 -06:00
Michael Hadley
557ac4fe6e
Add GetTilesWithinWorldXY method to tilemap and layers
2017-11-25 08:42:19 -06:00
Michael Hadley
4c34d09955
Optional snapToFloor parameter added to WorldToTile methods
2017-11-25 07:08:06 -06:00
Michael Hadley
7844927256
Image layers added to Tilemap
2017-11-24 09:15:02 -06:00
Michael Hadley
d3aa842bfe
Adding collision prop to Tilemap
2017-11-24 08:23:40 -06:00
Michael Hadley
fa8178f47b
Port of ImageCollection from v2
2017-11-24 08:21:09 -06:00
Michael Hadley
e19de28932
Tilemap & layers now recalc faces (with a parameter for disabling recalc)
2017-11-21 19:18:34 -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
759252a078
Better handling of resizing a tilemap
...
Force the tilesets and tiles to inherit their tile size from the tilemap
2017-11-18 15:40:27 -06:00
Michael Hadley
b5fb0b8879
Refactor in order to update TilemapCreator & TilemapFactory
2017-11-17 15:55:12 -06:00
Michael Hadley
49854bfd1b
Format Typo
2017-11-17 15:49:32 -06:00
Michael Hadley
b8e8d9d3aa
Made data structure for maps and layers more explicit via classes & default props
2017-11-17 13:16:39 -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
205675c387
Tilemap: prevent methods from acting on a static tilemap layer & warn user
2017-11-16 19:58:35 -06:00
Michael Hadley
b34f8a9dcc
Associate tilemap layer data with the static or dynamic tilemap layer that "owns" it
...
This enforces 1x tilemap layer data <-> 1x static/dynamic tilemap layer and allows the Tilemap instance to look up the static/dynamic tilemap layer when needed.
2017-11-16 19:55:17 -06:00
Michael Hadley
83b7df2a73
Tilemap: destroy, removeAllLayers, setTileSize
2017-11-16 19:09:28 -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
2b08daff32
Tilemap: modularize empty map generators & add createBlankDynamicLayer
2017-11-16 11:44:24 -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
1be6847a87
Tilemap: better naming, currentLayer -> currentLayerIndex
2017-11-15 15:05:11 -06:00
Michael Hadley
48f1e60743
Tilemap: reorder and add get/set layer
2017-11-15 14:55:26 -06:00
Michael Hadley
84a86ae0f7
Share GetTileAt across tilemap layers and tilemap
2017-11-15 13:50:56 -06:00
Michael Hadley
a7424fa750
Progress on Tilemap - can now link tileset images and create layers
2017-11-11 10:38:52 -06:00