cryptographer
9fdbb2d25d
Remove assignment to obsolete tileColor property
2016-06-20 22:29:05 -04:00
gotenxds
91987eff56
Added some data to image object types.
2016-06-15 13:09:47 +03:00
Upperfoot
57e8a35226
Adds missing fixedToCamera check in Phaser.TilemapLayer.prototype._renderWebGL e4ea011353
2016-06-03 16:11:39 +01:00
photonstorm
0a5b2673ff
JSHint fixes re: #2522
2016-06-03 13:14:59 +01:00
Richard Davey
05ca827c2b
Merge pull request #2522 from Upperfoot/master
...
Fixing tileMap collision when tileMapLayer is set to a position other than 0,0
2016-06-03 12:45:37 +01:00
photonstorm
e4ea011353
TilemapLayer now adheres to fixedToCamera should it be disabled #2482
2016-06-03 12:13:01 +01:00
Richard Davey
c822cda452
TilemapLayer.postUpdate could potentially be called several times per frame (depending on device frame rate), which would cause multiple texture redraws, even though only the last texture is used during rendering. This has now been modified so that the local TilemapLayer canvas is only re-rendered once per frame, during the rendering phase, and not during the logic update phase.
2016-06-02 22:44:24 +01:00
Upperfoot
55700e4fec
Take into account position of tilemap in collision
2016-05-19 08:47:31 +01:00
photonstorm
368913fd98
Removed WebGL Tilemap renderer, has moved to its own branch to be part of 2.5.0.
2016-05-11 11:27:36 +01:00
Pete Baron
5e97f10c86
Remove un-needed mixin components leaving only FixedToCamera (not sure about this one). Move this.fixedToCamera after the Core.init call which creates the underlying core components required. Add temporary instant return from shiftCanvas in case that was being called and contributing to the slow-down (probably not).
2016-05-05 17:00:22 +12:00
Pete Baron
69abe492cc
Modified Phaser.Tilemap and PIXI.Tilemap to support the new Phaser.TilemapLayerGL objects.
...
The PIXI file has a reverse dependency on Phaser for it's 'layer' parameter which contains a Phaser.Tilemap (which holds the map data). The other changes adapt it to the new data source (previously this expected a raw JSON object encoded like the Mario.json map is).
The Phaser file now keeps a reference to the data parsed from the original map, and adds a branch in createLayer to build a TilemapLayerGL instead of a TilemapLayer.
2016-05-05 15:58:03 +12:00
Pete Baron
ad04676980
New class: duplicate of Phaser.TilemapLayer modified to access the new PIXI.Tilemap WebGL based tile renderer.
...
This is just the first test which actually produces some visible output (the map is drawn for the "sci fly" demo example, if you adjust line 27 of that source file to: layer = map.createLayer(0, undefined, undefined, undefined, true);
The new terminal "true" parameter instructs Phaser.Tilemap.createLayer to create a TilemapLayerGL object instead of the usual Phaser.TilemapLayer.
2016-05-05 15:52:26 +12:00
Richard Davey
2f0231b3cd
Merge pull request #2415 from jakewilson/dev
...
Fixed and added warnings.
2016-04-06 01:21:09 +01:00
Jake Wilson
ca13a82acb
Added Tileset name to tile size warning.
2016-04-04 18:10:53 -04:00
photonstorm
f40cfbe2ae
2015 - 2016.
2016-04-04 22:16:16 +01:00
Richard Davey
2c87d14ede
Merge pull request #2412 from MannyC/keep_tiled_layer_encoding_synced
...
Remove encoding metadata from Tiled json if data has already had its …
2016-04-04 17:07:31 +01:00
MannyC
7178b7abf4
Remove encoding metadata from Tiled json if data has already had its encoding removed.
2016-04-03 23:33:38 +01:00
MannyC
b29a77f4a4
Detect if layer compression is used in a Tiled layer. Display warning and skip layer.
2016-04-03 23:17:41 +01:00
Richard Davey
a1c3050bf7
Tilemap.getObjectIndex has been removed as it didn't work correctly in most cases, and it's easier to just scan the Tilemap.objects object directly anyway ( #2242 )
2016-02-03 21:35:35 +00:00
photonstorm
8cf96a2f78
Docs fix #2271
2016-02-02 16:28:33 +00:00
Richard Davey
acebd74c26
Merge pull request #2241 from s4wny/patch-1
...
Fixed misleading error message
2016-02-02 02:33:57 +02:00
Richard Davey
6bfd94e07c
Merge pull request #2244 from ttencate/dev
...
Rename inner loop variable from 'i' to 'j'
2016-02-01 18:34:03 +02:00
Richard Davey
dd02f0b482
Merge pull request #2304 from cy-ryo-fujiwara/bug-map-hastile
...
Fixed a bug of tilemap.hasTile
2016-02-01 18:10:09 +02:00
Ryo Fujiwara
b75d6c4a92
Fixed a bug of map.hasTile
2016-01-19 12:40:02 +09:00
Thomas ten Cate
cfd924d931
Rename inner loop variable from 'i' to 'j'
...
Fixes #2233
2015-12-03 16:22:34 +01:00
Sony?
70c64eb8fa
Fixed misleading error message
...
Shouldn't it be `tileset` instead of `key`?
We can't find any entry with the name `tileset` in the JSON file. The `key` hasn't anything to do with the JSON file, that is our tilesset image we loaded with thaser.
2015-12-02 10:05:52 +01:00
photonstorm
3d1306d440
jsdoc fix.
2015-11-17 14:07:48 +00:00
photonstorm
8b0224e7b4
TilemapParser accidentally redeclared i
when parsing the ImageCollections which would cause an infinite loop (thanks DanHett)
2015-11-12 13:39:42 +00:00
Lisandro Lorea
daff43fd77
Fix for tile ids between 0x7FFFFFFF and 0xFFFFFFFF
...
2147483647 tile ids should be enough for anybody, but it is now working for any valid tile id.
2015-09-15 01:36:13 -03:00
Lisandro Lorea
f52ca58d7d
Correctly interpret binaryString as a sequence of uint32-le values
...
The previous implementation was ignoring the 3 most significant bytes of each value and would result on improper parsing of any map with tile ids higher than 255
2015-09-14 20:38:58 -03:00
Lisandro Lorea
8528f0c700
Fixed variable naming style
2015-09-13 12:15:02 -03:00
Lisandro Lorea
308ce6b57c
Add support for TiledJSON with base64 encoding
...
Tiled 0.13.0 added support for layer data compression when exporting as LUA or JSON. This means that any .tmx stored unsing base64 encoding will start exporting layer data as a base64 encoded string rather than a native array.
Phaser would try to load the level anyway without emitting any errors, resulting in a corrupted level while playing.
This PR adds detection and support for base64 encoded levels as long as they don't use compression.
2015-09-13 12:07:57 -03:00
photonstorm
486c15f16f
New docs.
2015-08-24 15:43:45 +01:00
photonstorm
cc7b632a37
Phaser.TilemapParser.INSERT_NULL is a new boolean that controls what happens when the parser encounters an empty tile: When scanning the Tiled map data the TilemapParser can either insert a null value (true) or a Phaser.Tile
instance with an index of -1 (false, the default). Depending on your game type depends how this should be configured. If you've a large sparsely populated map and the tile data doesn't need to change then setting this value to true
will help with memory consumption. However if your map is small, or you need to update the tiles (perhaps the map dynamically changes during the game) then leave the default value set (thanks #1982 )
2015-08-24 12:36:23 +01:00
photonstorm
5056eedb58
Optimised local vars to reduce file size.
...
Trying out null tile properties.
2015-08-24 12:03:32 +01:00
photonstorm
09f5742410
Tilemap.shuffle was calling the deprecated Phaser.Utils.shuffle, which has now moved to Phaser.ArrayUtils.shuffle.
2015-08-24 12:02:43 +01:00
photonstorm
5ffb5b558d
Tilemap.createFromObjects has been strengthened so that will only create Sprites for matching gids/ids/names. It also only sets the Sprite width and height values if they are present in the Tiled data (thanks @pparke #2012 )
2015-08-20 13:22:06 +01:00
photonstorm
e901fb80f6
Merging in the CanvasPool changes to the core.
2015-08-03 14:46:55 +01:00
Imanol Fernandez
e41dba7f0c
Fix unmatched context.save() & context.restore() calls
2015-07-24 17:36:56 +02:00
photonstorm
f15fe6706c
All undefined argument checks were changed from if (typeof x === 'undefined')
to if (x === undefined)
removing the typeof check and saving some bytes across the codebase in the process.
2015-07-22 10:37:15 +01:00
Richard Davey
06658fa1e0
TilemapLayer.resize allows you to resize a TilemapLayer. It will update the internal canvas object and corresponding texture dimensions ( #1881 )
2015-07-07 03:27:28 +01:00
Richard Davey
8aaa8de985
Fixed issue with tilesets not updating correctly.
2015-07-07 02:38:14 +01:00
Richard Davey
a1f618f54f
Debugging tileset issue.
2015-07-07 02:18:53 +01:00
photonstorm
8919e4e128
Trying out resize method.
2015-07-02 17:19:57 +01:00
photonstorm
698167a596
Tiled Image Collection support is now available and has been added to the TilemapParser and Tilemap classes (thanks @asyed94 #1879 )
2015-07-02 13:53:02 +01:00
asyed94
6771c656e9
Removed trailing whitespace.
2015-06-29 16:32:16 -05:00
asyed94
8fefabcf59
Implemented Tiled Image Collection support.
...
Created class ImageCollection.js to internally handle Image Collection
data.
Added imagecollections member to Tilemap.js to access parsed Image
Collection data.
Added ability to parse Image Collections from Tiled json data to
TilemapParser.js
2015-06-27 15:30:26 -05:00
photonstorm
102c74e121
Deprecated the following:
...
* Camera.screenView
* ScaleManager.maxIterations
* ScaleManager.enterPortrait (see onOrientationChange)
* ScaleManager.enterLandscape (see onOrientationChange)
* ScaleManager.enterFullScreen (see onFullScreenChange)
* ScaleManager.leaveFullScreen (see onFullScreenChange)
* ScaleManager.fullScreenFailed (see onFullScreenError)
* ScaleManager.checkResize
* ScaleManager.checkOrientation
* ScaleManager.setScreenSize (see updateLayout)
* ScaleManager.setSize (see reflowCanvas)
* ScaleManager.checkOrientationState (see reflowCanvas)
* ScaleManager.orientation (see screenOrientation)
* Gamepad.disabled (see enabled)
* Input.currentPointers (see totalActivePointers)
* Input.disabled (see enabled)
* Keyboard.disabled (see enabled)
* Mouse.disabled (see enabled)
* Mouse.mouseMoveCallback (see Input.addMoveCallback)
* MSPointer.disabled (see enabled)
* Touch.disabled (see enabled)
* Cache.getUrl (see getURL)
* Math.truncate (see Math.trunc)
* Math.snapToInArray (see Phaser.ArrayUtils.findClosest)
* Math.interpolateFloat (see Math.linear)
* Math.normalizeLatitude (use Phaser.Math.clamp(lat, -90, 90))
* Math.normalizeLongitude (use Phaser.Math.wrap(lng, -180, 180))
* Math.chanceRoll (use Phaser.Utils.chanceRoll)
* Math.numberArray (use Phaser.ArrayUtils.numberArray)
* Math.numberArrayStep (use Phaser.ArrayUtils.numberArrayStep)
* Math.limitValue (use Phaser.Math.clamp)
* Math.randomSign (use Phaser.Utils.randomChoice(-1, 1))
* Math.angleLimit (use Phaser.Math.clamp)
* Math.getRandom (use Phaser.ArrayUtils.getRandomItem)
* Math.removeRandom (use Phaser.ArrayUtils.removeRandomItem)
* Math.floor (use Math.trunc)
* Math.ceil (use Phaser.Math.roundAwayFromZero)
* Math.shift (use Phaser.ArrayUtils.rotate)
* Math.shuffleArray (use Phaser.ArrayUtils.shuffle)
* Math.distanceRounded (do the rounding locally)
* Canvas.getOffset (see Phaser.DOM.getOffset)
* Canvas.getAspectRatio (see Phaser.DOM.getAspectRatio)
* TilemapLayer.tileColor (use TilemapLayer.debugSettings.missingImageFill)
* Phaser.ArrayList alias removed, now use Phaser.ArraySet
* Utils.transposeArray (see Phaser.ArrayUtils.transposeMatrix)
* Utils.rotateArray (see Phaser.ArrayUtils.rotateMatrix)
* Utils.shuffle (see Phaser.ArrayUtils.shuffle)
2015-06-17 03:14:31 +01:00
photonstorm
04a25c5d9b
Small fix + jsdoc update.
2015-06-17 01:04:55 +01:00
Richard Davey
14733e9b90
Tilemap.addTilesetImage can now accept a BitmapData as the key
parameter and will use the BitmapData to render the tileset with instead of an image from the cache (thanks to @unstoppablecarl for the idea #1838 )
2015-06-16 23:17:46 +01:00