Commit graph

2542 commits

Author SHA1 Message Date
photonstorm
ab78710daa BitmapData.textureLine takes a Phaser.Line object and an image in the image cache. It then accurately draws the image as a repeating texture for the full length of the line. 2014-10-03 02:21:09 +01:00
spayton
eeeb6c3733 This stops Phaser progressing with file loads when an audio file file
failed in IE.

The problem was that it was calling fileComplete everytime instead of
setting it as a callback.
2014-10-02 16:48:12 +01:00
photonstorm
173786c60d Color.createColor now populates the color property of the returned object with the results of Phaser.Color.getColor.
Color.createColor now has a `color32` property with the results of `Phaser.Color.getColor32`.
Color.hexToColor has been optimised to inline the regex and has moved the createColor call so it now populates the color object fully, not just setting the r,g,b properties.
2014-10-01 16:51:34 +01:00
photonstorm
2794d94b08 Color.createColor now populates the color objects color and color32 properties with the results of Phaser.Color.getColor and getColor32 respectively. 2014-10-01 15:19:57 +01:00
photonstorm
f04c16da81 Bail out on undefined data. 2014-10-01 05:21:30 +01:00
photonstorm
d65c526184 Cache.addBitmapData has a new parameter: frameData allowing you to pass a Phaser.FrameData object along with the BitmapData.
Cache.getFrameData has a new parameter: `map` which allows you to specify which cache to get the FrameData from, i.e. `Phaser.Cache.IMAGE` or `Phaser.Cache.BITMAPDATA`.
Sprite.loadTexture if given a BitmapData as the texture will now query the cache to see if it has any associated FrameData, and if so it will load that into the AnimationManager.
2014-10-01 03:10:13 +01:00
photonstorm
26f9e05dca BitmapData.shadow(color, blur, x, y) provides a quick way to set all the relevant shadow settings, which are then be used in future draw calls. 2014-09-30 22:50:08 +01:00
photonstorm
ef85b8415d If you pass a tinted Sprite to BitmapData.draw or BitmapData.copy it will now draw the tinted version of the Sprite to the BitmapData and not the original texture. 2014-09-30 21:07:57 +01:00
photonstorm
e8ca670fba Fixed the body debug calls for Box2D. 2014-09-30 01:44:44 +01:00
photonstorm
c195998a1e Color.webToColor restored. Converts a CSS rgba color into a native color value. 2014-09-30 01:44:33 +01:00
photonstorm
f45f19c712 Now merging and sorting extended methods and properties correctly. JSON export tidied up. 2014-09-30 00:32:17 +01:00
photonstorm
ecfed2b311 AnimationParser is now using value instead of nodeValue when parsing atlas XML files, avoiding Chrome deprecation warnings (thanks @valtterip #1189) 2014-09-29 22:52:09 +01:00
photonstorm
ccc4e42e03 A Timer with a delay value that was a float and not an integer would not loop correctly. Timer delay values are now passed through Math.round to avoid this (thanks @osmanzeki #1196) 2014-09-29 22:15:41 +01:00
photonstorm
e0a20cef25 Updated config for Box2D plugin 2014-09-29 21:19:18 +01:00
photonstorm
00b5472d4c jshint fixes. 2014-09-29 12:29:18 +01:00
photonstorm
2ee50d0c29 InputHandler now uses localToGlobal conversion for scaled responsive layers. 2014-09-29 12:27:28 +01:00
photonstorm
b0e96a37b9 Added Box2D handler support. 2014-09-29 12:27:28 +01:00
Richard Davey
c629a6821c docgen extends updates to handle non-invasive merging. 2014-09-29 12:14:02 +01:00
Richard Davey
acba9c4e14 Updated TypeScript defs. 2014-09-29 12:14:02 +01:00
Richard Davey
4c2476c423 Merge pull request #1209 from danxexe/fix-collide-docs
Fix docs for collide and collideHandler
2014-09-29 11:51:39 +01:00
DanX
3a1ec3c5c1 Fix docs for collide and collideHandler 2014-09-26 22:37:11 -03:00
photonstorm
319146292b First pass at scale handling on drag. Enable with: sprite.input.scaleLayer = true; 2014-09-25 17:01:27 +01:00
photonstorm
415c7fe578 Added the sourceRect and maskRect parameters back into BitmapData.alphaMask as they were accidentally removed in 2.1 (thanks seejay92) 2014-09-25 15:30:03 +01:00
Richard Davey
7f23438a75 Merge pull request #1208 from clark-stevenson/patch-1
Update phaser.d.ts
2014-09-25 10:51:56 +01:00
Clark Stevenson
01bcec97d2 Update phaser.d.ts
Small fixes and a few additions
2014-09-25 09:38:38 +01:00
photonstorm
7f196a01e7 Text.addColor allows you to set specific colors within the Text. It works by taking a color value, which is a typical HTML string such as #ff0000 or rgb(255,0,0) and a position. The position value is the index of the character in the Text string to start applying this color to. Once set the color remains in use until either another color or the end of the string is encountered. For example if the Text was Photon Storm and you did Text.addColor('#ffff00', 6) it would color in the word Storm in yellow.
Text.clearColors resets any previously set colors from `Text.addColor`.
2014-09-24 17:10:02 +01:00
photonstorm
d7f8e11d21 Removed the customBounds layer. 2014-09-24 06:52:22 +01:00
photonstorm
c8e62368a4 docgen updates. 2014-09-24 06:52:02 +01:00
photonstorm
f3fd3ebe0e Added AudioSprite to the build files. 2014-09-24 06:51:53 +01:00
photonstorm
9e29a58d89 Sound.fadeOut(duration) will fade the Sound to a volume of zero over the duration given. At the end of the fade the Sound will be stopped and Sound.onFadeComplete dispatched.
Sound.fadeIn(duration, loop) will start the Sound playing, or restart it if already playing, set its volume to zero and then increase the volume over the duration given until it reaches 1. At the end of the fade the Sound.onFadeComplete event is dispatched.
2014-09-24 06:51:39 +01:00
photonstorm
dd74e3b0b4 Changing any of the Text properties such as font, lineSpacing and fontSize on a Text object that wasn't already on the display list would cause an updateTransform error. Parent is now checked first in all setters. 2014-09-24 01:10:36 +01:00
photonstorm
a79cafe134 docgen is now adding inherited classes into the results properly. 2014-09-23 22:57:55 +01:00
Richard Davey
473e9a1d88 jshint fix 2014-09-23 22:28:15 +01:00
Richard Davey
abe6f5ace2 Point.parse updated to allow either/or x/y setting and default values.
Point.parse will return a new Point object based on the x and y properties of the object given to Point.parse (thanks @codevinsky #1198)
2014-09-23 22:23:01 +01:00
Richard Davey
d7d69947fb Merge pull request #1198 from codevinsky/feature/point-parse
Phaser.Point.parse
2014-09-23 22:15:51 +01:00
Richard Davey
01fd3df434 AudioSprite support is now built into the Loader and SoundManager. AudioSprites are like sprite sheets, only they consist of a selection of audio files and markers in a json configuration. You can find more details at https://github.com/tonistiigi/audiosprite (thanks @codevinsky #1205)
Fixed AudioSprite jsdoc, casing and formatting issues.
2014-09-23 22:15:09 +01:00
Richard Davey
be07fb33ec Merge pull request #1205 from codevinsky/feature/audiosprite
Phaser.AudioSprite
2014-09-23 21:45:30 +01:00
Jeremy Dowell
7cce1366f2 jshint cleanup 2014-09-23 10:25:49 -05:00
Jeremy Dowell
dd0d1729ad Phaser.AudioSprite
AudioSprite implementation for phaser.

Loads audio sprites based on the file format created with: https://github.com/tonistiigi/audiosprite
2014-09-23 10:21:29 -05:00
Richard Davey
ba7f33d386 docgen updates 2014-09-22 11:32:33 +01:00
Richard Davey
c6231ddd38 jsdoc fix 2014-09-22 11:32:26 +01:00
Richard Davey
bc0f174f29 More rigid corruption checks for the pixi docs. 2014-09-21 11:04:43 +01:00
Richard Davey
eb72e4c581 Fixing jsdoc headers. 2014-09-21 10:28:04 +01:00
Richard Davey
7528783a43 Fixed missing Pixi from class names and extends. 2014-09-21 10:24:21 +01:00
Richard Davey
0114f66af5 Split the methods and properties into public, protected and private sub-arrays. 2014-09-21 10:12:18 +01:00
Richard Davey
0c4d4cd7e1 readme update. 2014-09-19 15:22:33 +01:00
Richard Davey
49ddf46ef3 Merge pull request #1199 from codevinsky/feature/rectangle-aabb
Rectangle.aabb
2014-09-19 13:50:14 +01:00
photonstorm
5980a3bdc6 Loader can now natively load XML files via load.xml. Once the XML file has loaded it is parsed via either DOMParser or ActiveXObject and then added to the Cache, where it can be retrieved via cache.getXML(key).
Cache now has support for XML files stored in their own container. You can add them with `cache.addXML` (typically this is done from the Loader automatically for you) and get them with `cache.getXML(key)`. There is also `cache.checkXMLKey(key)`, `cache.checkKeys` and `cache.removeXML(key)`.
2014-09-19 13:45:04 +01:00
Jeremy Dowell
ab9da10999 added: Rectangle.aabb
* Calculates the Axis Aligned Bounding Box (or aabb) from an array of points.
*
* @method Phaser.Rectangle#aabb
* @param {Phaser.Point[]} points - The array of one or more points.
* @param {Phaser.Rectangle} [out] - Optional Rectangle to store the value in, if not supplied a new Rectangle object will be created.
* @return {Phaser.Rectangle} The new Rectangle object.
* @static
2014-09-18 15:16:33 -05:00
photonstorm
5a58d6be38 Refining the processor. 2014-09-18 20:33:01 +01:00