Commit graph

262 commits

Author SHA1 Message Date
Richard Davey
c4f4ceef42 Code format fix. 2016-06-02 22:41:58 +01:00
photonstorm
68c29470cf The way the display list updates and Camera movements are handled has been completely revamped, which should result is significantly smoother motion when the Camera is following tweened or physics controlled sprites. The Stage.postUpdate function is now vastly reduced in complexity. It takes control over updating the display list (calling updateTransform on itself), rather than letting the Canvas or WebGL renderers do this. Because of this change, the Camera.updateTarget function uses the Sprites worldPosition property instead, which is now frame accurate (thanks @whig @Upperfoot @Whoisnt @hexus #2482) 2016-06-02 16:38:21 +01:00
photonstorm
8743e8952c Reverted worldScale calculation. 2016-05-23 12:54:33 +01:00
photonstorm
a6a2c61240 Sprites that had a tint on them, that then had their frame changed via either Sprite.frame or Sprite.frameName wouldn't re-tint the new frame, and would become stuck on the old frame in Canvas mode (thaks @spayton #2453) 2016-05-17 21:04:40 +01:00
stafford
e6b9ca4e22 fix generateTexture return type 2016-05-12 15:30:33 +10:00
photonstorm
85d5d9715d Removed, this has gone to its own branch. 2016-05-11 16:38:56 +01:00
photonstorm
621673b9ca Revert worldScale setter. 2016-05-11 16:37:21 +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
ef4143136e Use this.x, this.y as scrolling offsets when rendering each tile. 2016-05-05 16:57:55 +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
eb77949f63 Strip down PIXI.Tilemap to remove all unused code.
Add very simple tilemap render function to draw every layer, every tile, for the tiles provided.
Link to the TilemapShader and get the whole thing working.
2016-05-05 10:29:51 +12:00
Pete Baron
9deb07c3aa Modify this shader to draw a simple textured rectangle using a two-tri strip, extremely quickly due to simplicity. 2016-05-05 10:28:12 +12:00
photonstorm
7332dd8028 Custom WebGL Tilemap renderer POC displaying textures. It's a start. 2016-04-28 00:18:09 +01:00
photonstorm
d55b0c9e51 Tilemap update. 2016-04-27 03:38:07 +01:00
photonstorm
b10c8858c3 Tilemap shader WIP. 2016-04-27 03:02:13 +01:00
photonstorm
3d6b1a3b7e Stopped the Camera Shake effect from changing the World position, as it screws up Arcade Physics, Sprite deltas and some input handling. Instead moved the effect to be render applied only. On Canvas it updates the context.setTransform call, and on WebGL the renderSession offset property. 2016-04-19 04:12:58 +01:00
photonstorm
b9f62e77e6 You can now pass a TilemapLayer as a Texture to a TileSprite. A limitation of this is that if you pass it to a TileSprite it will make a fill pattern from the TilemapLayer at that instant it's passed, and it won't keep track of the layer in future should it update (thanks @jdnichollsc #1989) 2016-04-07 03:45:21 +01:00
photonstorm
7b803135c8 Updated jsdocs for getBounds (#2406) 2016-04-05 21:13:04 +01:00
photonstorm
f40cfbe2ae 2015 - 2016. 2016-04-04 22:16:16 +01:00
photonstorm
f9ff892510 Formatting. 2016-04-04 21:25:21 +01:00
Richard Davey
07adad9ae8 Merge pull request #2395 from sergey7c4/dev
Fixed issue #2317
2016-04-04 21:20:01 +01:00
sergey7c4
fef4c7b021 Fixed unwanted smoothing 2016-03-23 16:59:36 +05:00
CptSelewin
50a454b79e fixed tinting issue when loading textures 2016-03-11 10:06:15 +01:00
photonstorm
c04a2be36b Format updates. 2016-02-26 13:26:27 +00:00
Alex Stone
db7c417baf Reset worldTransforms of children after computing local bounds. 2016-02-25 20:37:09 -06:00
photonstorm
ba5981a03f Removed a console.log from the TilingSprite generator. 2016-02-19 14:46:55 +00:00
photonstorm
17071b578c BaseTexture.destroy wasn't correctly removing the texture from the BaseTextureCache if it was a cached CanvasPool entry (such as Text objects use), causing drawImage errors in Canvas mode, and just blank textures in WebGL (thanks @civet #2339) 2016-02-18 12:59:40 +00:00
Richard Davey
f6d273c4fc DisplayObject._generateCachedSprite (which is called from updateCache or when cacheAsBitmap is enabled) would bitwise | 1 the bounds width and height. This would often lead to incorrect rounding (heights of 4 would become 5, while heights of 5 would remain 5). This has now been removed and the width and height are passed through Mail.ceil and then checked to make sure they aren't less than 1 pixel in either direction (thanks @alesdotio #2078) 2016-02-17 03:40:04 +00:00
Richard Davey
071d9cffd0 Graphics.generateTexture has a new argument padding which allows you to add extra spacing onto the generated texture. This is useful for small Graphics objects where you find a few pixels getting sliced off the edges due to rounding issues (#1933) 2016-02-17 02:31:29 +00:00
Chad Engler
5b7130d4d6 fix one more place where resolution wasn't taken into account 2016-02-06 17:05:44 -08:00
Chad Engler
7457cc67f2 Fix #2320: properly size filter texture and viewport 2016-02-06 11:30:31 -08:00
Richard Davey
2a948832fc Merge pull request #1842 from hightopo/fix-mask-filter-bug
Fix mask combine filter bug
2016-02-04 18:07:39 +02:00
photonstorm
da8fa83730 Changed default back. 2016-02-04 16:00:16 +00:00
photonstorm
afc96352de PIXI.WebGLGraphics.stencilBufferLimit is a new integer that allows you to define how many points exist in a Graphics object before Pixi swaps to using the Stencil Buffer to render it. The default is now 64 (originally 6). This fixes issues with things like Quadratic curves not rendering as masks in WebGL. 2016-02-04 14:52:35 +00:00
photonstorm
c3c2dd6067 Graphics.arc has a new argument segments that allows you to control how many segments are created when the arc is drawn. The default is 40. Use a higher number for more fidelity, i.e. if you find that reversed arcs are not joining up fully (#2064) 2016-02-04 13:49:55 +00:00
photonstorm
8076f64656 We have replaced the PolyK Triangulation calls within Pixi with EarCut 2.0.8. This allows for faster polygon triangulation, and also deals with more complex polygons that PolyK would crash on. 2016-02-04 13:23:01 +00:00
Richard Davey
33604901c4 TilingSprite would ignore the renderable property, and render it regardless. Now it skips render if renderable is false (thanks @Green92 #2214) 2016-02-04 00:09:30 +00:00
Richard Davey
1883cfc83b BaseTexture.destroy no longer checks for the _pixiId property on the canvas before removing it from the CanvasPool, meaning it's now destroying a lot more canvas elements than it was in the past! 2016-02-03 11:41:37 +00:00
nlotz
da45d04a70 fix typos in API docs 2015-10-27 09:10:14 +01:00
photonstorm
efc69ff463 Buttons (or any Sprites) that don't have a texture, but have children, would incorrectly render the children under WebGL due to the baseTexture.skipRender property (thanks @puzzud #2141) 2015-10-16 16:44:51 +01:00
photonstorm
d5f1b43a2d Added skipRender to FastSpriteBatch. 2015-10-15 11:42:53 +01:00
photonstorm
99751a5e8e BaseTexture.skipRender is a new boolean that can be set to skip the rendering phase in the WebGL Sprite Batch. You may want to do this if you have a parent Sprite with no visible texture (i.e. uses the internal __default texture) that has children that you do want to render, without causing a batch flush in the process. 2015-10-15 11:39:59 +01:00
photonstorm
45d92d4217 ScaleMin and ScaleMax stopped working in Phaser 2.3.0 due to an incorrect transform callback scope (thanks @brianbunch #2132) 2015-10-13 13:32:55 +01:00
photonstorm
bd53b61ffd Sprite.getBounds would report an inaccurate value if the sprite was negatively scaled (causing things like generateTexture to be cut off) (thanks @DavidAPC #2108) 2015-10-13 13:02:49 +01:00
photonstorm
e01a754732 Removed the FrameDebugger and moved to its own branch. 2015-10-12 11:10:37 +01:00
Richard Davey
8dc8d7dd72 Added fd to the renderSession to stop the FrameDebugger breaking in TilingSprite under WebGL. 2015-10-07 22:15:20 +01:00
Richard Davey
84a566bf79 Added guard around the blend mode setter. 2015-09-27 01:44:38 +01:00
Richard Davey
cbf9b3f71f WebGLRenderer.mapBlendModes optimised to cut down on file size. 2015-09-26 00:58:02 +01:00
photonstorm
0dee1157fc PIXI.WebGLRenderer.updateTexture now returns a boolean depending on if the texture was successfully bound to the gl context or not.
PIXI.WebGLSpriteBatch.renderBatch would still try and render a texture even if `updateTexture` failed to bind it. It now checks the return value from `updateTexture` and ignores failed binds.
2015-09-22 15:20:23 +01:00
Richard Davey
11de8b1944 Merge pull request #2097 from pnstickne/wip-2092
Fixes edge case when TilingSprite removed before render
2015-09-19 13:09:53 +03:00