As implementation is leaning on 0.11.0 feature of Tiled, I made sure the earlier Tiled files that might be used are not going to break from this. Defaulting to empty string if the .type property is not defined by Tiled (for Tiled < 0.11.0), otherwise we use the provided value.
Why isn't the .type already read from the objects details as it's there? Latest release version of Tiled 0.11.0 has this field for Objects and it's quite extensively used by other frameworks.
Well, I need this and I suppose there are other people too who might be interested in having this in here too. Currently I go around this by creating a custom property of "type" and setting my value on it but that's just extremely silly.
- Memory optimization of delta-scroll shifting.
- The copy canvas is shared between all TilemapLayers
- The copy is done in segments to reduce the memory usage of the copy
canvas. Currently this is a 1/4 ratio.
- Device has the feature (by browser) check to see if bitblt works
- TilemapLayer will automatically enable the double-copy as needed
- Device.whenReady can be used to override the device value
- This change uses a secondary canvas and rectangle clearing instead of a
'copy' composition on the same canvas. This should hopefully address
the flickering issue in Safari and Safari Mobile
Addresses https://github.com/photonstorm/phaser/issues/1371 - where Tiled
used floor calculations and Phaser used round calculations.
There are no breaking changes with the demos; however, if there was code
that relied on behavior that _deviated_ from the defactor Tilemap behavior
then may be prone to "incorrect results" if using tileset images that are
not correctly aligned to tilesize multiples.
This also adds/corrects some warnings:
- A warning when the tileset size is not an even multiple (it was
suppressed due to using `round` prior to the checks.
- A warning if loading an image changes the cols/rows of a Tileset
- A specific warning for Tileset Image Collections which are not yet
supported
TilemapLayer
- Added "delta scroll rendering"
- Enabled (by default) via `renderSettings.enableScrollDelta`
- Dramatic CPU reduction: 30% to 2% scrolling 50x37 region
- Side-effect: fixed some Chrome de-opt issues with `render`
- Various rendering updates and removal of many `_mc` field
- Made `index` a read-only propert that reflects the layer.index
- Creates a local cache from tile index -> tileset, added `resetTilesetCache`
- Also prevents crash when an index not associated with a tileset is
used; see `missingImageOverfill`.
- Various debug options moved to `debugSettings` and simplified; documentation updated.
- Uses `debugSettings.missingImageOverfill` and `tileColor` (deprecated) to display invalid tileset images
- Only change the context alpha when the tile alpha changes; in Chrome 38
this removed a .5% penalty
- Added `renderSettings` which controls misc. rendering/optimizations.
- Updated documentation to @member, clarified
Tileset
- Added `containsTileIndex` method to allow being queried if the specific tile index is handled/supported.
- Uses a firstgid bias and interlacing to fit the data in single densely packed array.
- Updated documentation to @member, clarified