Richard Davey
469f6b6880
TransformMatrix.multiply
has a new optional argument out
which is a matrix to store the multiplication results in. If not given it will act as before, multiplying the current matrix.
2018-07-10 14:01:14 +01:00
Richard Davey
ecd99869bd
Explained mask positioning better in docs. Fix #3770
2018-07-08 23:38:13 +01:00
Richard Davey
4fb63fd405
Clairty over obscurity
2018-07-06 19:35:01 +01:00
Richard Davey
a64d747c98
clearMask(true)
would throw an exception if the Game Object didn't have a mask. Now it checks first before destroying the mask. Fix #3809
2018-07-06 16:34:11 +01:00
Richard Davey
1931716da3
Exposed isTinted bool
2018-07-06 16:22:42 +01:00
Richard Davey
45208202ae
Added canvas props
2018-07-06 15:55:05 +01:00
Richard Davey
901a75d053
setCrop will accept numbers or a Rectangle object
2018-07-06 12:57:42 +01:00
Richard Davey
f3a446797d
Added new TextureCrop component
2018-07-05 13:06:28 +01:00
Richard Davey
43fc988034
Moved crop UV handler to the Frame method. Cleaner and easier.
2018-07-04 15:18:08 +01:00
Richard Davey
ee8c1b403a
Fixed cropping with flipped images
2018-07-04 14:50:26 +01:00
Richard Davey
744e161d22
Added setCrop support
2018-07-03 16:48:01 +01:00
Richard Davey
f57ecc0d81
Moved method
2018-07-02 16:43:43 +01:00
Richard Davey
cf008e612c
Added e and f properties and multiplyWithOffset and copyFrom
2018-07-02 15:33:54 +01:00
Richard Davey
0ac0bc18d3
Set tint on setters
2018-07-02 13:32:27 +01:00
Richard Davey
52b24e2879
Added tintFill property and more detailed documentation
2018-06-30 11:33:06 +01:00
Richard Davey
7aa46657c2
Tidying up jsdocs and changing float to number
2018-06-26 23:19:14 +01:00
Chris Andrew
c2bfc52987
Documented the majority of the Geom Line functions.
2018-06-21 18:13:56 +01:00
Chris Andrew
a6b8b8ed31
Documented the Text game object and its TextStyle companion.
...
Minor update to JSON representation descriptions.
2018-06-14 14:27:58 +01:00
Chris Andrew
124b0ff773
Documented Light, LightsManager and LightsPlugin.
...
Documented class description for TransformMatrix.
Added a missing description from Container's EachContainerCallback.
2018-06-13 18:44:32 +01:00
Chris Andrew
566fdaca0e
Documented the TransformMatrix component.
2018-06-13 14:36:07 +01:00
Chris Andrew
eb84ad58df
Documented the MatrixStack component.
2018-06-13 13:48:33 +01:00
Chris Andrew
4aaf071ad3
Cleaned up some previous documentation, finished the RenderTexture GameObject documentation.
2018-06-06 14:23:39 +01:00
Chris Andrew
4750e92be4
Fixed a method signature issue with the Animation component's 'remove' event handler.
...
This prevented removed animations from stopping correctly, when they were removed from the AnimationManager.
2018-06-01 14:37:15 +01:00
Chris Andrew
007ac01f10
Documented the Animation, Pipeline and ToJSON Game Object components.
2018-06-01 14:08:35 +01:00
Chris Andrew
cb6077f231
Documented most of the Animation component class and some of the Animation class.
2018-06-01 13:11:25 +01:00
Thomas Tan
0fcfe73de1
Missed some cases
2018-05-22 16:08:44 +08:00
Thomas Tan
2c5cadc67c
Use this
return type annotation
2018-05-22 12:46:26 +08:00
Richard Davey
5b0cb0faf3
All Game Objects have a new method setRandomPosition
which will randomly position them anywhere within the defined area, or if no area is given, anywhere within the game size.
2018-05-15 15:58:53 +01:00
Richard Davey
63dbd9fd12
The Animation Component setProgress
method was setting the frame on the wrong object. Fix #3633
2018-04-30 12:37:50 +01:00
Richard Davey
6d958c5157
jsdoc udpate
2018-04-23 23:39:24 +01:00
Richard Davey
ced2d34b34
BitmapMask and GeometryMask both have new destroy
methods which clear their references, freeing them for gc.
2018-04-23 00:13:04 +01:00
Richard Davey
f34a507002
Merge pull request #3605 from zilbuz/master
...
Update GetBounds.getBounds() JSDoc
2018-04-22 23:06:25 +01:00
Richard Davey
606ba6d8d7
Added new Mask component and added to all relevant Game Objects
2018-04-20 18:57:49 +01:00
Basile Desloges
a7fc306329
Update GetBounds.getBounds() JSDoc so that @generic matches with @param and @return
2018-04-20 17:55:32 +02:00
Richard Davey
b392dee5a9
More jsdoc fixes
2018-04-16 15:11:51 +01:00
Richard Davey
855f38c649
typo
2018-04-14 17:38:20 +01:00
Antriel
b52707f79d
Fix Animation component pause()
2018-04-13 09:58:33 +02:00
Richard Davey
1802f8b30b
GetBounds getTopLeft
, getTopRight
, getBottomLeft
and getBottomRight
all have a new optional argument includeParent
which will factor in all ancestor transforms to the returned point.
2018-04-12 17:42:16 +01:00
Richard Davey
9269aa7a73
Swapped to using public properties
2018-04-12 16:28:05 +01:00
Richard Davey
f13bbca9c3
Fix getWorldBounds clash
2018-04-12 14:25:46 +01:00
Felipe Alfonso
23cd9868b4
Added getWorldTransformMatrix to Container and added support to parent container transform to GetBounds component.
2018-04-11 12:55:32 -03:00
Richard Davey
276ae03aff
TODO
2018-04-11 13:17:42 +01:00
Richard Davey
2c37ce106d
Added default TMs
2018-04-11 13:17:26 +01:00
Sean Bohan
b6480a0db7
Fix animationcomplete event name typo
2018-04-11 04:51:34 +08:00
Felipe Alfonso
14a651e509
Fixed inverted rotation on TransformMatrix
2018-04-10 14:13:23 -03:00
Felipe Alfonso
1eaee870c7
Set rotation of container to be negative at render time. Removed unnecessary call to multiply on TransformMatrix rotate
2018-04-10 13:25:13 -03:00
Richard Davey
bf81a7dd06
TransformMatrix.destroy is a new method that will clear out the array and object used by a Matrix internally.
2018-04-10 15:20:50 +01:00
Richard Davey
ca2a575726
Added jsdocs
2018-04-09 16:46:03 +01:00
Richard Davey
5c69bd054e
Added property getters
2018-04-09 16:42:33 +01:00
Richard Davey
70bedbdce0
Check if animation exists
2018-04-08 17:01:43 +01:00
Richard Davey
d1788d8a4c
Updated jsdocs
2018-04-07 15:58:08 +01:00
Richard Davey
777325c046
Removed callbacks, added events and added new stop methods
2018-04-07 12:36:35 +01:00
Richard Davey
e0dc28e4ba
Fixed lint errors and added jsdocs
2018-04-06 11:15:15 +01:00
Felipe Alfonso
0e401bb6fe
Fixed order on getWorldTransformMatrix
2018-04-05 14:11:48 -03:00
Richard Davey
da6db3f29e
Added transform methods
2018-04-05 16:50:37 +01:00
Richard Davey
c3ba80c4e5
Added jsdocs
2018-04-05 16:50:21 +01:00
Richard Davey
ba4693d140
jsdoc fix
2018-04-05 13:51:37 +01:00
Richard Davey
9f9c7dea61
Added setProgress
2018-04-04 17:19:02 +01:00
Richard Davey
fa2320238e
More jsdocs fixes and staggerPlay fix
2018-04-04 16:27:33 +01:00
Richard Davey
e734e7ef6b
Extensive Animation API changes to use milliseconds, improve docs and access to properties
2018-04-04 16:13:45 +01:00
Richard Davey
552cfe3c5e
Animation Component overhaul
2018-04-04 14:44:09 +01:00
Richard Davey
51d29b818d
Animation.updateFrame will now call setSizeToFrame
on the Game Object, which will adjust the Game Objects width
and height
properties to match the frame size. Fix #3473
2018-04-04 13:14:41 +01:00
Antriel
630732f9fc
jsdoc generics fix
2018-03-30 14:43:58 +02:00
Richard Davey
e7191e9d8e
jsdoc updates
2018-03-29 13:48:14 +01:00
Richard Davey
91008232ad
jsdoc fixes
2018-03-29 13:12:07 +01:00
Richard Davey
562344fed0
The ComputedSize Component now has setSize
and setDisplaySize
methods. This component is used for Game Objects that have a non-texture based size.
2018-03-29 12:55:28 +01:00
Richard Davey
aec64c635e
Removed floats
2018-03-29 12:54:12 +01:00
Richard Davey
747f09af86
jsdoc fixes
2018-03-28 15:04:09 +01:00
orblazer
ae0b3b841b
Fix types on GameObjects
2018-03-27 14:52:58 +02:00
Richard Davey
5816b863fa
Removed TransformNode so it doesn't break the 3.3 CI build
2018-03-22 13:19:52 +00:00
orblazer
5a518f2e5f
Fix "object" types on Camera and GameObjecs
2018-03-20 23:28:26 +01:00
Richard Davey
31bf979eb2
Merge pull request #3432 from orblazer/fix-types
...
Fix nullable and multiple types
2018-03-20 15:31:17 +00:00
Felipe Alfonso
701d43b3c3
TransformNode Implemented for nested transformations
2018-03-20 12:15:14 -03:00
orblazer
87633fdfad
Fix multiple types on GameObjects
2018-03-20 15:56:31 +01:00
orblazer
bf630f7d57
Fix types in JSDocs
2018-03-19 19:49:14 +01:00
orblazer
90def456f2
Update JSDoc on GameObjects
2018-03-19 12:54:31 +01:00
Richard Davey
cc0998660e
Updated jsdocs
2018-03-18 13:43:37 +00:00
Richard Davey
a8886a60d3
Actually round the value.
2018-03-17 17:03:30 +00:00
Richard Davey
05a4385cd7
jsdoc fixes
2018-03-16 17:29:39 +00:00
Richard Davey
19a17bcf63
Updating docs
2018-03-15 17:27:30 +00:00
Richard Davey
0368473b95
The SetFrame method now has two optional arguments: updateSize
and updateOrigin
(both true by default) which will update the size and origin of the Game Object respectively. Fix #3339
2018-03-12 14:45:18 +00:00
Richard Davey
8d85a9bc72
Added jsdocs
2018-03-05 14:19:53 +00:00
Richard Davey
ae1c91cf6a
eslint fixes
2018-03-05 01:40:11 +00:00
Richard Davey
7341d7a6cf
Merge branch 'master' of https://github.com/photonstorm/phaser
2018-03-02 17:49:01 +00:00
Richard Davey
4de9690f98
The setFrame
method of the Texture component has been updated so that it will now automatically reset the width
and height
of a Game Object to match that of the new Frame. Related, it will also adjust the display origin values, because they are size based. If the Frame has a custom pivot it will set the origin to match the custom pivot instead.
2018-03-02 16:23:43 +00:00
Felipe Alfonso
865f0a604e
Small fix on the MatrixStack rotation function
2018-03-02 11:29:04 -03:00
Richard Davey
252a76f416
The Headless render mode has been implemented. You can now set HEADLESS as the renderType
in the Game Config and it will run a special game step that skips rendering. It will still create a Canvas element, as lots of internal systems (like input) rely on it, but it will not draw anything to it. Fix #3256
2018-02-28 21:57:32 +00:00
Richard Davey
34e5a282d2
AnimationComponent.play now calls setSizeToFrame()
and updateDisplayOrigin()
on the parent Game Object in order to catch situations where you've started playing an animation on a Game Object that uses a different size to the previously set frame.
2018-02-27 01:09:09 +00:00
Felipe Alfonso
ef8e92dc01
RenderTexture base webgl implementation
2018-02-23 00:44:22 -03:00
Richard Davey
86f00eeb52
eslint fixes
2018-02-16 18:17:51 +00:00
Richard Davey
d1f5f8a82b
Added jsdocs
2018-02-12 16:01:21 +00:00
Richard Davey
5085ed5c9f
Added setOriginFromFrame.
2018-02-09 15:21:49 +00:00
Richard Davey
3422569a4a
setFrame will use a custom pivot, if set.
2018-02-09 15:21:39 +00:00
Richard Davey
40689d1e35
Updated jsdocs.
2018-02-07 15:27:21 +00:00
Richard Davey
a42d1a3f3e
Added jsdocs
2018-02-06 16:37:35 +00:00
Richard Davey
b0bb397369
Added jsdocs
2018-02-06 16:15:22 +00:00
Richard Davey
9e8ee078e8
Fixed mixin jsdoc defs
2018-02-01 01:36:52 +00:00
Richard Davey
6611685640
Added jsdocs
2018-02-01 01:20:11 +00:00
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
photonstorm
efc69ff463
Buttons (or any Sprites) that don't have a texture, but have children, would incorrectly render the children under WebGL due to the baseTexture.skipRender property (thanks @puzzud #2141 )
2015-10-16 16:44:51 +01:00
photonstorm
45d92d4217
ScaleMin and ScaleMax stopped working in Phaser 2.3.0 due to an incorrect transform callback scope (thanks @brianbunch #2132 )
2015-10-13 13:32:55 +01:00