changelog/v3/3.4/CHANGELOG-v3.4.md
A beta release of the new Container Game Object arrives in this version. We've flagged it as beta because there are known issues in using Containers in Scenes that have multiple cameras or irregular camera viewports. However, in all other instances we've tested they are operating normally, so we felt it would be best to release them into this build to give developers a chance to get used to them. Using a Container will issue a single console warning as a reminder. We will remove this once they leave beta in a future release. In the meantime they are fully documented and you can find numerous examples in the Phaser 3 Examples repo too.
correction which is used in the Engine.update call and allows you to adjust the time being passed to the simulation. The default value is 1 to remain consistent with previous releases.getDelta which allows you to specify your own function to calculate the delta value given to the Matter Engine when it updates.set60Hz and set30Hz which will set an Engine update rate of 60Hz and 30Hz respectively. 60Hz being the default.autoUpdate, which defaults to true. When enabled the Matter Engine will update in sync with the game step (set by Request Animation Frame). The delta value given to Matter is now controlled by the getDelta function.step which manually advances the physics simulation by one iteration, using whatever delta and correction values you pass in to it. When used in combination with autoUpdate=false you can now explicitly control the update frequency of the physics simulation and unbind it from the game step.debugShowJoint and debugJointColor. If defined they will display joints in Matter bodies during the postUpdate debug phase (only if debug is enabled) (thanks @OmarShehata)destroyChildren which will automatically call destroy on all children of a Group if set to true (the default is false, hence it doesn't change the public API). Fix #3246 (thanks @DouglasLapsley)letterSpacing which accepts a positive or negative number to add / reduce spacing between characters (thanks @wtravO)Tilemap.addTileset and it will work in WebGL, where-as before it would display a corrupted tilemap. Fix #3407 (thanks @Zykino)ScenePlugin.start without any arguments, but is more clear.destroy event when they are destroyed (thanks @rexrainbow)mapAdd which is used to extend the default injection map of a scene instead of overwriting it (thanks @sebashwa)getTopLeft, getTopRight, getBottomLeft and getBottomRight all have a new optional argument includeParent which will factor in all ancestor transforms to the returned point.startFollow, but PathFollower.setPath was still using PathFollower.start (thanks @samid737)setRate on its sounds, instead of calculateRate.getValue method now correctly applies the threshold and zeroes out the returned value.setZ instead of setDepth for the Debug Graphics Layer, causing it to appear behind objects in some display lists.renderer exists before calling destroy on it. Fix #3498 (thanks @Huararanga)update loops. Fix #3490 (thanks @belen-albeza)divisions argument and always returning 1, which made it fail when used as part of a Path. It now defaults to return 1 unless specified otherwise (thanks _ok)setDisplaySize (thanks Babsobar)setDisplaySize (thanks Babsobar)null, and now returns the first available Canvas. Fix #3520 (thanks @mchiasson)data argument it wouldn't get passed through if the Scene was not yet available (i.e. the game had not fully booted). The data is now passed to the Scene init and create methods and stored in the Scene Settings data property. Fix #3363 (thanks @pixelhijack)Tween.play on a tween that was paused due to its config object, not as a result of having its paused method called. Fix #3452 (thanks @jazen)destroy on Tweens instead of stop (thanks @Antriel)setOffset on a Static Arcade Physics Body would break because the method was missing. It has been added and now functions as expected. Fix #3465 (thanks @josephjaniga and @DouglasLapsley)setInteractive is called on a Game Object that fails to set a hit area, it will no longer try to assign dropZone to an undefined input property.setOrigin unless the Game Object has the origin component (which not all do, like Graphics and Container)destroy method, causing an error when trying to destroy the parent Game Object. Fix #3516 (thanks @RollinSafary)rate and detune properties removed as they are always set in the overriding class.setRate and setDetune from the 3.3.0 release have moved to the WebAudioSound and HTML5AudioSound classes respectively, as they each handle the values differently.InteractiveObject.js has been renamed to CreateInteractiveObject.js to more accurately reflect what it does and to avoid type errors in the docs.Fixed to FixedKeyControl and Smoothed to SmoothedKeyControl to match the class names. Fix #3463 (thanks @seivan)setSize and setDisplaySize methods. This component is used for Game Objects that have a non-texture based size.key which will allow you to scan a top-level property of any object in the given sorted array and get the closest match to it.skipCallback.skipCallback.skipCallback.skipCallback.skipCallback.skipCallback.skipCallback.extend property of a Scene config object it will now block overwriting the Scene sys property.extend property of a Scene config object, if you define a property called data that has an object set, it will populate the Scenes Data Manager with those values.isProcessing which is now a boolean, not an integer. It's also now public and read-only.a, b, c, d, tx and ty. It also has the following new getters: scaleX, scaleY and rotation.List.getFirst instead which offers the exact same functionality.List.add instead which offers the exact same functionality.removeAllListeners for any local events.We have refactored the Animation API to make it more consistent with the rest of Phaser 3 and to fix some issues. All of the following changes apply to the Animation Component:
frameRate property to set the speed of an animation in frames per second.onStart, onRepeat, onUpdate and onComplete and the corresponding params arrays like onStartParams and the property callbackScope. The reason for this is that they were all set on a global level, meaning that if you had 100 Sprites sharing the same animation, it was impossible to set the callbacks to fire for just one of those Sprites, but instead they would fire for all 100 and it was up to you to figure out which Sprite you wanted to update. Instead of callbacks animations now dispatch events on the Game Objects in which they are running. This means you can now do sprite.on('animationstart') and it will be invoked at the same point the old onStart callback would have been. The new events are: animationstart, animtionrepeat, animationupdate and animationcomplete. They're all dispatched from the Game Object that has the animation playing, not from the animation itself. This allows you far more control over what happens in the callbacks and we believe generally makes them more useful.animationupdate event dispatched from the Game Object itself and check the 2nd argument, which is the animation frame.dispatchCallbacks argument, because it dispatches an event which you can choose to ignore.delay method has been removed.setDelay allows you to define the delay before playback begins.getDelay returns the animation playback delay value.delayedPlay now returns the parent Game Object instead of the component.load now returns the parent Game Object instead of the component.pause now returns the parent Game Object instead of the component.resume now returns the parent Game Object instead of the component.isPaused returns a boolean indicating the paused state of the animation.paused method has been removed.play now returns the parent Game Object instead of the component.progress method has been removed.getProgress returns the animation progress value.setProgress lets you jump the animation to a specific progress point.repeat method has been removed.getRepeat returns the animation repeat value.setRepeat sets the number of times the current animation will repeat.repeatDelay method has been removed.getRepeatDelay returns the animation repeat delay value.setRepeatDelay sets the delay time between each repeat.restart now returns the parent Game Object instead of the component.stop now returns the parent Game Object instead of the component.timeScale method has been removed.getTimeScale returns the animation time scale value.setTimeScale sets the time scale value.totalFrames method has been removed.getTotalFrames returns the total number of frames in the animation.totalProgres method has been removed as it did nothing and was mis-spelt.yoyo method has been removed.getYoyo returns if the animation will yoyo or not.setYoyo sets if the animation will yoyo or not.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 (thanks @wtravO @jp-gc)updateFrame now supports animation frames with custom pivot points and injects these into the Game Object origin.destroy now removes events, references to the Animation Manager and parent Game Object, clears the current animation and frame and empties internal arrays.yoyo property on an Animation Component would have no effect as it only ever checked the global property, it now checks the local one properly allowing you to specify a yoyo on a per Game Object basis.My thanks to the following for helping with the Phaser 3 Examples, Docs and TypeScript definitions, either by reporting errors, fixing them or helping author the docs:
@gabegordon @melissaelopez @samid737 @nbs @tgrajewski @pagesrichie @hexus @mbrickn @erd0s @icbat @Matthew-Herman @ampled @mkimmet @PaNaVTEC