Phaser v3.88 #7037
photonstorm
announced in
Announcements
Phaser v3.88
#7037
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
New Features
Transform.getWorldPoint
is a new method that will return the World point as a Vector2 of a Game Object, factoring in parents if applicable (thanks @samme)Utils.Array.GetFirst
can now search from the end of the array when settingstartIndex
to -1.DynamicTexture
and by extensionRenderTexture
now have a new boolean propertyforceEven
in their constructor,setSize
andresize
methods. This will force the given width and height values to be rounded up to the nearest even value. This significantly improves the rendering quality of the render texture in most circumstances, so the flag istrue
by default. This is a potentially breaking change, so if you know you need an odd sized texture, please set the value tofalse
. Fix Size of renderTexture and the rendering quality #6988 (thanks @rexrainbow)Updates
Tween.isNumberTween
is a new boolean property that tells if the Tween is a NumberTween, or not.TransformMatrix.setTransform
method has been updated so that it uses the old way of passing in matrix values for Canvas 2D. This fixes the error "Failed to execute 'setTransform' on 'CanvasRenderingContext2D': 6 arguments required, but only 1 present." in old legacy browsers such as Chromium Embedded Framework. Fix Failed to execute 'setTransform' on 'CanvasRenderingContext2D': 6 arguments required, but only 1 present. #6965 (thanks @rafa-fie)mousedown
andmouseup
have been added for unlocking Web Audio. Both events occur before aclick
event, allowing for earlier audio unlocking on devices that use a mouse (thanks @pavle-goloskokovic)addBase64
method. Rather than the error "TypeError: null is not an object (evaluating 'texture.source')" is will not return early (thanks @samme)TweenBuilder
andNumberTweenBuilder
have been updated to useGetFastValue
for most properties instead ofGetValue
.Transform.getWorldTransformMatrix
method will now destroy the parent matrix at the end, if it was created within the method.Body.setGameObject
andStaticBody.setGameObject
methods have been updated to do the following: Return if no valid Game Object is passed. Disable and null the body of the existing Game Object if the Body has one. Set thebody
property, even if it doesn't exist (converts non-physics objects into physics objects). CallssetSize
to update the body dimensions to make the new Game Object and finally setsenable
based on the given parameter, which is now correctly referenced. The StaticBody version also has a new parameter,enable
which matches that of the Dynamic Body and defaults totrue
(the original state). Fix Exception in Arcade Static Body.setGameObject method, null pointer #6969 (thanks @yongzheng7)ArcadeColliderType
has been updated to includePhysics.Arcade.StaticBody
. Fix The type of Arcade Static Body is missing #6967 (thanks @yongzheng7)Phaser.Types.GameObjects.Text.TextStyle
now includesletterSpacing
: a positive or negative amount to add to the spacing between characters. Fix Text gameobjects: Word wrap doesn't take into account letter spacing #7002 (thanks @Stever1388)Tilemaps.Parsers.Tiled.ParseTilesets
,Tilemaps.Parsers.Tiled.BuildTilesetIndex
andTilemaps.ImageCollection.addImage
have been updated to includewidth
andheight
of each individual image. Fix Improve support for TiledImageCollection - as it currently assumes all tilesets will be the maximum size of the image in the collection #6990 (thanks @stickleprojects)Tilemaps.Components.RenderDebug
andTilemaps.Parsers.Tiled.BuildTilesetIndex
have been updated to includewidth
andheight
offsets in Image Collections.Tilemaps.Components.GetTilesWithinShape
when attempting to use this method with non orthogonal tilemaps.Cameras.Scene2D.Camera.preRender
method from protected to public. FixCamera.preRender
should be public instead of protected? #7020 (thanks @zoubingwu)Bug Fixes
TweenData.update
will now check if the Tween is a Number Tween and apply the final start/end value to the result on completion, instead of the eased value as calculated by the change made in v3.87.BaseTweenData.duration
can now never be zero or less than zero, which would trigger NaN errors. It's now clamped to a minimum of 0.01ms. Fix Tweens: Duration of 0 Makes Values NaN (Alpha) #6955 (thanks @kainage)FontFileConfig
(thanks @samme)Matter.World.update
could hang and crash the browser if a large delta value was given to it, such as returning to a long-dormant tab. The Matter Runner config values are now properly passed through, preventing this from happening. Fix Tab stalls when using matterjs and moving away from the tab for a while, probably Engine.update related #6977 (thanks @ubershmekel @samme)Phaser.Physics.Matter.Components.Transform#scale
correctly scales the physics body with the GameObject. Fix Using the.scale
setter on a Matter gameobject doesn't update the matter body size #7001 (thanks @Stever1388)Phaser.Textures.Frame.setCropUVs
updated crop calculation to include thespriteSourceSize
. Fix Wrong math in the crop component for trimmed frames #6996 (thanks @CrispMind)Phaser.Tilemaps.Parsers.Tiled.ParseJSONTiled
updated hexagonal tilemaps to correctly calculate thewidthInPixels
andheightInPixels
based on the hexagonal overlapping tiles. Fix Calculation for widthInPixels and heightInPixels in MapData class does not consider orientation="hexagonal" #6992 (thanks @ptantiku)Phaser.Display.Color.Interpolate.RGBWithRGB
now correctly returns aPhaser.Types.Display.ColorObject
that includesr
,g
,b
,a
andcolor
values. FixInterpolate.ColorWithColor
always returns aColorObject
with an undefinedcolor
value #6979 (thanks @XWILKINX)Phaser.Plugins.PluginManager
automatically boots plugins when the game config render type is set toPhaser.HEADLESS
. Fix NodeJS: scene started before plugins loaded #6893 (thanks @hubertgrzeskowiak)persist
set totrue
and given acompleteDelay
value are no longer destroyed and can be replayed. Fix Tweens withpersist:true
and acompleteDelay
are destroyed on completion and cannot be replayed #7008 (thanks @Stever1388)Tweens.TweenChain
onStart
event is now dispatched properly. Fix TweenChainonStart
doesn't get called #7007 (thanks @Stever1388)GameObjects.Particles.Zones.DeathZone
now uses world position coordinates instead of local position coordinates following the particle emitter position. Fix Particle DeathZones don't work #7006 (thanks @Stever1388)Phaser.Types.Tweens.TweenBuilderConfig
object is now correctly executed without errors. Fix CallingkillTweensOf
orkillAll
inside a tween on complete callback throwsUncaught TypeError: cannot read properties of null
#7003 (thanks @Stever1388)GameObjects.Text
created withwordwrap
and withletterSpacing
applied now takes into account the providedletterSpacing
value to correctly wrap lines. Fix Text gameobjects: Word wrap doesn't take into account letter spacing #7002 (thanks @Stever1388)GameObjects.DOMElement
sets the GameObject'sdisplayWidth
anddisplayHeight
using itsscaleX
andscaleY
values instead of the DOM elementsgetBoundingClientRect()
values. Fix [dom] error Arcade.Body size when Scale use ScaleModes.FIT #6871 (thanks @HawkenKing)mode
toPhaser.Scale.FIT
andautoCenter
toPhaser.Scale.CENTER_BOTH
correctly centres canvas on iOS devices. Fix iOS displays autoCenter: Phaser.Scale.CENTER_BOTH in a way not consistent with results on android and on pc #6862 (thanks @HawkenKing)Tilemaps.Tilemap.createBlankLayer
method now correctly sets thehexSideLength
as loaded from the hex tilemap. FixputTileAt
intocreateBlankLayer
on hex map from Tiled renders wrong #6074 (thanks @wwoods)Input.InputPlugin.processDragUpEvent
now correctly returnsx
andy
coordinates in world space.Animations.AnimationState.play
method now prioritises theframeRate
property when it is set in thePlayAnimationConfig
object over animation data loaded from an external file.Layer
Game Object methodsetToTop
would throw an exception:getDisplayList is not a function
. This method has now been added to the Game Object. Fix Layers'ssetToTop()
method throws an exception:this.getDisplayList is not a function
#7014 (thanks @leha-games @rexrainbow)EmitterOp
defaultEmit()
always returnedundefined
, causing particle problems if you gave only anonUpdate
callback. Also if you configured an EmitterOp withonEmit
oronUpdate
, the op's current value would be incorrect (an object) until the first emit. Fix Phaser 3.87 doc issue deriving on unexpected visual @ emitters under CANVAS rendering #7016 (thanks @urueda @samme)Examples, Documentation, Beta Testing and TypeScript
Thanks to the following for helping with the Phaser Examples, Beta Testing, Docs, and TypeScript definitions, either by reporting errors, fixing them, or helping author the docs:
@samme
@justin-calleja
This discussion was created from the release Phaser v3.88.
Beta Was this translation helpful? Give feedback.
All reactions