Commit graph

2460 commits

Author SHA1 Message Date
photonstorm
fa7259fd75 Removed debug calls. 2015-06-03 05:28:24 +01:00
photonstorm
01de0de7ac Added BitmapText global. 2015-06-03 05:28:24 +01:00
photonstorm
2484ced06d Typo. 2015-06-03 05:28:24 +01:00
photonstorm
cf5238c749 Removed use of PIXI.BitmapText entirely. Moved all update and support functions to Phaser. 2015-06-03 05:28:23 +01:00
photonstorm
ed82097151 Removed un-necessary PIXI.TextureCache pollution in Phaser.LoaderParser.bitmapFont. 2015-06-03 05:28:23 +01:00
photonstorm
17648b74db Complete refactoring of PIXI.updateText - now properly respects the maxWidth setting regardless of kerning or font scale. 2015-06-03 05:28:23 +01:00
photonstorm
76e2b00c82 Fixed pad jsdoc and ts defs (#1823) 2015-06-02 19:53:30 +01:00
photonstorm
cc5740af10 BitmapText line spacing and word wrapping has been vastly improved and bought in-line with how Pixi 3 handles it, but with additional anchor support. 2015-05-31 01:31:11 +01:00
Richard Davey
86f155da80 Merge pull request #1804 from asyncanup/patch-1
Fixed spelling error in 'rotation'
2015-05-30 20:02:09 +01:00
photonstorm
1438248388 Group.add and Group.addAt will only create a Physics Body on the child if it doesn't already have one. This is a change from 2.3 where it would replace the physics body property with the new body, but this could lead to garbage build-up over time, so you should now properly destroy the body before changing it. 2015-05-29 00:59:23 +01:00
photonstorm
5ef9b0a5e6 TilemapParser.parseTiledJSON would ignore 'falsey' properties set on Objects in Tiled JSON tilemaps, such as x: 0 or visible: false. These properties are now accurately copied over to the destination map data (thanks @MaksJS #1818) 2015-05-27 18:07:33 +01:00
photonstorm
fcb2dc8306 Added snapPoint value (currently unused) 2015-05-26 20:01:57 +01:00
photonstorm
bdcb15fcde Tween.to and Tween.from can now accept null as the ease parameter value. If null it will use the default tween, as per the documentation (thanks @nkovacs #1817) 2015-05-26 20:01:57 +01:00
photonstorm
621e51d949 Docs update about the lovely 48000 Hz music bug. 2015-05-23 03:37:04 +01:00
photonstorm
18ae9268aa Scope fix. 2015-05-22 15:14:49 +01:00
photonstorm
c2f7520c7a StateManager.onStateChange is a new signal which is dispatched whenever the State changes from one to another. The callback you specify is sent two parameters: the string based key of the new state, and the second parameter is the string based key of the old / previous state. 2015-05-22 15:10:20 +01:00
photonstorm
5054344668 The LoadTexture component has a new property: customRender which is checked for in the Core postUpdate to know when to render custom elements like Videos. 2015-05-21 15:24:39 +01:00
photonstorm
312c31b778 jsdoc and formatting fixes. 2015-05-21 11:53:18 +01:00
luckylooke
1939efd1c1 Copypaste typo
`Point.setTo(2, 2)` to `Point.set(2, 2)`
2015-05-20 14:21:35 +02:00
Anup Bishnoi
ac92e3c58e Fixed spelling error in 'rotation' 2015-05-19 22:48:03 -04:00
photonstorm
5a91f85b1f Typo. 2015-05-19 16:57:36 +01:00
Richard Davey
4431e72711 Merge pull request #1770 from jeremyosborne/distsq
Fix for #1761: [Feature Request] Add Math.distanceSq().
2015-05-19 16:14:57 +01:00
Richard Davey
8db0bfa377 Merge pull request #1785 from rblopes/fix-1782
Assign the default value of 60 FPS to the optional `frameRate` parameter, when ommited.
2015-05-19 15:04:45 +01:00
photonstorm
1e2940a6a4 PIXI.Graphics was calling Polygon.flatten in its drawShape call, causing the original Polygon object to internally change. It now takes a clone of the polygon and only flattens that (#1779) 2015-05-19 14:53:32 +01:00
photonstorm
d2bcb3562b If transformUrl is given an invalid URL it returns false. 2015-05-19 14:19:24 +01:00
photonstorm
734fbfea9e The mp4Video check includes h264 now. 2015-05-19 14:18:57 +01:00
photonstorm
0f6dd1a1a6 Device.firefoxVersion is a new property that contains the major Firefox version number if running within Firefox, otherwise zero. 2015-05-18 14:51:25 +01:00
photonstorm
7c9db8f632 jshint fixes. 2015-05-18 13:36:22 +01:00
photonstorm
2c775cf03d FrameData.getFrameIndexes when called with a partial array (such as creating an animation out of a set of frames) would return the indexes array padded out with 'undefined' entries, causing short animations to never fully play through. 2015-05-18 12:55:48 +01:00
photonstorm
2e6af02f86 AnimationManager.add no longer sets the currentFrame property when just adding an Animation to a Sprite. The currentFrame property is now only set when the animation begins playing. This avoids the Sprite.frame and Sprite.frameName properties from returning incorrect results after adding (but not playing) an Animation. It also allows very short animations (2 frames) to play correctly without needing to loop. 2015-05-18 12:55:48 +01:00
Gionatan Iasio
1bbb3bb903 Fix Rope.js
Rope creation key parameter didn't work, because PIXI.Rope requires a texture, not string.
Changed it like Sprite.
2015-05-16 19:59:12 +02:00
photonstorm
f78a4cb337 jshint fixes. 2015-05-15 01:35:20 +01:00
photonstorm
f725ac48ae Removed all the debug information. 2015-05-15 01:27:42 +01:00
photonstorm
f2e2039009 Invalidate the texture while we wait for the new one to load (crashes IE11 otherwise) 2015-05-15 01:17:44 +01:00
photonstorm
ce27da362b Stacks of fixes to the video stream support to get it working in Firefox. 2015-05-14 23:23:38 +01:00
photonstorm
4fa99f52c5 jsdocs fix and video loader fallback for Firefox. 2015-05-14 23:23:22 +01:00
photonstorm
4cd374691a Wrapped the decodeAudio in a try/catch. 2015-05-14 23:21:19 +01:00
photonstorm
b91387c9a6 Extended the getUserMedia and window.URL check. 2015-05-14 23:20:52 +01:00
photonstorm
aabeccbdac Working but needs refining. 2015-05-14 19:10:36 +01:00
photonstorm
63887faffe Loads of changes to deal with invalid textures and videos pending playback (i.e. Firefox) 2015-05-14 16:52:09 +01:00
photonstorm
71b242386d Added video loadeddata callback for Firefox (which doesn't throw the canplay event until you actually start to play the video.. awesome, thanks Firefox) 2015-05-14 16:52:09 +01:00
photonstorm
ad4cf34d05 LoadTexture remembers texture valid state. 2015-05-14 16:52:09 +01:00
photonstorm
6c3d0833a3 Made silent texture fail the default. 2015-05-14 16:52:08 +01:00
Richard Davey
8aecb49d48 Merge pull request #1792 from formigone/dev-return-strict-bool
Return actual boolean value instead of 1
2015-05-13 10:59:13 +01:00
Rodrigo Silveira
ce7bcb2243 Return actual boolean value instead of 1
This is particularly helpful when doing === comparisons. Now isOdd is
  consistent with isEven, which returns actual boolean values as well.
2015-05-13 05:59:34 -03:00
photonstorm
23f2a7ca66 Removed 'scale' from Group as it comes from PIXI anyway. 2015-05-12 13:03:27 +01:00
photonstorm
7c123b5203 Add guards around scaleSprite. 2015-05-12 13:03:26 +01:00
photonstorm
e6f71e959a Graphics constructor now sets x/y parameters to zero if undefined. Before it would set them to undefined as the type check wasn't strict. 2015-05-12 13:03:26 +01:00
photonstorm
4aa22e22a1 Check texture property. 2015-05-12 13:03:26 +01:00
photonstorm
7b938f396e Rectangle.bottomLeft has been added (thanks @mattmogford #1788) 2015-05-12 13:03:26 +01:00
Rafael Barbosa Lopes
0a9ca57a8f Cleaning some white space. 2015-05-08 21:42:29 -03:00
Rafael Barbosa Lopes
29b22972ca Proper code formatting. 2015-05-08 21:35:35 -03:00
Rafael Barbosa Lopes
d19411e069 Assign the default value of 60 FPS to the optional frameRate parameter, when ommited.
This patch tries to prevent an issue in the tween timeline data generation
where an `undefined` value causes an unhandled type coercion when the program
calculate how many frames will be generated for a given `TweenData` timeline.
2015-05-08 19:39:13 -03:00
photonstorm
9b95026cc9 Removed ConvertTintToImage as the Image object it created was never returned or used anywhere, so pointless having.
Optimised the canvas creation - before it was creating a new canvas every time it tinted a sprite.
Removed un-used tint method (tint with overlay)
Optimised tintWithMultiply.
2015-05-08 04:14:56 +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
a1102d4d4d Added re-tint reset. 2015-05-08 04:12:20 +01:00
photonstorm
2cd59bbf32 Tidying up docs and formatting. 2015-05-08 04:12:07 +01:00
photonstorm
6f351ff0c1 Texture.requiresReTint is a new property that controls if a texture requires the display object to be re-tinted having been updated internally. The LoadTexture component now sets this. 2015-05-08 04:11:48 +01:00
photonstorm
164039d7e7 Sets the re-tint state to true.
Removed un-needed clear call.
2015-05-08 04:10:39 +01:00
photonstorm
326cb759cf Docs fixes. 2015-05-08 02:28:46 +01:00
photonstorm
9cb7122743 Improved code formatting. 2015-05-08 01:51:06 +01:00
photonstorm
855831e4c2 BitmapData.update now validates the width and height values to ensure they aren't lower than 1, which would previously cause a context error. 2015-05-08 01:49:59 +01:00
photonstorm
d2b9bfe7b8 RetroFont has been updated to use RenderTexture.renderXY, removing the need for creating a Point object each update.
RetroFont no longer puts any entries into the TextureCache or generates any UUIDs on instantiation, speeding up creation and lowering memory use.
2015-05-08 01:49:11 +01:00
photonstorm
e3b8fe3401 Proper setFrame call. 2015-05-07 02:45:33 +01:00
photonstorm
67704d0136 Updated Frame handling for Videos so sprites have their own frames, not a reference to the Videos frame. 2015-05-07 02:44:48 +01:00
photonstorm
12362a8300 Mark new textures as valid. 2015-05-07 02:44:29 +01:00
photonstorm
af66b49f31 If a BitmapData is created with a width or height set to zero then the width and/or height are set to a default value (256) instead to avoid getContext errors. 2015-05-06 16:50:10 +01:00
photonstorm
303929a3ce Added Video.snapshot and Video.grab support. 2015-05-06 16:47:46 +01:00
photonstorm
7cd89eedd6 jshint fixes. 2015-05-06 08:13:55 +01:00
photonstorm
7f89a3de60 Fixed video event. 2015-05-06 07:57:52 +01:00
photonstorm
d14d9f4f64 Added onAccess and onError signals and tidied up the stream handling. 2015-05-06 07:25:34 +01:00
photonstorm
a24a22742a Enabled Stream stopping. 2015-05-06 06:11:09 +01:00
photonstorm
37304c7cc7 Added Video.createVideoStream support. 2015-05-06 06:06:02 +01:00
photonstorm
399cf3f804 jshint fix. 2015-05-06 02:02:49 +01:00
photonstorm
7674060afc Removed PIXI.EventListener and VideoTexture as it's no longer required. 2015-05-06 01:59:49 +01:00
photonstorm
535b56bc4a Got changeSource working properly on iOS and tidied up lots of docs. 2015-05-06 01:12:02 +01:00
photonstorm
927c14536d Destroy will remove the listener from Video.onChangeSource. 2015-05-06 00:42:01 +01:00
photonstorm
bf25e67f5a LoadTexture.resizeFrame lets you resize the Frame dimensions that the Game Object uses for rendering. You shouldn't normally need to ever call this, but in the case of special texture types such as Video or BitmapData it can be useful to adjust the dimensions directly in this way. 2015-05-06 00:41:40 +01:00
photonstorm
ed3e7cdf8c Frame.resize allows you to change the dimensions of a Frame object and recalculate all of its internal properties (such as bottom and distance). 2015-05-06 00:37:50 +01:00
photonstorm
9a563f20b9 Updated video locked status. 2015-05-05 17:03:39 +01:00
photonstorm
5278c16acc Swapped to using touchlock object. 2015-05-05 17:03:27 +01:00
photonstorm
4a91d97812 Input.addMoveCallback used to return the index of the callback entry in the internal moveCallbacks array. However as callbacks were removed the indexes became invalid, potentially causing a future Input.deleteMoveCallback to remove the wrong callback entirely or error. Input.deleteMoveCallback now takes the original callback and context as its parameters to ensure deletion safety. 2015-05-05 16:53:02 +01:00
photonstorm
0cde8f874d Mobile touch lock support done. 2015-05-05 16:25:51 +01:00
photonstorm
45278a1816 Tidied up the video loader. 2015-05-05 16:25:30 +01:00
photonstorm
766b110f99 SoundManager now uses the new Touch.addTouchLockCallback methods to handle mobile device audio unlocking. 2015-05-05 16:25:16 +01:00
photonstorm
f265f98eb4 Input.Touch.addTouchLockCallback allows you to add a callback that will be invoked automatically upon a touchstart event. This is used internally by the SoundManager and Video objects to handle mobile device unlocking, but is exposed publicly as well. 2015-05-05 16:24:49 +01:00
photonstorm
f032578f27 Removed Input.moveCallback and Input.moveCallbackContext as neither are used any longer. Use Input.addMoveCallback. 2015-05-05 16:09:22 +01:00
photonstorm
df6dc70a41 Various VideoTexture tests (this file will be removed shortly however). 2015-05-05 14:02:38 +01:00
photonstorm
cc1c90d782 Removed videoSprite placeholder. 2015-05-05 14:01:47 +01:00
photonstorm
2e2d1c6bc2 Lots of updates to the Phaser.Video object. 2015-05-05 14:00:59 +01:00
photonstorm
7178ff61c7 jsdoc fixes. 2015-05-05 14:00:29 +01:00
photonstorm
f33082caf2 Support for Video texture updates. 2015-05-05 14:00:18 +01:00
photonstorm
d8c109b0a2 Tidying comments. 2015-05-05 14:00:05 +01:00
photonstorm
d98b984ad2 SoundManager.volume now has its input value clamped to ensure it's between 0 and 1 (inclusive) 2015-05-05 11:04:14 +01:00
photonstorm
36c7084e01 Adjusting property order. 2015-05-05 10:59:54 +01:00
photonstorm
adad60f8f4 SoundManager.onVolumeChange is a new signal that is dispatched whenever the global volume changes. The new volume is passed as the only parameter to your callback.
SoundManager.onMute is a new signal that is dispatched when the SoundManager is globally muted, either directly via game code or as a result of the game pausing.

SoundManager.onUnMute is a new signal that is dispatched when the SoundManager is globally un-muted, either directly via game code or as a result of the game resuming from a pause.
2015-05-05 10:58:43 +01:00
photonstorm
1a7450e126 Added blend modes to Color class for testing. 2015-05-04 03:01:09 +01:00
photonstorm
90a7a3e15c Create video + added Video to config. 2015-05-04 03:00:45 +01:00
photonstorm
8a9e0c266a Added currentTime and duration getters. 2015-05-04 03:00:22 +01:00
photonstorm
afb162849a Docs update. 2015-05-04 03:00:03 +01:00