Richard Davey
c4f4ceef42
Code format fix.
2016-06-02 22:41:58 +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
621673b9ca
Revert worldScale setter.
2016-05-11 16:37:21 +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
7b803135c8
Updated jsdocs for getBounds ( #2406 )
2016-04-05 21:13:04 +01: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
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
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
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
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
photonstorm
3be0ed8849
FrameDebugger now hooked into Canvas Renderer. Better output coming.
2015-09-15 16:14:14 +01:00
photonstorm
8069560aaf
No longer needed.
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
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
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
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
Richard Davey
f552615982
Fixed RenderTexture in WebGL.
2015-07-16 02:27:07 +01:00
Richard Davey
44c650f6e7
PIXI.DisplayObject.updateTransform now nulls the _currentBounds property (thanks @gaufqwi #1906 )
2015-07-12 12:01:38 +01:00
photonstorm
45f06bd01c
Fixed #1866
2015-07-09 16:41:53 +01:00
photonstorm
8e6f9574ea
Heavily tweaked tint texture handling. Can now be set by a texture and cached internally.
2015-05-08 04:13:34 +01:00
photonstorm
9cb7122743
Improved code formatting.
2015-05-08 01:51:06 +01:00
photonstorm
12362a8300
Mark new textures as valid.
2015-05-07 02:44:29 +01:00
photonstorm
a686f6e212
PIXI.DisplayObject.worldPosition contains the position of the DisplayObject (and therefore any object that inherits from it, such as Phaser.Sprite) taking into account all transforms in the display list. It is updated at the end of DisplayObject.updateTransform
. DisplayObject.position reflects only the position applied to the object directly, whereas worldPosition includes the positions that may have been applied to its ancestors.
...
PIXI.DisplayObject.worldScale contains the scale of the DisplayObject (and therefore any object that inherits from it, such as Phaser.Sprite) taking into account all transforms in the display list. It is updated at the end of `DisplayObject.updateTransform`. DisplayObject.scale reflects only the scale applied to the object directly, whereas worldScale includes any scales that may have been applied to its ancestors.
PIXI.DisplayObject.worldRotation contains the rotation of the DisplayObject (and therefore any object that inherits from it, such as Phaser.Sprite) taking into account all transforms in the display list. It is updated at the end of `DisplayObject.updateTransform`. DisplayObject.rotation reflects only the rotation applied to the object directly, whereas worldRotation includes any rotations that may have been applied to its ancestors.
2015-05-03 13:53:03 +01:00
photonstorm
8981e9603e
Removed Frame.uuid and updating TileSprite to work with animated sprites.
2015-04-21 05:11:19 +01:00
photonstorm
a5c14befa7
Formatting.
2015-04-17 19:56:14 +01:00
photonstorm
2e2ba665cd
PIXI.DisplayObject.updateTransform has a new optional parameter parent
. If the DisplayObject doesn't have a parent (i.e. it isn't on the display list yet) then in the past updateTransform
would fail. This meant you couldn't do things like scale or rotate a Sprite and then draw it to a RenderTexture or BitmapData, as calls to updateTransform would be ignored. The new checks now look to see if the parent
parameter is set. If so this takes priority over the actual parent and is used to modify the transform (note that it **doesn't** reparent the DisplayObject, it merely uses it for the transform.) If there is no parent (explicitly or via the parameter) then it falls back to use Phaser.World as the parent. If it can't reach that then no transform takes place.
2015-04-17 03:22:23 +01:00
photonstorm
cdfc4ff45b
Pixi.Sprite.renderCanvas and renderWebGL now has a new optional matrix parameter. You can use this to render the Sprite with an alternative transform matrix without actually adjusting the Sprite matrix at all.
2015-04-17 03:20:44 +01:00
photonstorm
6cf982a4a0
Fixed to Destroy component if still in render loop.
2015-03-11 01:44:46 +00:00
photonstorm
ee61d95980
Tidying up the Pixi source.
...
Added DisplayObject.destroy to cleanly remove all references, callbacks and cached textures (fixes #1656 )
2015-03-10 15:13:37 +00:00
photonstorm
0516167c3d
Finally tracked down the rogue bug causing Graphics objects to not work with various components ( fix #1654 )
2015-03-10 14:23:49 +00:00
photonstorm
fe9a9fcd63
More Pixi updates.
2015-03-05 19:26:53 +00:00
photonstorm
d717c5c180
Removed final traces of _interactive properties and checks. Also added preUpdate catch.
2015-03-05 14:01:43 +00:00
photonstorm
41396d5ad2
Merged all of the relevant Pixi 2.2.7 fixes in ( #1621 )
2015-02-25 17:04:48 +00:00
photonstorm
bec18cb46c
Removed redundant event call.
2015-02-19 15:27:59 +00:00
photonstorm
8f86f911af
Formatting.
2015-02-17 16:39:29 +00:00
photonstorm
5b8635d334
Removed all Stage interaction related code.
2015-02-17 15:50:12 +00:00
photonstorm
8c786a2df5
Removing Pixi files no longer used in this build of Phaser.
2015-02-17 15:46:52 +00:00
photonstorm
dfc8ff32d2
You can now tint animated Sprites in Canvas mode. Or change the texture atlas frame of a tinted Sprite or Image. Please note that this is pretty expensive (depending in the browser), as the tint is re-applied every time the *frame changes*. The Pixi tint cache has also been removed to allow for subtle tint color shifts and to avoid blowing up memory. So use this feature sparingly! But at least it does now work ( #1070 )
2015-02-10 14:53:55 +00:00
photonstorm
eb6a09ca0a
Pixi update.
2014-12-03 09:18:43 +00:00