Commit graph

631 commits

Author SHA1 Message Date
photonstorm
2b0abb67dd onDragUpdate is a new signal that is dispatched whenever a Game object enabled for input and drag is moved by a pointer (i.e. during a drag event). See the Phaser.InputHandler.enableDrag docs for parameter details and the new Phaser Example. 2015-06-04 20:58:00 +01:00
photonstorm
a971928bbc jshint fixes. 2015-06-03 13:22:29 +01:00
photonstorm
560fed484f Added BitmapText.purgeGlyphs method. 2015-06-03 05:28:24 +01:00
photonstorm
03a7b6a708 Updated Destroy component to deal with BitmapText glyphs pool. 2015-06-03 05:28:24 +01:00
photonstorm
5e265bbe86 Re-ordered carriage-return detection. 2015-06-03 05:28:24 +01:00
photonstorm
90d08fbf24 Updated jsdocs and added align parameter to method call. 2015-06-03 05:28:24 +01:00
photonstorm
fa7259fd75 Removed debug calls. 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
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
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
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
ad4cf34d05 LoadTexture remembers texture valid state. 2015-05-14 16:52:09 +01:00
Stephan de Souza
cb89b9c293 Missed comma 2015-05-14 10:04:37 -03:00
Stephan de Souza
7fb555e70e Adds Heal Method to Phaser.Components.Health
Ideal when used in games with health packs, bonus items, or healing sprites.

