Commit graph

414 commits

Author SHA1 Message Date
photonstorm
08c6106c35 Fixed issue with textureLine creating white blocks in iOS. 2014-10-09 02:30:31 +01:00
Richard Davey
e6812cffa6 Added BMD frame checks. 2014-10-05 12:35:40 +01:00
photonstorm
ff034b5077 Fixed textureLine and added repeat parameter. 2014-10-03 03:57:49 +01:00
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
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
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
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
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
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
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
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
photonstorm
d18f523d93 jsdoc fixes. 2014-09-18 16:58:25 +01:00
photonstorm
20551f9129 Lots of jsdocs fixes ready for the new doc generator. 2014-09-16 17:35:08 +01:00
photonstorm
60acef2f97 If Game Objects change their frame, such as with an animated Sprite, and the change goes from a previously trimmed frame to a non-trimmed (full size) one, then the previous trim values were still left active, causing it to glitch (thanks stupot) 2014-09-11 20:56:01 +01:00
photonstorm
052e5042ed jsdoc fix. 2014-09-08 22:34:53 +01:00
photonstorm
9fa3f8f2b1 alphaMask update. 2014-09-04 16:53:19 +01:00
photonstorm
3a69ed944d Fixed TypeScript defs for BitmapData. 2014-09-04 16:52:10 +01:00
photonstorm
9aaa8d80ca jsdocs, fixes to load, draw, copy and addToWorld. 2014-09-04 05:05:30 +01:00
photonstorm
7d9a4f4100 Phaser.Text wouldn't render the text to its local canvas if you passed the text on the constructor and didn't add it to the display list. If a string is given it now updates the local canvas on creation. 2014-09-04 02:18:12 +01:00
Richard Davey
fe0c03d5d7 Phaser.Text.destroy will now destroy the base texture by default (#1162) 2014-09-03 22:34:10 +01:00
Richard Davey
68368357ba jshint fix 2014-09-03 22:26:05 +01:00
photonstorm
804eea9ca3 Optimised BitmapData.copy and refactoring continues. 2014-09-03 20:56:31 +01:00
photonstorm
15e6edc56b BitmapData.copy no longer creates any temporary variables. It also accurately copies over Sprite/Image values before drawing them.
Creation now defaults to a texture size of 256x256.
2014-09-03 12:53:07 +01:00
photonstorm
f5ad22399f BitmapData.copy is now the new uber copy function. Helper methods coming. 2014-09-03 11:12:06 +01:00
photonstorm
3b28d568e9 Ironed out the issues in BitmapData.fastCopy. 2014-09-03 01:28:58 +01:00
Richard Davey
773be312ce BitmapData.fastCopy test. 2014-09-02 23:16:10 +01:00
photonstorm
de07f5b649 Testing out Frame and Animation clone features. 2014-09-02 21:03:16 +01:00
photonstorm
d26f937f1c RetroFont has a new property called frameData which contains the Frame objects for each of the letters in the font, which can be used by Sprites. 2014-09-02 00:41:53 +01:00
photonstorm
8f7141ca3f New blit op 2014-09-01 20:22:47 +01:00
photonstorm
9047e4d5ca Sorted out the issue with Images not working properly with texture atlases. 2014-08-29 15:55:23 +01:00
photonstorm
b4ba7958c6 Added missing copy parameter to Image.crop, fixing jshint in the process. 2014-08-28 23:26:27 +01:00
photonstorm
e3f73b87ba Fixed some jsdocs issues and added the Image.alive property. 2014-08-28 17:04:59 +01:00
photonstorm
05922d6fb0 Lots of fixes to the Image class to restore texture loading and fix cropping so it works exactly the same as the Sprite now. 2014-08-28 17:04:59 +01:00
photonstorm
ec687868de Input.setMoveCallback has been removed due to deprecation.
BitmapData.refreshBuffer has been removed and replaced with BitmapData.update.
BitmapData.drawSprite has been removed due to deprecation. Use BitmapData.draw instead.
Pointer.moveCallback has been removed due to deprecation.
SinglePad.addButton has been removed due to deprecation.
P2.Body.loadData has been removed due to deprecation.
P2.World.defaultFriction and defaultRestitution have been removed due to deprecation.
Canvas.create noCocoon parameter has been removed due to deprecation.
Color.getColorInfo, RGBtoHexstring, RGBtoWebstring and colorToHexstring has been removed due to deprecation.
2014-08-28 03:40:59 +01:00
photonstorm
fa45d7feff Events.onDestroy is a new signal that is dispatched whenever the parent is being destroyed. It's dispatched at the start of the destroy process, allowing you to perform any additional house cleaning needed (thanks @jonkelling #1084)
Group.onDestroy is a new signal that is dispatched whenever the Group is being destroyed. It's dispatched at the start of the destroy process, allowing you to perform any additional house cleaning needed (thanks @jonkelling #1084)
2014-08-28 02:56:06 +01:00
photonstorm
6b4510f693 TileSprite now has the alive property, which should help with some Group operations (thanks @jonkelling #1085) 2014-08-28 02:36:30 +01:00
Richard Davey
9941942941 Merge pull request #1030 from codevinsky/rope
Phaser.Rope
2014-08-28 01:56:02 +01:00
Richard Davey
7fe4abc5c4 Merge pull request #1059 from lucbloom/spritesheet-to-framecount
Sprite Sheet => frame count
2014-08-28 01:49:15 +01:00
photonstorm
33c52eaf09 BitmapData alpha option added.
Pointer return type added.
pixi manifest updated to remove need for geom classes.
2014-08-27 21:26:29 +01:00
Alvin
6da5831f73 Merge pull request #1099 from kay-is/master
Method documentation was missing parameters.
2014-08-08 09:56:39 +02:00
Kay Plößer
9ac06c44ba Method documentation was missing parameters. 2014-08-07 14:47:54 +02:00
photonstorm
9bbc8ecce3 Phaser.Physics.P2.addPolygon now takes a nested array again (thanks @wayfu #1060) 2014-07-31 13:39:26 +01:00
Luc Bloom
7f3b542fdd Removed the notion of Sprite Sheets vs single frame images
Instead of making a distinction between single frame images and Sprite
Sheets, I added a simple FrameData with one Frame to every image that
gets loaded. This way, a lot of the engine code can be simplified.

For instance, you can play animations on any Sprite without having to
check the “frame count” of its image anymore.

The engine doesn’t have to check for non-existing .frameData anymore.

An animation can keep on playing when an image happens to be set with 1
frame, continuing its animation when after that, another image is set
with multiple frames.

Think of it this way: an image with one frame is an animation of just
one frame.
2014-07-22 10:24:53 +02:00
jackrugile
05d856d4ea remove escaping backslashes from retro font text set documentation 2014-07-20 15:15:02 -06:00
photonstorm
883c11e377 BitmapData.resize fixed to update the crop property too, resolves issues with images getting cut off with BitmapData.load. 2014-07-18 03:33:17 +01:00
photonstorm
f6935c01f8 Sprite.loadTexture will store the smoothed property of the Sprite and re-apply it once the new texture is loaded. 2014-07-16 00:56:26 +01:00
photonstorm
aaf82f9d3a Sprite.loadTexture has a new optional stopAnimation boolean parameter which will halt the currently running animation (if any) after changing the texture (based on #1029). 2014-07-16 00:29:43 +01:00