Commit graph

119 commits

Author SHA1 Message Date
samme
56ad38f17d Docs: correct Tilemap#renderDebugFull 2020-04-26 12:38:20 -07:00
svipal
5911b94d35 Revert "clean up"
This reverts commit 854589ddbe.

woops
2020-04-10 20:55:31 +02:00
svipal
854589ddbe clean up 2020-04-10 20:40:52 +02:00
Svipal
8665e08f13 refactored things so that there is no more switching at runtime depending on orientation 2020-04-03 19:36:13 +02:00
samme
5ec9e6b91a Offset by object data dimensions, allowing zero offset 2020-03-22 09:37:42 -07:00
Svipal
cec71a85ea added hexagonal support 2020-03-21 10:19:03 +01:00
svipal
b63a4e1107
Update Tilemap.js 2020-02-08 11:53:27 +01:00
Svipal
dc330aaf4a linted everything 2020-02-06 11:02:44 +01:00
Svipal
95df0be94a changed orientation localisation to layer, will make easier the fixing of pixelwidth and height and makes more sense overall 2020-01-29 20:27:40 +01:00
Svipal
050325bff0 tried to pin down where the orientation became undefined, no success. 2020-01-29 17:42:39 +01:00
Svipal
95d2ff9996 need to compare across commits to understand regression regarding this.x 2020-01-27 20:12:53 +01:00
Svipal
946857f756 pixel changes 2020-01-26 22:51:01 +01:00
svipal
eb90fc2ab4
Merge pull request #2 from photonstorm/master
keeping up with master #2
2020-01-18 14:21:26 +01:00
No
1a88ff95ba updated dynamic layer and tilemap 2020-01-17 16:15:59 +01:00
Richard Davey
ff65e69cd1 Changed copyright date to 2020 2020-01-15 12:07:09 +00:00
Richard Davey
467aac2308 JSDoc fix 2019-11-22 17:46:26 +00:00
Josh Soref
9fb412bb07 spelling: coordinates 2019-10-29 01:50:33 -04:00
Richard Davey
7b530ee699 Code format fixes 2019-11-18 16:08:36 +00:00
Richard Davey
9863eafc00
Merge pull request #4820 from Olliebrown/tiled-layer-groups
Support for Tiled layer groups
2019-11-18 16:01:04 +00:00
Seth Berrier
13b6d6d5ae Fix for bug related to Issue #4737
- When removing a layer from a tilemap, layerIndex can become invalid
- Added loop to fix any existing tilemapLayer.layerIndex vales
2019-10-31 16:03:48 -05:00
Seth Berrier
13625a5f8c Updates for Supporting Group Layers
- Updated documentation to mention support for groups and naming layers
- Added more verbose output when an unknown layer name is specified
    > Error output now lists the valid layer names
- Added functions to return array of tile, object, or image layer names
2019-10-23 15:56:35 -05:00
Richard Davey
3a3ce8b914
Merge branch 'master' into tile-collision-update 2019-10-02 15:15:18 +01:00
samme
268d206e41 Fix scene arg in createFromObjects() 2019-06-29 12:13:15 -07:00
Richard Davey
89fe081f74 Added new Tiled Object and Object Layer defs. Fix #4364 2019-06-06 11:20:40 +01:00
Richard Davey
3da69ade29 Tilemap.createDynamicLayer would fail if you called it without setting the x and y arguments, even though they were flagged as being optional. Fix #4508 2019-06-06 10:43:46 +01:00
Richard Davey
04ec7b26a1 Tilemap.createBlankDynamicLayer would fail if you provided a string for the tileset as the base tile width and height were incorrectly read from the tileset argument. Fix #4495 2019-06-06 10:29:28 +01:00
Benjamin
35776fcd2d JSDoc: Make createDynamicLayer() position optional 2019-05-22 19:18:54 +02:00
Richard Davey
c91ed91ce3 License link update 2019-05-10 16:15:04 +01:00
Richard Davey
a6341a97a8 Fixed Types references 2019-05-09 15:32:53 +01:00
Richard Davey
44faa01578 Tilemap Types 2019-05-09 12:39:19 +01:00
Richard Davey
0012ed3524 Added Tilemap.renderDebugFull method. 2019-04-08 16:05:12 +01:00
Richard Davey
c1400f9514 Fixed lots of Tilemap methods that claimed to return null but didn't 2019-04-08 15:59:48 +01:00
Richard Davey
a8027bab7f Added removeLayer and destroyLayer methods. 2019-04-08 15:45:16 +01:00
Peter Ellis Jones
2682874d1f Fix incorrect documentation for Phaser.Tilemaps.Tilemap#convertLayerToStatic 2019-03-09 15:47:49 +02:00
Richard Davey
0ee2442597 Bumping to 3.17.0 2019-03-07 12:31:06 +00:00
Richard Davey
197fef7b52 Tilemap.removeTile is a new method that allows you to remove a tile, or an array of tiles, by passing in references to the tiles themselves, rather than coordinates. The tiles can be replaced with new tiles of the given index, or removed entirely, and the method can optionally recalculate interesting faces on the layer. 2019-03-05 14:45:53 +00:00
Richard Davey
4fc817c519 Final batch of typedefs 2019-02-13 16:06:00 +00:00
Richard Davey
60542a25cc Numerous jsdoc and TS related fixes 2019-02-04 17:16:08 +00:00
Richard Davey
4f6f6ee72f Lots of jsdoc and type fixes 2019-01-31 12:19:01 +00:00
jestarray
4b0464a632 Updated tilemap jsdocs 2019-01-23 11:30:08 -08:00
Richard Davey
aa341854c7 Happy New Year 2019-01-15 16:20:22 +00:00
Richard Davey
74d5af20c6 Tidying up 2018-12-13 11:07:20 +00:00
Thomas Felix
bd5f2b3bf5 fixes the typedef for the layer parameter
The layer parameter is used to call getLayer() so the parameter type for
the parent function should match the on of getLayer().
2018-12-01 20:40:17 +01:00
Richard Davey
4b1c762296 Updated @memberOf to @memberof 2018-10-10 10:49:13 +01:00
Richard Davey
5115847791 Finished all the Tilemap component descriptions 2018-09-28 14:32:36 +01:00
Richard Davey
43067aa30e Completed Tilemap class docs 2018-09-28 14:02:12 +01:00
Richard Davey
95d4651db8 Dynamic Layers support multiple tilesets now 2018-09-27 13:09:40 +01:00
Richard Davey
d59f772d66 Tilemap.getTileset is a new method that will return a Tileset based on its name. 2018-09-27 12:12:16 +01:00
Richard Davey
39c55ef719 Made warnings shorter. 2018-09-27 11:33:58 +01:00
Richard Davey
41920b07cc Tilemap.setBaseTileSize now sets the size into the LayerData baseTileWidth and baseTileHeight properties accordingly. Fix #4057 2018-09-25 15:19:57 +01:00
Richard Davey
b0888d2762 Added renderOrder property, setRenderOrder and apply them during layer creation. 2018-08-21 17:59:28 +01:00
Richard Davey
36dd7ae405
Merge pull request #3819 from samme/feature/createFromObjects
Copy custom properties in createFromObjects()
2018-08-21 15:38:48 +01:00
ampled
50c787a9c8 - add typedef for SpriteConfig extends GameObjectConfig
- allow update-function signature to be overriden by GameObject subclasses
2018-07-29 12:19:04 +02:00
Skysteed
5cd60b3378 Major Optimization for Tilemap Collision Indexing
This update optimizes an existing feature (Tilemap Collision Indexing).