In fact: Doing a negative damage causes the same effect, but as a new method is better for documentation.
2015-05-13 16:55:17 -03: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
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
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
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
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
9a563f20b9 Updated video locked status. 2015-05-05 17:03:39 +01:00
photonstorm
0cde8f874d Mobile touch lock support done. 2015-05-05 16:25:51 +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
f33082caf2 Support for Video texture updates. 2015-05-05 14:00:18 +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
c1ab5a3345 The first pass at the new Phaser.Video object. 2015-05-03 13:53:03 +01:00
photonstorm
f092101531 Added in support for Phaser.Video to LoadTexture component. 2015-05-03 13:53:03 +01:00
photonstorm
3578cd097c jsdocs fix. 2015-05-03 13:53:02 +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
cc46212d5b Refreshes a tiling texture on change of frame. 2015-04-21 15:55:58 +01:00
photonstorm
12f8454d62 close #1755 2015-04-19 01:35:15 +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
b0e1b8facb jsdoc fixes. 2015-04-15 01:36:25 +01:00
photonstorm
8f06991527 Added support for the [Creature Automated Animation Tool](http://www.kestrelmoon.com/creature/). You can now create a Phaser.Creature object which uses json data and a texture atlas for the animations. Creature is a powerful animation tool, similar to Spriter or Spine. It is currently limited to WebGL games only, but the new libs should prove a solid starting point for anyone wanting to incorporate Creature animations into their games. 2015-04-13 23:16:29 +01:00
photonstorm
0aaa77a84d Strict check. 2015-04-13 11:58:45 +01:00
photonstorm
0ccb3515d5 Removed dirty flag. 2015-04-13 11:58:44 +01:00
photonstorm
36c064511c Added guards around context.getImageData calls in BitmapData, Text and Canvas Tinting classes to avoid crashing restricted browsers like Epic Browser. Please understand that several Phaser features won't work correctly with this browser (thanks @Erik3000 #1714) 2015-04-02 14:47:44 +01:00
photonstorm
645723f939 Sprite was missing the Health and InCamera components. 2015-03-30 13:51:47 +01:00
photonstorm
5fb1130175 The LoadTexture component has had a redundant dirty call removed from it.
TileSprites were missing a `physicsType` property, causing them to not collide with anything (thanks @numbofathma #1702)
2015-03-28 00:56:02 +00:00
photonstorm
57474c0d44 Trying out removal of dirty flag. 2015-03-27 10:47:45 +00:00
photonstorm
83adc51698 Fixed the FixedToCamera :) 2015-03-24 21:35:09 +00:00
photonstorm
12fc424305 Huge amount of jsdoc updates. 2015-03-23 23:46:09 +00:00
photonstorm
08c9513f98 Improving the Component documentation. 2015-03-23 19:56:23 +00:00
photonstorm
85c8f60d7c Removed 'global' component arrays. 2015-03-23 19:19:07 +00:00
photonstorm
b7b622a556 Text style has a new optional property: backgroundColor which is a Canvas fill style that is set behind all Text in the Text object. It allows you to set a background color without having to use an additional Graphics object.
Text.lineSpacing can now accept negative values without cutting the bottom of the Text object off. The value can never be less than the height of a single line of text.

Text.lineSpacing is no longer applied to the first line of Text, which prevents text from being cut off further down the Text object.
2015-03-23 16:12:23 +00:00
photonstorm
1486e166bd Added physicsType property. 2015-03-23 15:04:27 +00:00
photonstorm
55048a4b25 BitmapText objects now have an anchor property. This works in a similar way to Sprite.anchor except that it offsets the position of each letter of the BitmapText by the given amount, based on the overall BitmapText width - whereas Sprite.anchor offsets the position the texture is drawn at. 2015-03-23 15:03:53 +00:00
photonstorm
cb9ef4f12e Text.padding specifies a padding value which is added to the line width and height when calculating the Text size. ALlows you to add extra spacing if Phaser is unable to accurately determine the true font dimensions (#1561 #1518) 2015-03-19 01:54:14 +00:00
breakosaur
bb600b4319 Fixed a few documentation typos. 2015-03-18 21:07:36 +00:00
photonstorm
165e5935c2 JSDoc fixes. 2015-03-18 19:14:58 +00:00
photonstorm
6cf982a4a0 Fixed to Destroy component if still in render loop. 2015-03-11 01:44:46 +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
ed3afed2ff Fixed spelling mistake. 2015-03-05 14:00:57 +00:00
Richard Davey
7eb73e99a8 Merge pull request #1648 from pnstickne/wip-components-docs
Component documentation
2015-03-01 10:46:55 +00:00
Paul
4de95c09b5 Component documentation
- Required changes for documentation to show up correctly
  - Uses multiple @extends, which currently [mostly] works in jsdoc
    and like closure compiler
2015-02-28 23:00:17 -08:00
Paul
ee34327c93 Components: bug fixes
- Use property check ('in') to avoid property access

- Promoted 'body' property for physics
2015-02-28 17:49:45 -08:00
Paul
0e5272b217 Merge remote-tracking branch 'upstream/dev' into wip-components-toproto
Conflicts:
	src/gameobjects/Image.js
	src/gameobjects/Rope.js
	src/gameobjects/Sprite.js
	src/gameobjects/Text.js
	src/gameobjects/TileSprite.js
	src/gameobjects/components/Core.js
2015-02-28 15:51:47 -08:00
photonstorm
a69e53f901 Copyright date change. 2015-02-25 03:36:23 +00:00
photonstorm
ae7a1fda05 Optimised preUpdate callbacks. 2015-02-25 02:49:50 +00:00
photonstorm
72530d963b Default exists should be true! 2015-02-25 02:49:19 +00:00
photonstorm
c799dfe7da Fixed physics postUpdate issue causing particles and all kinds of things to go awry. 2015-02-25 02:18:05 +00:00
photonstorm
ec19abb91c Component preUpdate changes. 2015-02-25 00:59:27 +00:00
photonstorm
c9939f8691 Tilemap fix #1635 2015-02-24 22:57:59 +00:00
Paul
4f747a1c00 Components - moving install to prototype
- This ensures the components are regsitered once per type
  instead of once per instance (which is duplicate work)
2015-02-22 20:44:11 -08:00
photonstorm
8b7085e20a RenderTexture guards. 2015-02-22 19:30:43 +00:00
photonstorm
3d0bc682f0 Moved Events. 2015-02-19 05:00:55 +00:00
photonstorm
88f10f7f89 Updated fixedToCamera docs to reflect non-nesting (#1596) 2015-02-18 22:58:48 +00:00
photonstorm
58d37b51fe Fixed canvas destroy if undefined. 2015-02-18 14:54:11 +00:00
photonstorm
f59d7e3430 Working through Graphics class updates. 2015-02-17 16:40:41 +00:00
photonstorm
77a3bfea23 loadTexture guard. 2015-02-17 15:48:54 +00:00
photonstorm
5b0c751647 Animation component guard. 2015-02-17 15:48:43 +00:00
photonstorm
167bbde8d4 Game Objects all now using the new Components mixins. 2015-02-17 06:00:41 +00:00
photonstorm
166c0363fc jshint fixes 2015-02-17 05:59:54 +00:00
photonstorm
bf4c1d0620 Split out all the common GameObject features into components. 2015-02-17 05:15:04 +00:00
photonstorm
8483eac6aa Removing all use of _cache from all Game Objects. 2015-02-16 17:22:51 +00:00
photonstorm
8c23bca62d Sprite.left, Sprite.right, Sprite.top, Sprite.bottom are new properties that contain the totals of the Sprite position and dimensions, adjusted for the anchor.
Sprite.offsetX and Sprite.offsetY contain the offsets from the Sprite.x/y coordinates to the top-left of the Sprite, taking anchor into consideration.
2015-02-16 15:47:55 +00:00
photonstorm
c243222889 Docs update #1231 2015-02-11 16:41:56 +00:00