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
photonstorm
8eb34f96ce
WebGL context loss and restoration is now handled directly by Phaser.
...
Cache.clearGLTextures empties out all of the GL Textures from Images stored in the cache. This is called automatically when the WebGL context is lost and then restored.
2015-07-22 12:59:32 +01:00
photonstorm
915a757f96
Text.updateText will now check the width and height values of the Text canvas and if either are zero it sets Text.renderable = false
to avoid throwing WebGL texture binding errors.
2015-07-22 12:43:43 +01: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
fc1e0de790
Merge pull request #1923 from mkristo/pixi-patch
...
Make PIXI available for Phaser when using require
2015-07-21 16:14:09 +01:00
photonstorm
7144b10ad5
TileSprites fixed for WebGL.
2015-07-21 13:24:12 +01:00
Markus Kristo
6d742155bf
Make sure PIXI is available when using require for phaser builds
...
This is a hackish solution, and would not be needed if Phaser used require and a JS bundler like webpack
2015-07-21 10:55:54 +02:00
Richard Davey
f552615982
Fixed RenderTexture in WebGL.
2015-07-16 02:27:07 +01:00
Richard Davey
1c9fb614a4
PIXI._CompileShader can now take an array or a string for the fragment src.
2015-07-15 23:20:39 +01:00
Richard Davey
44c650f6e7
PIXI.DisplayObject.updateTransform now nulls the _currentBounds property (thanks @gaufqwi #1906 )
2015-07-12 12:01:38 +01:00