Svipal
fd29e96a5d
changed orientation to be part of the layer, really cleaned up API. Started tests on the dynamic layer. Trying to understand getTileAt bug
2020-01-30 15:58:07 +01:00
Svipal
70cbdc0925
preparing for WIP PR 4
2020-01-29 20:32:08 +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
d6489d1146
preparing WIP PR 2
2020-01-29 19:21:27 +01:00
Svipal
ccbff39074
preparing WIP PR
2020-01-29 19:20:25 +01:00
Svipal
a82b27ce6f
added deep copy, doesn't change anything , this.orientation in the tile still bugging
2020-01-29 19:01:22 +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
Gauthier Billot
78e2027a0c
Create tilesets from image collections
2020-01-21 22:15:52 +01:00
Svipal
e4857ce48a
yoyuee
2020-01-19 20:55:09 +01:00
Svipal
fbe3345e54
Updated RemoveTileAtWorldXy, PutTileAtWorldXY, GetTilesWithinShape and GetTilesWithinWorldXY
2020-01-19 20:50:57 +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
No
f17aef0abf
wordtotileX or Y cannot be called independently either
2020-01-17 15:15:15 +01:00
No
ddbcf85194
woops
2020-01-17 14:49:02 +01:00
No
83bbf08902
changed world to tile and tile to world in isometric mode
2020-01-17 14:47:33 +01:00
Richard Davey
ff65e69cd1
Changed copyright date to 2020
2020-01-15 12:07:09 +00:00
Alex
77dc14ee2f
Changed tile getTint function to use getTintAppendFloatAlphaAndSwap
2019-12-29 21:46:50 -05:00
samme
f1001578c5
Bracket notation for type
...
Phaser.Tilemaps.LayerData#data
2019-12-23 12:57:58 -08:00
samme
77ad6c66fe
Correct type for Phaser.Tilemaps.LayerData#data
...
Fixes #4904 ?
2019-12-08 15:23:15 -08:00
Richard Davey
467aac2308
JSDoc fix
2019-11-22 17:46:26 +00:00
Josh Soref
315d43f893
spelling: receive
2019-10-29 02:33:06 -04:00
Josh Soref
013ece9373
spelling: indices
2019-10-29 02:22:43 -04: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
61479c5188
Remove debugging output
2019-10-25 11:32:24 -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
Seth Berrier
a9e897370a
Support for Tiled Groups and Infinite Map Fixes
...
- Added support for Tiled group layers (issue #4099 )
- Fixed some layer offset bugs for infinite maps
2019-10-23 12:35:25 -05:00
Richard Davey
6b973dcf58
DynamicTilemapLayer.setCollision
would cause an indexOf
error when trying to access the layer data. Fix #4800
2019-10-15 11:34:32 +01:00
Richard Davey
312797dc8e
JSDoc fixes
2019-10-11 18:29:55 +01:00
Richard Davey
3a3ce8b914
Merge branch 'master' into tile-collision-update
2019-10-02 15:15:18 +01:00
Richard Davey
0aaa67957a
Tilemap Canvas Render functions now respect game pixel art settings
2019-10-01 16:10:29 +01:00
Richard Davey
f4002471d7
Updated context lost / restored handlers
2019-07-17 16:38:00 +01:00
Richard Davey
e012115df4
DynamicTilemapLayer.destroy
will now no longer run its destroy sequence again if it has already been run once. Fix #4634
2019-07-03 15:53:47 +01:00
samme
268d206e41
Fix scene arg in createFromObjects()
2019-06-29 12:13:15 -07:00
Fabadiculous
255232dd2a
Fix bug where graphics methods were not renamed
2019-06-22 16:55:50 +10:00
Richard Davey
ea8bb89554
Exposed all of the Tilemap Parser functions. Fix #4318
2019-06-12 12:35:41 +01:00
Richard Davey
0f592ba91a
Moved the Pick function to the object utils
2019-06-12 12:35:03 +01: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
d75431fc2b
lint fixes
2019-05-03 17:38:27 +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
0514d27efc
Added new argument removeFromTilemap
2019-04-08 15:59:30 +01:00
Richard Davey
d63321eba5
Layers now remove themselves from the Tilemap when destroyed. Fix #4319
2019-04-08 15:45:43 +01:00
Richard Davey
a8027bab7f
Added removeLayer and destroyLayer methods.
2019-04-08 15:45:16 +01:00
Richard Davey
c85defe920
Merge branch 'master' into feature/support-infinite-tiled-maps
2019-04-08 14:00:03 +01:00
Richard Davey
f41cacde25
Merge pull request #4336 from florianvazelle/master
...
Fix getCenter methods returning wrong value for scaled layers
2019-04-08 10:20:32 +01:00
Richard Davey
e2c68c5d86
Merge pull request #4418 from martinlindhe/ts-styleconfig
...
improve ts type hints for Phaser.Tilemaps.Types.StyleConfig
2019-04-08 09:53:39 +01:00
Richard Davey
7dd411ddc9
Merge pull request #4419 from peterellisjones/master
...
Swap incorrect terms in Tilemap#convertLayerToStatic documentation
2019-04-08 09:52:11 +01:00
Richard Davey
780b0bca90
Removed missing component
2019-03-25 12:54:49 +00:00
Richard Davey
e017691c68
The ScaleMode
Component has been removed from every Game Object, and along with it the scaleMode
property and setScaleMode
method. These did nothing anyway as they were not hooked to the render pipeline and scale mode should be set on the texture, not the Game Object. Fix #4413
2019-03-24 23:07:27 +00:00
Peter Ellis Jones
2682874d1f
Fix incorrect documentation for Phaser.Tilemaps.Tilemap#convertLayerToStatic
2019-03-09 15:47:49 +02:00
Martin Lindhe
38444d3443
improve ts type hints for Phaser.Tilemaps.Types.StyleConfig
2019-03-09 11:51:00 +01: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
73617da673
Tidied up the formatting
2019-03-05 14:41:35 +00:00
Jeremie Corpinot
e40ff20a2c
Update Tile.properties
type to any
...
Update `Tile.properties` type from ` object` to `any` so we can access any un-declared property without TypeScript throwing an error.
Solve issue https://github.com/photonstorm/phaser/issues/4356
2019-02-13 20:04:45 +01: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
348306cafb
Lots more jsdoc fixes and new documentation
2019-01-31 14:47:50 +00:00
Richard Davey
4f6f6ee72f
Lots of jsdoc and type fixes
2019-01-31 12:19:01 +00:00
florianvazelle
01f1daad51
Fix getCenter methods returning wrong value for scaled layers
2019-01-30 15:57:51 +01:00
Richard Davey
974c5342e7
Fixed jsdoc types ( #4311 )
2019-01-28 13:45:48 +00:00
jestarray
ade92db0e9
Updated Docs
2019-01-23 15:01:56 -08:00
jestarray
8a41b1f56a
Updated Docs
2019-01-23 15:00:07 -08:00
jestarray
4b0464a632
Updated tilemap jsdocs
2019-01-23 11:30:08 -08:00
Richard Davey
498ea6bf9a
Fixed jsdocs.
2019-01-23 16:24:02 +00:00
Richard Davey
1eccff1e3b
Fixed jsdoc links and markdown bullet lists
2019-01-18 15:20:56 +00:00
Richard Davey
aa341854c7
Happy New Year
2019-01-15 16:20:22 +00:00
Craig Whiteside
48fc7dc388
Merge branch 'master' into feature/support-infinite-tiled-maps
2018-12-20 16:51:42 +00:00
Richard Davey
b3c3b4bae7
Adjust pixel position so scaled tiles don't offset
2018-12-13 13:16:46 +00:00
Richard Davey
aae1cf5ae5
Tidying up
2018-12-13 13:10:31 +00:00
Richard Davey
ffd217dbdd
Fixed size calculation and updated docs
2018-12-13 11:46:17 +00:00
Richard Davey
eef553d4c2
Fixed layer size calculations. Also changed rendering to use tileset tile sizes, as it should do.
2018-12-13 11:07:53 +00:00
Richard Davey
74d5af20c6
Tidying up
2018-12-13 11:07:20 +00:00
Richard Davey
79ee2229ad
Merge pull request #4207 from tfelix/fix/tilemap-layer-typedef-fix
...
fixes the typedef for the layer parameter
2018-12-12 11:28:57 +00:00
Richard Davey
2780babe10
Final Doc Jam merge
2018-12-03 15:16:23 +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
6f8759c186
Whenever Camera.roundPixels
was enabled it would use a bitwise operation to truncate the float (x |= 0
) - this has been replaced across all files that used it, with a call to Math.round
instead. This gives far better results when zooming cameras both in and out of a Scene, stopping thin gaps appearing between closely packed Game Objects.
2018-11-30 10:27:25 +00:00
Richard Davey
1e32537276
Merge branch 'master' of https://github.com/photonstorm/phaser
2018-11-20 12:45:52 +00:00
Richard Davey
625955178e
Updated docs
2018-11-20 12:45:47 +00:00
Richard Davey
ee2459652c
Merge pull request #4173 from WaSa42/master
...
Fix: Cannot read property 'index' of undefined at GetTileAt and RemoveTileAt
2018-11-20 12:41:53 +00:00
Richard Davey
5c45b477b3
Fixed lint errors in #4152
2018-11-20 12:33:08 +00:00
Richard Davey
45342229cb
Merge pull request #4152 from quadrupleslap-forks-things/master
...
Fix Tile.tileset to return just the containing tileset instead of all…
2018-11-20 12:28:53 +00:00
Richard Davey
5985e33caf
Merge pull request #4105 from the-realest-stu/master
...
Fix #4104
2018-11-20 11:05:05 +00:00
Nicolas Rouvière
7b9f7f0217
Fix: Cannot read property 'index' of undefined at GetTileAt and RemoveTileAt
2018-11-19 00:08:36 +01:00
Ram Kaniyur
e5ebfe861f
Fix Tile.tileset to return just the containing tileset instead of all of them.
2018-11-08 21:27:16 +11:00
Richard Davey
956a0913b8
Added new jsdocs
2018-10-22 12:12:31 +01:00
Richard Davey
a73249563e
Fixed formatting
2018-10-19 13:51:32 +01:00
Richard Davey
0eafcc0d57
Merge pull request #4119 from nkholski/master
...
Pick up animation data from Tiled 1.2+
2018-10-19 13:49:10 +01:00
Richard Davey
8a58ceeded
Merge pull request #4113 from Siyalatas/culling-fix
...
Simple fix for a reference error when culling tilemaps
2018-10-19 13:36:31 +01:00
Richard Davey
4c4421c47f
Docjam merge
2018-10-19 12:32:43 +01:00
Niklas Berg
206c12d70d
Pick up animation data from Tiled 1.2+
2018-10-17 15:12:41 +02:00
foobar
e481ea4cfd
Fix reference error when culling
2018-10-15 20:31:46 +02:00
Richard Davey
4b1c762296
Updated @memberOf to @memberof
2018-10-10 10:49:13 +01:00
Stuart Lindstrom
526067f7b6
Fix #4104
2018-10-09 14:34:47 -04:00
Richard Davey
a9063604dc
Replace @readOnly with @readonly
2018-10-09 13:40:00 +01:00
Richard Davey
1b85512de2
Fixed a bug in the canvas rendering of both the Static and Dynamic Tilemap Layers where the camera matrix was being multiplied twice with the layer, causing the scale and placement to be off
2018-10-02 12:51:02 +01:00
Richard Davey
e297b3272e
Added hundreds of new jsdoc descriptions
2018-10-01 11:35:01 +01:00
Richard Davey
b687f051e9
Added new jsdocs
2018-09-28 15:00:55 +01:00
Richard Davey
c16ea9b93d
Completed DynamicTilemapLayer jsdocs
2018-09-28 14:46:31 +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
0d5b209259
Consolidated gidMap creation
2018-09-27 13:09:23 +01:00
Richard Davey
e05f7c7ed0
Dynamic Tilemap Layers now support multiple tilesets per layer
2018-09-27 13:09:08 +01:00
Richard Davey
d92c7bf5b0
Added setTilesets
method.
2018-09-27 12:12:29 +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
53b57ccbab
Clear arrays on destroy and updated docs
2018-09-27 11:48:04 +01:00
Richard Davey
07e1f07caf
Added support for Static Tilemap Layers to support multiple Tilesets per layer.
2018-09-27 11:34:37 +01:00
Richard Davey
c1d6e438cc
Removed un-used property.
2018-09-27 11:34:13 +01:00
Richard Davey
39c55ef719
Made warnings shorter.
2018-09-27 11:33:58 +01:00
Richard Davey
bed4abc8ed
Updated ParseTilesets function to handle Tiled 1.2 and 1.1 formats
2018-09-27 00:41:11 +01:00
Richard Davey
32bd01daba
If you used a scaled Dynamic Tilemap Layer and rotated or flipped tiles, the tiles that were rotated or flipped would be positioned incorrectly in WebGL. Fix #3778
2018-09-26 16:49:18 +01:00
Richard Davey
25f8d29659
If you used a RenderTexture as a tileset then Dynamic Tilemap Layers would render the tiles inversed on the y-axis in WebGL. Fix #4017
2018-09-26 16:32:27 +01:00
Richard Davey
b4e59405b4
Calling Tilemap.renderDebug
ignored the layer scale when drawing to the Graphics object. It will now scale the layer before drawing. Fix #4026
2018-09-26 16:18:44 +01:00
Richard Davey
c0e5197f7c
Static Tilemap Layers now support tile rotation and flipping. Previously this was a feature only for Dynamic Tilemap Layers, but now both have it. Close #4037
2018-09-26 16:07:32 +01:00
Richard Davey
94d21da3ca
The Static Tilemap Layer would stop drawing all tiles from that point on, if it encountered a tile which had invalid texture coordinates (such as a tile from another tileset). It now skips invalid tiles properly again. Fix #4002
2018-09-26 15:27:19 +01:00
Richard Davey
13a72f961e
lint fix
2018-09-25 16:23:14 +01:00
Richard Davey
2985a97c56
TileSet.getTileData()
has been updated so it will return tile data from either Tiled 1.1.x or the new Tiled 1.2.x JSON structure. Fix #3998
2018-09-25 16:20:34 +01:00
Richard Davey
df8c0d8673
Calling Tilemap.renderDebug
ignored the layer world position when drawing to the Graphics object. It will now translate to the layer position before drawing. Fix #4061
2018-09-25 15:37:46 +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
89b9f42f3e
Adding jsdocs
2018-09-24 23:20:43 +01:00
Richard Davey
502b66bcac
lint fix
2018-08-21 18:13:53 +01:00
Richard Davey
f8b3fcf539
Cull Tiles now needs a render order for the layer data.
2018-08-21 18:02:00 +01:00
Richard Davey
838cdfc418
Added renderOrder property, setRenderOrder method and updated upload to use the setting.
2018-08-21 18:01:47 +01:00
Richard Davey
cc5bf41b25
Added renderOrder property and setRenderOrder method.
2018-08-21 18:01:33 +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
a7847e9cb9
Added renderOrder property.
2018-08-21 17:55:40 +01:00
Richard Davey
a462250cd9
Now extracts the renderorder property from the Tiled JSON
2018-08-21 17:54:49 +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
rootasjey
e2c505554a
Fix JSDoc in Tilemap
2018-08-20 13:20:23 +02:00
Richard Davey
fcf5d20d7b
Disable culling if layer has non-1 scroll factor #3893
2018-08-06 22:22:32 +01:00
Richard Davey
702e738ffc
When a Static Tilemap Layer is generated in WebGL it will use the Cameras roundPixels
value to clamp the tile coordinates.
2018-08-06 14:16:36 +01:00
Richard Davey
86965c28e4
The Tilemap Culling function now uses the Tilemap tile dimensions for its bounds calculations, instead of the layer tile sizes, as they two don't have to match and it's the underlying grid size that takes precedence when calculating visible tiles. Fix #3893
2018-08-06 13:31:27 +01:00
Richard Davey
4deb8e49ad
eslint fixes
2018-08-03 19:37:42 +01:00
Richard Davey
ae46e11e35
Skip processing if no tiles
2018-08-03 18:56:52 +01:00
Richard Davey
e8e32ecf2c
Swap look-up for direct reference
2018-08-03 18:56:12 +01:00
Richard Davey
70b234952a
Updated the canvas tilemap layer renderers to support parent matrix and tidied up the internal flow
2018-08-03 00:50:45 +01:00
Richard Davey
6ef7033b44
Added in parent matrix support and refactored the drawing
2018-08-03 00:42:27 +01:00
Richard Davey
31421ee00a
The CullTiles
updates from 3.11 didn't factor in the position of the Tilemap Layer to its bounds calculations, causing Static layers displayed out of the Camera viewport to never render in Canvas mode. The method has also been optimized further, with less divisions and less checks if culling is disabled.
2018-08-03 00:40:56 +01:00