Richard Davey
a506fcc3ac
Added jsdocs
2018-02-01 01:09:34 +00:00
Richard Davey
d457373287
Added Depth component and tidied up redundant parts of Transform
2018-02-01 00:50:15 +00:00
Richard Davey
c254cb2991
Added jsdocs
2018-02-01 00:25:33 +00:00
Richard Davey
950a125d71
Added jsdocs
2018-02-01 00:04:45 +00:00
Felipe Alfonso
d9b04ef2e9
Light2D Plugin added to scene
2018-01-30 19:46:43 -03:00
Felipe Alfonso
de4b308fbd
Light2D update
2018-01-30 00:38:31 -03:00
Felipe Alfonso
71a6360a7b
Pipeline components added
2018-01-29 18:46:48 -03:00
Richard Davey
79de1b860a
Added jsdocs
2018-01-26 15:37:42 +00:00
Felipe Alfonso
2b043fff65
Removed RenderTarget and Shader from components
2018-01-22 18:53:15 -03:00
Richard Davey
d46662cd46
Swapped to using Number.MAX_VALUE
so repeat -1 now works properly in IE11 and below.
2018-01-18 14:59:32 +00:00
Richard Davey
89c04fc193
Merged Animation component.
2018-01-16 15:39:18 +00:00
Richard Davey
c625b8735b
Updated to using Event Emitter for all key managers and game objects. Events are now dispatched directly using arguments instead of Event objects, all managers updated to emit directly.
2018-01-12 17:09:21 +00:00
Richard Davey
718859b02e
Moved the depth sorting functions into the DisplayList class, as it's really the one responsible for it, not System.
2018-01-11 13:59:06 +00:00
Richard Davey
d8f1ba03e9
Moved repository location
2018-01-09 21:43:56 +00:00
Richard Davey
0d90f75b5f
Splitting the dev branch up into versions.
2016-11-22 01:36:56 +00:00
photonstorm
9ed542781b
Added the new Data Component.
2016-10-12 15:19:04 +01:00
photonstorm
ce3308ea1d
Hooking the Loader and Cache into the new Texture Manager.
2016-10-11 14:52:17 +01:00
Richard Davey
0af16817a5
Refactored GameObjects
to GameObject
.
2016-10-09 22:27:58 +01:00
Richard Davey
5b4280d694
Removed the matrix.
2016-10-07 03:34:42 +01:00
photonstorm
1da95994a5
First pass of the newly re-structured Canvas Renderer (still using old texture system though).
2016-10-03 12:44:54 +01:00
Richard Davey
0aa6650422
Re-arranged methods and added parent.
2016-09-29 03:10:16 +01:00
Richard Davey
5cb7cc8e92
Start of the new Children component.
2016-09-29 02:29:56 +01:00
Richard Davey
3f4decd59e
First pass at adding rotated atlas frame support in to the Canvas renderer.
2016-09-20 00:53:00 +01:00
photonstorm
a84021679b
Tidied up how crop destroys itself.
2016-08-25 16:41:26 +01:00
photonstorm
4382944a2e
A tinted Texture in Canvas mode wouldn't be updated properly if it was also cropped, beyond the initial crop. Now a cropped texture will re-tint itself every time the crop is updated, and has changed (thanks @phoenixyjll #2688 )
2016-08-18 15:55:13 +01:00
Richard Davey
4548d70369
Experimenting with new MainLoop + position interpolation. (reverted from commit e49d45e278
)
2016-07-13 02:44:35 +01:00
Richard Davey
e49d45e278
Experimenting with new MainLoop + position interpolation.
2016-07-12 03:05:29 +01:00
photonstorm
ee202667ed
Huge docs update for all of the Game Object events.
2016-07-08 11:28:30 +01:00
Richard Davey
0014201917
Groups now have the following properties, which are getters and setters: centerX
, centerY
, left
, right
, top
and bottom
. These calculate the bounds of the Group, based on all visible children, and then allow you to apply positioning based on that. This means you can, for example, now get the horizontal center of a Group by called Group.centerX
. These properties are also setters, so you can position the Groups, and it will take scale and rotation into consideration.
...
Groups have a new method `alignIn`. It allows you to align the Group within another Game Object, or a Rectangle. You can specify one of 9 positions which are the new position constants such as: `Phaser.TOP_LEFT` or `Phaser.CENTER` (see docs for the complete list). The Groups are positioned based on their child bounds, which takes rotation and scaling into consideration. You can easily place Groups into the corners of the screen, or game world, or align them within other Sprites, using this method.
Groups have a new method `alignTo`. It allows you to align a Group to the side of another Game Object, or a Rectangle. You can specify one of 11 positions which are the new position constants such as: `Phaser.TOP_LEFT` or `Phaser.LEFT_BOTTOM` (see docs for the complete list). The Groups are positioned based on their child bounds, which takes rotation and scaling into consideration. You can easily align Groups next to other Sprites using this method.
2016-07-08 01:33:42 +01:00
Richard Davey
8c5cea066a
Updated docs.
2016-06-23 00:45:24 +01:00
photonstorm
47f0224a40
Phaser 2.4.9 release.
2016-06-17 01:11:24 +01:00
photonstorm
9dd745167c
Docs fix.
2016-06-16 17:18:49 +01:00
photonstorm
4da3b15ae2
Renamed alignTo to alignIn, and added the new method alignTo, to allow for Sprite to Sprite alignment. Updated all of the Bounds and TS defs.
2016-06-16 17:01:51 +01:00
photonstorm
5bcf84f5a4
Added offsetX and offsetY arguments to Bounds.alignTo.
2016-06-16 15:51:12 +01:00
Richard Davey
ed8fbd9a6c
All Game Objects with the Bounds component; which includes Sprites, Images, Text, BitmapText, TileSprites and anything that extend these, now have a new method alignTo
. It allows you to align the Game Object to another Game Object, or a Rectangle. You can specify one of 9 positions which are the new constants: Phaser.TOP_LEFT
, Phaser.TOP_CENTER
and so on (see above for the complete list). The Game Objects are positioned based on their Bounds, which takes rotation, scaling and anchor into consideration. You can easily place Sprites into the corners or the screen or game world, or align them against other Sprites, using this method.
2016-06-16 02:00:46 +01:00
Richard Davey
0efcf68b21
The Game Object Bounds component has been updated to include two new properties: centerX
and centerY
. This means you can, for example, now get the horizontal center of a Sprite by called Sprite.centerX
. These properties are also setters, so you can position the Game Objects, and it will take scale and anchor into consideration.
2016-06-16 01:00:11 +01:00
Richard Davey
123e61c018
The Game Object Bounds component has been updated so that it now provides setters for all of the properties, as well as getters. Previously Sprite.left
, Sprite.right
, Sprite.top
and Sprite.bottom
were read-only, but they are now available to be set as well, and take into consideration the anchor and scale of the Game Objects.
2016-06-16 00:33:48 +01:00
Richard Davey
a180882d27
Fixed the data object not being created.
2016-06-06 00:31:46 +01:00
Richard Davey
097add1aa6
Game Objects including Sprite, Image, Particle, TilemapLayer, Text, BitmapText and TileSprite have a new property called data
. This is an empty Object that Phaser will never touch internally, but your own code, or Phaser Plugins, can store Game Object specific data within it. This allows you to associate data with a Game Object without having to pollute or change its class shape.
2016-06-03 01:08:32 +01:00
photonstorm
a6a2c61240
Sprites that had a tint on them, that then had their frame changed via either Sprite.frame
or Sprite.frameName
wouldn't re-tint the new frame, and would become stuck on the old frame in Canvas mode (thaks @spayton #2453 )
2016-05-17 21:04:40 +01:00
photonstorm
1adece490a
Docs update.
2016-05-04 02:02:13 +01:00
photonstorm
b9f62e77e6
You can now pass a TilemapLayer as a Texture to a TileSprite. A limitation of this is that if you pass it to a TileSprite it will make a fill pattern from the TilemapLayer at that instant it's passed, and it won't keep track of the layer in future should it update (thanks @jdnichollsc #1989 )
2016-04-07 03:45:21 +01:00
photonstorm
b3757ed862
jsdocs update #2384
2016-04-06 02:33:29 +01:00
photonstorm
4d69b13977
Passing a BitmapData to a TileSprite as a texture would fail if the BitmapData had not been previously added to the cache. It now uses the new frameData property (thanks @mzamateo @lucap86 #2380 )
2016-04-06 00:44:55 +01:00
photonstorm
f40cfbe2ae
2015 - 2016.
2016-04-04 22:16:16 +01:00
photonstorm
12f3bd6cc5
The Destroy component will now call TweenManager.removeFrom, removing any active tweens from the TweenManager upon the Game Objects destructions (thanks @PokemonAshLovesMyTurkeyAndILikeYouTwo #2408 )
...
Tween.update will now return `false` (flagging the Tween for destruction) should the Tween.target property every become falsey. This can happen if the object the Tween was tracking is destroyed, nulled or generally removed..
2016-04-04 22:06:16 +01:00
Jake Wilson
ae663f97aa
Added ability to kill a Game Object when it leaves camera bounds.
2016-03-28 20:34:00 -04:00
Richard Davey
10209dc8f5
GameObject.revive used to add the health amount given to the Game Object (via heal
) instead of setting it as the new health amount. It now calls setHealth
instead, giving it the exact amount (thanks @netgfx #2231 )
...
GameObject.revive will now set the health amount to 100 instead of 1, bringing it in-line with the `maxHealth` default value.
2016-02-03 21:44:06 +00:00
Richard Davey
034428e92c
Sprite (and all Game Objects) have a new argument in their destroy method: destroyTexture
. This boolean (which is false by default) controls if the BaseTexture of the Game Object should be destroyed or not. This is extremely useful in situations where you've got a lot of dynamic assets you no longer need, such as textures created from BitmapDatas. You must set the destroyTexture
argument yourself. This can be done in a custom Game Object destroy method or as part of your state shutdown ( #2261 )
2016-02-03 11:41:37 +00:00
Richard Davey
799efa3079
You can use the new const Phaser.PENDING_ATLAS
as the texture key for any sprite. Doing this then sets the key to be the frame
argument (the frame is set to zero). This allows you to create sprites using load.image
during development, and then change them to use a Texture Atlas later in development by simply searching your code for 'PENDING_ATLAS' and swapping it to be the key of the atlas data.
2015-10-31 01:04:14 +00:00