Richard Davey
4c353571ca
Removed protected status
2020-09-01 17:44:07 +01:00
Richard Davey
84a867c2ac
ArcadePhysics.disableUpdate
is a new method that will prevent the Arcade Physics World update
method from being called when the Scene updates. By disabling it, you're free to call the update method yourself, passing in your own delta and time values.
...
`ArcadePhysics.enableUpdate` is a new method that will make the Arcade Physics World update in time with the Scene update. This is the default, so only call this if you have specifically disabled it previously.
2020-09-01 17:42:38 +01:00
Richard Davey
d3778bb4bb
ArcadeWorldConfig.customUpdate
is a new boolean property you can set in the Arcade Physics config object, either in the Scene or in the Game Config. If true
the World update will never be called, allowing you to call it yourself from your own component. Close #5190
2020-09-01 17:42:19 +01:00
Richard Davey
18cdb5e618
The Animation.play
and playReverse
methods have a new optional parameter timeScale
. This allows you to set the Animations time scale as you're actually playing it, rather than having to chain two calls together. Close #3963
2020-09-01 17:00:16 +01:00
Richard Davey
6aef37572d
WebGLRenderer.previousPipeline
is a new property that is set during a call to clearPipeline
and used during calls to rebindPipeline
, allowing the renderer to rebind any previous pipeline, not just the Multi Pipeline.
...
The `WebGLRenderer.rebindPipeline` method has been changed slightly. Previously, you had to specify the `pipelineInstance`, but this is now optional. If you don't, it will use the new `previousPipeline` property instead. If not set, or none given, it will now return without throwing gl errors as well.
2020-09-01 13:05:31 +01:00
Richard Davey
9451ac0285
Group.getMatching
is a new method that will return any members of the Group that match the given criteria, such as getMatching('visible', true)
2020-08-29 11:00:55 +01:00
Richard Davey
ab83fd7e38
Tween.seek
will no longer issue a console warning for 'Tween.seek duration too long'
, it's now up to you to check on the performance of tween seeking.
2020-08-26 13:50:54 +01:00
Richard Davey
80c571963c
Textures.Parsers.JSONHash
will now perform a hasOwnProperty
check when iterating the frames, skipping anything that isn't a direct property. This should allow you to use generated atlas data that comes from JSON.parse
. Fix #4768
2020-08-26 13:06:04 +01:00
Richard Davey
55e56b1eff
Clock.addEvent
can now take an existing TimerEvent
object, as well as a config object. If a TimerEvent
is given it will be removed from the Clock, reset and then added. This allows you to pool TimerEvents rather than constantly create and delete them. Fix #4115
...
`Clock.removeEvent` is a new method that allows you to remove a `TimerEvent`, or an array of them, from all internal lists of the current Clock.
2020-08-26 10:58:06 +01:00
Richard Davey
809b8a41d9
The WebGLRenderer.updateCanvasTexture
method will now set gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL
to true, which should stop issues where you update a Text Game Object, having added a Render Texture or Spine Game Object to the Scene after it, which switches the PMA setting. Fix #5064
2020-08-26 00:19:19 +01:00
Richard Davey
791704febe
WebGLRenderer.finalType
is a new boolean property that signifies if the current Game Object being rendered is the final one in the list.
2020-08-25 18:24:42 +01:00
Richard Davey
0bbe67dafd
When using the GameObjectCreator
for Containers
you can now specify the children
property in the configuration object.
2020-08-25 15:51:11 +01:00
Richard Davey
de0133e3cc
Spine Game Objects can now be rendered to Render Textures. Fix #5184
2020-08-25 14:11:37 +01:00
Richard Davey
ca99c4564f
Added reset
property to Bind to get new vertex attrib locations
2020-08-25 13:24:56 +01:00
Richard Davey
e4ec0bd182
Bumped version (and added source-map)
2020-08-25 13:24:20 +01:00
Richard Davey
7d1ad38b4a
Updated shader names
2020-08-25 13:23:59 +01:00
Richard Davey
7e572c3577
Improves JSDocs
2020-08-25 09:54:09 +01:00
Richard Davey
1f50b49eff
Earcut has now been exposed and is available via Geom.Polygon.Earcut
and is fully documented.
2020-08-25 09:54:03 +01:00
Richard Davey
795a190ce3
The BaseShader
default vertex shader now includes the outTexCoord
vec2 varying, mapped to be the same as that found in the pipeline shaders. Fix #5120
2020-08-24 19:51:20 +01:00
Richard Davey
cda4f05fb9
Merge pull request #5272 from jaabberwocky/fix-animationmanager-docs
...
Fix typo for documentation on create method of AnimationManager
2020-08-24 19:33:33 +01:00
Richard Davey
157be83f7c
The Container
will now test to see if any Game Object added to it is already on the display list, or not, and emit its ADDED and REMOVED events accordingly. Fix #5267 #3876
2020-08-24 19:26:19 +01:00
Richard Davey
3bd91ea3de
Update ParticleManagerCreator.js
2020-08-24 19:24:11 +01:00
Richard Davey
a9072cadf2
Sprite
, Rope
, ParticleEmitterManager
, Extern
and DOMElement
now all override the addedToScene
and removedFromScene
callbacks to handle further set-up tasks.
2020-08-24 19:24:02 +01:00
Richard Davey
f4259deb37
DOMElementFactory
, ExternFactory
, ParticleManagerFactor
, RopeFactory
and SpriteFactory
all no longer add the objects to the Update List, this is now handled by the ADDED events instead.
2020-08-24 19:22:58 +01:00
Richard Davey
7b83d31cae
The Update List
now uses the new checkQueue
property to ensure no duplicate objects are on the active list.
2020-08-24 19:21:35 +01:00
Richard Davey
7f5e4d4538
ProcessQueue.checkQueue
is a new boolean property that will make sure only unique objects are added to the Process Queue.
2020-08-24 19:21:01 +01:00
Richard Davey
19c4980c5b
GameObjectFactory.events
is a new property that references the Scene's Event Emitter. This is now used internally.
2020-08-24 19:20:20 +01:00
Richard Davey
0b9dd4aae7
GameObjectCreator.events
is a new property that references the Scene's Event Emitter. This is now used internally.
2020-08-24 19:19:19 +01:00
Richard Davey
671c92e450
Added addedToScene
and removedFromScene
methods
...
* `GameObject.addedToScene` is a new method that custom Game Objects can use to perform additional set-up when a Game Object is added to a Scene. For example, Sprite uses this to add itself to the Update List.
* `GameObject.removedFromScene` is a new method that custom Game Objects can use to perform additional tear-down when a Game Object is removed from a Scene. For example, Sprite uses this to remove themselves from the Update List.
* Game Objects no longer automatically remove themselves from the Update List during `preDestroy`. This should be handled directly in the `removedFromScene` method now.
2020-08-24 19:18:29 +01:00
Richard Davey
bc93416ec7
Added events property and new add and remove callbacks
...
* `DisplayList.events` is a new property that references the Scene's Event Emitter. This is now used internally.
* `DisplayList.addChildCallback` is a new method that overrides the List callback and fires the new ADDED events.
* `DisplayList.removeChildCallback` is a new method that overrides the List callback and fires the new REMOVED events.
2020-08-24 19:15:53 +01:00
Richard Davey
ae4ed0ac54
Expose the new events
2020-08-24 19:13:18 +01:00
Richard Davey
48f94be449
Scenes.Events.REMOVED_FROM_SCENE
is a new event, emitted by a Scene, when it a Game Object is removed from the display list in the Scene, or a Container that is on the display list.
2020-08-24 19:13:06 +01:00
Richard Davey
1423ade7b3
Scenes.Events.ADDED_TO_SCENE
is a new event, emitted by a Scene, when a new Game Object is added to the display list in the Scene, or a Container that is on the display list.
2020-08-24 19:12:54 +01:00
Richard Davey
98cd70cd6c
GameObjects.Events.REMOVED_FROM_SCENE
is a new event, emitted by a Game Object, when it is removed from a Scene, or a Container that is part of the Scene.
2020-08-24 19:11:22 +01:00
Richard Davey
ef91518da5
GameObjects.Events.ADDED_TO_SCENE
is a new event, emitted by a Game Object, when it is added to a Scene, or a Container that is part of the Scene.
2020-08-24 19:10:50 +01:00
tobias
9f1cd22882
Fix typo for documentation on create method of AnimationManager on line 190
2020-08-25 00:43:22 +08:00
Richard Davey
e93d36f38e
The Pointer.getDuration
method now uses the new Pointer downTime
and upTime
values, meaning it will accurately report the duration of when any button is being held down, not just the primary one. Fix #5112
...
* `Pointer.downTime` now stores the event timestamp of when the first button on the input device was pressed down, not just when button 1 was pressed down.
* `Pointer.upTime` now stores the event timestamp of when the final depressed button on the input device was released, not just when button 1 was released.
2020-08-24 17:32:21 +01:00
Richard Davey
2af65b2a1d
Improved JSDocs and types. Fix #5217
2020-08-24 15:04:00 +01:00
Richard Davey
1766f66984
Update JSDocs
2020-08-24 14:58:24 +01:00
Richard Davey
f586cd472a
global.Phaser = Phaser
has been removed, as it's no longer required by the UMD loader, which should make importing in Angular 10 easier. Fix #5212
2020-08-24 14:47:53 +01:00
halilcakar
7593a80880
Merge branch 'master' of https://github.com/photonstorm/phaser
2020-08-22 13:25:32 +03:00
Richard Davey
3484ded2b7
You can now use this.renderer
from within a Scene, as it's now a Scene-level property and part of the Injection Map.
2020-08-22 10:33:46 +01:00
Richard Davey
0cd4d0fc54
Update WebGLRenderer.js
2020-08-21 16:23:04 +01:00
Richard Davey
9a1dc640f8
Fix gl access
2020-08-21 16:17:29 +01:00
Richard Davey
0dd07333af
Updated to use MultiPipeline
2020-08-21 16:14:59 +01:00
Richard Davey
5c39254f36
Testing new config approach
2020-08-21 16:04:26 +01:00
Richard Davey
209b39b38c
New pipeline names and single texture flag
2020-08-21 16:03:29 +01:00
Richard Davey
468c03dfe5
Much better docs and handling of config values
2020-08-21 16:03:07 +01:00
Richard Davey
4b4af50ca9
Quicker return
2020-08-21 16:02:43 +01:00
Richard Davey
37fdde7911
New typedefs for pipeline configs
2020-08-21 16:02:30 +01:00