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
Paul
48566e74c5
Fixes edge case when TilingSprite removed before render
...
- Issues caused when TilingSprite is destroyed before it has
ever been rendered because `canvasBuffer` not created yet.
Fixes #2092
2015-09-18 20:34:13 -07:00
photonstorm
09e8d465e4
Lots more work on the FrameDebugger. Just need texture preview and then can test it properly.
2015-09-16 13:17:06 +01:00
Richard Davey
61edd1b458
FrameDebugger can now handle Text and BitmapText.
2015-09-16 03:18:15 +01:00
Richard Davey
66aca82084
Removed duplicate call.
2015-09-16 02:25:32 +01:00
photonstorm
3be0ed8849
FrameDebugger now hooked into Canvas Renderer. Better output coming.
2015-09-15 16:14:14 +01:00
photonstorm
b9fcb7f179
Optimised size of PIXI.CanvasRenderer.mapBlendModes and started removal of options object.
2015-09-15 13:54:17 +01:00
photonstorm
4125e42a06
Sorted out setting the Stage backgroundColor. Much more concise now.
2015-09-15 13:34:07 +01:00
photonstorm
8069560aaf
No longer needed.
2015-09-15 12:53:44 +01:00
photonstorm
6784a9c1df
Optimised render loop slightly. Moved properties to game.
2015-09-15 12:53:44 +01:00
photonstorm
705cacf2ca
Sorting out the Stage background color assignment so we can drop a boolean check in the render method.
2015-09-15 12:53:43 +01:00
photonstorm
5ceb9914b9
Bumped verison number. Removed default render options (as they're set in Phaser.Game).
2015-09-15 12:53:43 +01:00
photonstorm
daef7d5bfc
Consolidating Pixi into Phaser. Removed options object, values all game from Game anyway so it saves space. Starting to move to jsdocs from yuidocs.
2015-09-15 12:53:43 +01:00
photonstorm
486c15f16f
New docs.
2015-08-24 15:43:45 +01:00
photonstorm
94223c66b7
Updated blend mode multiply check ( #1994 )
2015-08-24 13:53:46 +01:00
photonstorm
0cce3f8287
Enabling a filter on a display object that had a blend mode set would cause the object to become invisible. The two cannot be combined, so when you set a filter on a display object it now automatically resets the blend mode to NORMAL
. The same does not happen in reverse however, so if you've got a filter set and then change the blend mode it will still break. Be careful to capture this yourself (thanks @wayfu #1994 )
2015-08-24 12:26:02 +01:00
photonstorm
845a14ff55
TilingSprite._renderCanvas wasn't correctly allowing for pixel rounding (thanks @ximop #2022
2015-08-24 11:38:59 +01:00
photonstorm
103c37cd42
BitmapData.drawFull draws the given Game Object or Group to a BitmapData and then recursively iterates through all of its children, including children of Game Objects and Groups. It can draw Text, BitmapText, Sprites, Images, Emitters and Graphics objects. It's perfectly valid to pass in game.world
as the parent object, and it will iterate through the entire display list.
2015-08-19 14:19:26 +01:00
Richard Davey
80540ea919
Added 'clear' argument to RenderTexture.render, which resolves the image build-up problem for cacheAsBitmap ( #1925 )
2015-08-06 01:01:58 +01:00
photonstorm
f4a1f11429
PIXI.CanvasPool is a new static global created to deal with the issue of resource leaks and continuous DOM node build-up when creating lots of Text or BitmapData objects, or when calling generateTexture
on any display object. The CanvasPool will do its best to re-use out dated canvas elements rather than filling up the DOM with new ones.
...
Sprite.setTexture has a new `destroyBase` parameter - set this to `true` if you know the base used a generated texture that isn't being used by any other sprites. This will free-up the canvas for further re-use by other calls to generateTexture or Text objects.
2015-08-03 16:09:16 +01:00
photonstorm
e901fb80f6
Merging in the CanvasPool changes to the core.
2015-08-03 14:46:55 +01:00
photonstorm
50516e3d34
Testing CanvasPool.
2015-08-03 14:33:12 +01:00
photonstorm
0493e19b8b
Group.cacheAsBitmap would be incorrectly offset in Canvas mode (thanks @mkristo #1925 )
2015-08-03 12:03:20 +01:00
photonstorm
159f49d5bf
Experimenting with generateTexture fixes for Canvas.
2015-07-30 17:17:31 +01:00
David Leonard
2f634c6337
Minor fix to docstring
2015-07-27 07:12:17 -07:00
photonstorm
328fd32290
Cache.removeImage now calls destroy on the image BaseTexture, removing it from the PIXI global caches without throwing a warning.
2015-07-24 13:21:18 +01:00
photonstorm
7a6de818e1
Updated Grunt build scripts so that all third party libs (such as Creature, P2, gl-matrix and PIXI) are now kept well and truly outside of Phaser. They are defined and placed first in the build files. So no more PIXI hiding within the Phaser namespace or UMD patching for Phaser required.
2015-07-23 16:00:45 +01:00