Commit graph

3564 commits

Author SHA1 Message Date
photonstorm
e291f6d590 Added type parameter to VideoTexture.fromUrl allowing you to define the mime-type of the video file, which is required for Firefox and Safari in most cases. 2015-04-29 14:41:47 +01:00
photonstorm
4c0e34e788 jsdoc fixes. 2015-04-29 13:13:47 +01:00
photonstorm
19f8a7316e ArcadePhysics.Body.syncBounds is a new property that if true forces the Body to check itself against the Sprite.getBounds() dimensions and adjust its width and height accordingly. If false it will compare its dimensions against the Sprite scale instead, and adjust its width height if the scale has changed. Typically you would need to enable syncBounds if your sprite is the child of a responsive display object such as a FlexLayer, or in any situation where the sprite scale doesn't change, but its parents scale is effecting the dimensions regardless. 2015-04-29 13:13:26 +01:00
photonstorm
da0bd86c26 Rectangle.ceil runs Math.ceil() on both the x and y values of the Rectangle.
Rectangle.ceilAll runs Math.ceil() on the x, y, width and height values of the Rectangle.
2015-04-29 13:13:11 +01:00
photonstorm
8290e8c371 Text.setShadow has two new optional parameters: shadowStroke and shadowFill. These allow you to set if the drop shadow is applied to the Text stroke, the Text fill or both of them (thanks @qdrj #1766)
Text.shadowStroke and Text.shadowFill allow you to toggle if the drop shadow is applied to the Text stroke or fill independently.
2015-04-27 16:22:36 +01:00
photonstorm
d9434244a5 Removed array length vars. 2015-04-27 16:22:36 +01:00
photonstorm
c461c26393 Added onUpdate signal. 2015-04-27 16:22:36 +01:00
photonstorm
b645b277aa jsdoc fix. 2015-04-27 16:22:36 +01:00
photonstorm
8519c9e394 The Tween.onStart signal wasn't dispatched if the Tween had a delay set. It's now dispatched immediately if no delay, or after the delay if set. It also respects the autoStart parameter and will still dispatch even if autoStart is true. 2015-04-27 16:22:35 +01:00
photonstorm
5d680ce4d4 pause not stop. 2015-04-27 16:22:35 +01:00
photonstorm
c6e9d7cad3 Removing PIXI.TextureCache calls as no longer used. 2015-04-27 16:22:35 +01:00
Richard Davey
cb9ca5658d Merge pull request #1763 from clark-stevenson/dev
Update phaser.d.ts to 2.4.0
2015-04-27 13:50:52 +01:00
Clark Stevenson
548e022bc8 Updated typescript package for 2.4.0 2015-04-24 17:16:31 +01:00
Clark Stevenson
d6b597286b Minor phaser.d.ts the Timer callback methods have optional callbackContexts 2015-04-24 16:02:19 +01:00
Clark Stevenson
b175389c72 Merge remote-tracking branch 'clark/patch-3' into dev 2015-04-24 15:57:35 +01:00
Clark Stevenson
51b891755b Merge remote-tracking branch 'clark/patch-2' into dev 2015-04-24 15:51:19 +01:00
Clark Stevenson
d53cf52d50 Merge branch 'dev' of https://github.com/photonstorm/phaser into dev 2015-04-24 15:50:37 +01:00
Clark Stevenson
c4d4dc4bde Removed State.math
See #1759
2015-04-23 14:52:59 +01:00
photonstorm
214e8abcda Added play and stop methods and related signals. 2015-04-23 02:35:27 +01:00
photonstorm
30450cb9bc Loader.atlas and Cache.addTextureAtlas will now automatically determine the format of the JSON data (array or hash) when added to the Cache. You no longer need to specify it explicitly if JSON, only if XML. 2015-04-23 02:35:09 +01:00
Richard Davey
fa5ed16f7d Trying something out :) 2015-04-22 04:22:17 +01:00
Richard Davey
be65b08e3b Close to getting WebGL Tiling Sprites back again - animations now work too, but the placement isn't quite right. 2015-04-22 01:36:12 +01:00
photonstorm
aa9ea30e79 Working through fixing TilingSprites for WebGL. 2015-04-21 17:01:24 +01:00
photonstorm
05d0a94116 Phaser.AnimationParser methods JSONData, JSONDataHash and XMLData have all had their cacheKey parameter removed as it's no longer used. 2015-04-21 16:01:11 +01:00
photonstorm
04e7be38bf Heavily refactored. Vastly optimised generateTexture method. Canvas renderer now works correctly with animated sprites, texture atlases and trimmed sprites. Warning: Currently breaks WebGL rendering. Will fix soon. 2015-04-21 15:57:17 +01:00
photonstorm
cc46212d5b Refreshes a tiling texture on change of frame. 2015-04-21 15:55:58 +01:00
photonstorm
3d75902a67 Removed all calls to TilingTexture because it's now handled in the setFrame component. 2015-04-21 15:55:40 +01:00
photonstorm
ede76cf4f6 Frame.uuid has been removed (was flagged as deprecated for several releases). This has a two-fold effect: First it means that the property no longer exists and secondly it means that the AnimationParser (the class responsible for loading sprite sheets and texture atlases) no longer has to call either RandomDataGenerator.uuid OR populates the PIXI.TextureCache. The first saves some CPU time and the second saves memory by not creating references to textures it doesn't ever use. The PIXI.TextureCache is now ignored by Phaser other than for the __missing and __default textures. 2015-04-21 15:55:04 +01:00
photonstorm
a4963adec3 jsdoc clarification. 2015-04-21 15:54:44 +01:00
photonstorm
8fb5a89e1f Added video alias. 2015-04-21 05:11:31 +01:00
photonstorm
8981e9603e Removed Frame.uuid and updating TileSprite to work with animated sprites. 2015-04-21 05:11:19 +01:00
photonstorm
94b4d5d73c Doc updates. 2015-04-21 05:10:27 +01:00
photonstorm
6c96568dd1 Files can now be added to the Loader with an absolute URL even if you have a Loader.baseURL set. In previous versions the baseURL would still be prepended to the file URL, but the Loader now checks if the a file URL begins with http or // and skips prepending the baseURL to it.
All calls to Loader methods that add files to the queue, such as `Loader.image` or `Loader.atlas`, now have the URL as an optional parameter. If not set Loader will assume the URL to be based on the key given. For example the following: `game.load.image("boom", "boom.png")` can now be expressed as just `game.load.image("boom")`, or `game.load.atlas("player", "player.png", "player.json")` can now be shortened to `game.load.atlas("player")`. Please see the freshly updated jsdocs for full details.
2015-04-21 02:14:41 +01:00
photonstorm
e6ab4884a6 Set usingWebAudio if using it :) 2015-04-21 02:07:47 +01:00
Clark Stevenson
aa4ebab29d Update PIXI.d.ts generateTexture
Should fix #1719 ?
2015-04-20 16:27:35 +01:00
photonstorm
12f8454d62 close #1755 2015-04-19 01:35:15 +01:00
photonstorm
a5c14befa7 Formatting. 2015-04-17 19:56:14 +01:00
photonstorm
21de1e7c09 Added delayed load event handling back in. 2015-04-17 19:55:53 +01:00
photonstorm
97bc582f8d Added VideoTexture support back in and fixed various load related issues. 2015-04-17 19:55:30 +01:00
photonstorm
a2eaccabed Added EventTarget and VideoTexture back into Pixi. 2015-04-17 19:55:08 +01:00
photonstorm
b196e4f17e Enabled PIXI.VideoTexture support. 2015-04-17 17:36:20 +01:00
photonstorm
48f04f1ec5 Fixed hasLoaded filter mappings. 2015-04-17 17:36:05 +01:00
photonstorm
714580f9a9 Manual fix #1752 2015-04-17 17:35:52 +01:00
photonstorm
8476a0b87f One ! too many #1746 2015-04-17 14:26:01 +01:00
photonstorm
2bf11ab5f6 Version number fix. 2015-04-17 03:54:01 +01:00
photonstorm
59beae762d The SoundManager didn't accurately detect devices or browser environments with no sound card present and would try to carry on using a null Web Audio context (thanks @englercj #1746)
SoundManager.pauseAll, resumeAll and stopAll now checks if the SoundManager.noAudio is set and ignores the calls.

SoundManager.usingWebAudio is set to `false` by default (used to be `true`) and is only explicitly set if Web Audio is available and hasn't been disabled in the PhaserGlobal object.

SoundManager.touchLocked is now set to `false` should the device be using legacy Audio, avoiding the unlock call running without need.
2015-04-17 03:49:20 +01:00
photonstorm
8144c4910e jshint fixes. 2015-04-17 03:23:40 +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
3a61fa35f0 RenderTexture.render now takes a Matrix as its second parameter, not a Point object. This brings it in line with Pixi and allows you to perform much more complex transformations on the object being rendered. If you need to replicate the old behavior please use RenderTexture.renderXY(sprite, point.x, point.y) instead.
RenderTexture.render and `renderXY` would ignore the Sprites rotation or scale. The full Sprite transform is now used correctly when the Sprite is drawn to the texture. If you wish to replicate the old behavior please use `RenderTexture.renderRawXY` instead.

RenderTexture.matrix has been removed as it's no longer used.

Fixed bug in Pixi where RenderTexture.render would ignore the given matrix.

Fixed a bug in Pixi where drawing a Sprite to a RenderTexture would reset the Sprites transform to an identity Matrix.
2015-04-17 03:22:07 +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