This optimization will apply to [nearly] everyone using procedural generation tilemaps, infinite tilemaps, multiplayer tilemaps, particularly large tilemaps (especially those dyanmic in nature) or who otherwise intend to index collisions before the tiles are loaded.

Benchmarking:

Using the standard approach, indexing collisions for a 500x450 tileset took 2530ms. By pre-building the collision index array in its entirety, I was able to reduce that to 259ms. However, this implementation reduces it to 8 ms. Larger tilemaps would be exponentially affected.

There are some considerations to make here since there are better implementations, but it would require deprecating some existing code. The advantage would be that the standard approach itself would be optimized, (thus avoiding the sort of 2500+ms costs here), rather than fairly obscured as it is with this implementation.
2018-07-19 10:59:35 -05:00
samme
b7ca32eb40 Copy custom properties in createFromObjects()
Closes #3808
2018-07-14 09:43:21 -07:00
tarsupin
6613bc28e9
Fixing removeTileAt, removeTileAtWorldXY docs
The 'tile' parameter was not included in the actual code, so it's removed here from the documentation.
2018-06-30 15:09:41 -05:00
Andre van Tonder
32ff6df5b3 fixed JsDoc for Phaser.Tilemaps.Tilemap#createBlankDynamicLayer
x, y, width, height, tileWidth, tileHeight are all optional params

I also add x, y params to jsdoc  as they were missing
2018-06-27 10:33:35 +08:00
Richard Davey
32ce8d7947 jsdoc fixes and removed un-used ResetKey file. 2018-04-19 12:30:38 +01:00
Richard Davey
28e2764723 More jsdoc fixes 2018-04-16 16:02:27 +01:00
Richard Davey
a2535d4597 jsdoc fix 2018-04-03 17:30:15 +01:00
orblazer
9375bb0530 Fix multiple types on Tilemaps 2018-03-20 16:11:33 +01:00
orblazer
30f410d1d3 Fix types in Tilemaps 2018-03-20 12:36:35 +01:00
Richard Davey
d1f5f8a82b Added jsdocs 2018-02-12 16:01:21 +00:00
Richard Davey
5dffe21858 Updated jsdocs 2018-02-07 23:27:01 +00:00
Richard Davey
67f13e30f9 Updated jsdocs 2018-02-07 23:12:55 +00:00
Richard Davey
6d58f92cd9 Updated jsdocs 2018-02-07 23:08:37 +00:00
Richard Davey
fb42cbee42 Updated jsdocs 2018-02-07 22:46:07 +00:00
Richard Davey
10193c181a Fixed require paths. 2018-02-07 17:10:01 +00:00
Richard Davey
89fe7123e1 Moved to its own top-level folder. 2018-02-07 16:29:48 +00:00
Renamed from src/gameobjects/tilemap/Tilemap.js (Browse further)