Commit graph

133 commits

Author SHA1 Message Date
Richard Davey
0301330c2d jshint fixes. 2016-07-22 03:59:10 +01:00
Richard Davey
020cb01056 Canvas tilemap renderer fixes. 2016-07-22 03:55:21 +01:00
Richard Davey
be92e41366 The private methods TilemapLayer._fixX, _unfixX, _fixY and _unfixY have been moved to `Tilemap. 2016-07-22 03:20:56 +01:00
Richard Davey
ef9f53e350 TilemapLayer.getRayCastTiles has been moved to Tilemap.getRayCastTiles.
TilemapLayer.rayStepRate has been moved to Tilemap.rayStepRate.
TilemapLayer.getTiles has been moved to Tilemap.getTiles.
2016-07-22 03:03:50 +01:00
cryptographer
9fdbb2d25d Remove assignment to obsolete tileColor property 2016-06-20 22:29:05 -04: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
f40cfbe2ae 2015 - 2016. 2016-04-04 22:16:16 +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
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
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
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
89c11b9d48 TilemapLayer swapped to use full Phaser.Sprite to allow for input events, bringToTop, etc. 2015-06-16 16:40:45 +01:00
photonstorm
7b011fe0d3 Fix #1742 2015-04-14 09:31:04 +01:00
photonstorm
7b8a430aac TilemapLayer docs incorrectly reported it as extending Phaser.Image, but it doesn't share the same components so has been updated.
TilemapLayer was missing the Input component (thanks @uhe1231 #1700)
2015-04-13 12:23:30 +01:00
photonstorm
1486e166bd Added physicsType property. 2015-03-23 15:04:27 +00:00
Paul
dcc83ec793 Tilemap renderer - context save/restore
- Added context save/restore; the secondary issue when the canvas
  is copied from later, and if any alpha is applied
2015-03-16 22:05:46 -07:00
Paul
54dba67f50 Tilemap rendering sets initial state better
- #1666 - previous alpha state could bleed through.
  Now the initial alpha and composite modes are set explicitly.
2015-03-16 21:35:39 -07:00
Paul
0e5272b217 Merge remote-tracking branch 'upstream/dev' into wip-components-toproto
Conflicts:
	src/gameobjects/Image.js
	src/gameobjects/Rope.js
	src/gameobjects/Sprite.js
	src/gameobjects/Text.js
	src/gameobjects/TileSprite.js
	src/gameobjects/components/Core.js
2015-02-28 15:51:47 -08:00
photonstorm
a69e53f901 Copyright date change. 2015-02-25 03:36:23 +00:00
photonstorm
c9939f8691 Tilemap fix #1635 2015-02-24 22:57:59 +00:00
Paul
4f747a1c00 Components - moving install to prototype
- This ensures the components are regsitered once per type
  instead of once per instance (which is duplicate work)
2015-02-22 20:44:11 -08:00
photonstorm
41e2fbff55 TilemapLayer no longer extends Image, but is a GameObject of its own. 2015-02-17 16:38:27 +00:00
photonstorm
8483eac6aa Removing all use of _cache from all Game Objects. 2015-02-16 17:22:51 +00:00
photonstorm
29fd37aed7 Formatting update. 2015-02-11 05:19:00 +00:00
Richard Davey
b66a0aa11a Merge pull request #1605 from mickez/tilemaplayer_scale
Added scaling capability to TilemapLayer
2015-02-09 20:02:48 +00:00
emailto@niklasberg.se
a70dd81a80 Support for tiles rotated and/or flipped in Tiled 2015-02-08 21:03:19 +01:00
Michael Rehn
bb2e263345 Changed to bracket on new line to follow the rest of the codes style 2015-02-07 21:31:17 +01:00
Michael Rehn
e600cb89b7 Added scaling capability to TilemapLayer via the setScale method 2015-02-07 19:48:44 +01:00
photonstorm
2ba6e0528e TilemapLayer.getTiles now returns a copy of the Tiles found by the method, rather than references to the original Tile objects, so you're free to modify them without corrupting the source (thanks @Leekao #1585) 2015-02-03 21:32:39 +00:00
Paul
ad9245caeb TilemapLayer - {missing changes} 2015-01-24 18:37:28 -08:00
Paul
818d5bcdcc Tilemaps - removed N-slice support
- Since N-slicing doesn't work in Safari, which is what the
  double-copy fix is for, it is simply removed.
2015-01-24 18:35:11 -08:00
Paul
4845c2054b TilemapLayer - quibbles
- Removed accidental change
2015-01-24 17:49:20 -08:00
Paul
11c78f11b0 TilemapLayer - Safari fix
- Changed default slice count to 1: this fixes yet another Safari-specific
  issue.
2015-01-24 17:43:08 -08:00
Paul
c361e6f535 TilemapLayer - fix for regression typo 2015-01-05 20:37:00 -08:00
Richard Davey
b4678b6b56 Merge pull request #1474 from nextht/remove-tw-and-th-init
Remove tw and th init
2015-01-05 11:15:28 +00:00
Paul
114d967272 TilemapLayer - quibbles
- Updated shiftCanvas usage for consistency with renderSetting access
2014-12-31 10:06:48 -08:00
Paul
76aa601d47 TilemapLayer rendering double-copy
- 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
2014-12-31 09:54:37 -08:00
nextht
18b3a3cc5b Remove useless initilization for tw and th code
tw and th have been initialized twice, the first time is useless.
2014-12-20 17:45:27 +08:00
Paul
466b021ca0 TilemapLayer: Re-added secondary copy-canvas
- 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
2014-12-12 00:26:49 -08:00
Paul
92a20a5f5f TileLayer - globalCompositionOperation set once
This might fix a safari issue; it also avoids repeatedly setting the
[same] composition operation and saving/loading context states.
2014-12-09 20:21:31 -08:00
photonstorm
347978679d docs update 2014-11-11 01:05:59 +00:00