5.1 KiB
5.1 KiB
Phaser 3.60.0 Change Log
Return to the Change Log index.
Group, Layer and Game Object New Features
- When using
Group.createMultipleit will now skip the post-creations options if they are not set in the config object used, or a Game Object constructor. Previously, things like alpha, position, etc would be over-written by the defaults if they weren't given in the config, but now the method will check to see if they are set and only use them if they are. This is a breaking change, but makes it more efficient and flexible (thanks @samme) GameObjects.Layer.addToDisplayListandremoveFromDisplayListare new methods that allows for you to now add a Layer as a child of another Layer. Fix #5799 (thanks @samme)GameObjects.Polygon.setTois a new method that allows you to change the points being used to render a Polygon Shape Game Object. Fix #6151 (thanks @PhaserEditor2D)
Game Object Updates
- The
GameObject.getBoundsmethod will now return aGeom.Rectangleinstance, rather than a plain Object (thanks @samme) - The
GetBounds.getCentermethod now has an optionalincludeParentargument, which allows you to get the value in world space. - The
TransformComponent has a new boolean read-only propertyhasTransformComponentwhich is set totrueby default.
DOM Element Game Object Updates
- The
DOMElement.preUpdatemethod has been removed. If you overrode this method, please now seepreRenderinstead. DOMElement.preRenderis a new method that will check parent visibility and improve its behavior, responding to the parent even if the Scene is paused or the element is inactive. Dom Elements are also no longer added to the Scene Update List. Fix #5816 (thanks @prakol16 @samme)
Light Game Object Updates
- The
LightGame Object now has theOriginandTransformcomponents, along with 4 new properties:width,height,displayWidthanddisplayHeight. This allows you to add a Light to a Container, or enable it for physics. Fix #6126 (thanks @jcoppage)
Transform Matrix Updates
TransformMatrix.setQuadis a new method that will perform the 8 calculations required to create the vertice positions from the matrix and the given values. The result is stored in the newTransformMatrix.quadFloat32Array, which is also returned from this method.TransformMatrix.multiplynow directly updates the Float32Array, leading to 6 less getter invocations.
Game Object Bug Fixes
- The
renderFlagsproperty, used to determine if a Game Object will render, or not, would be calculated incorrectly depending on the order of thescaleXandscaleYproperties. It now works regardless of the order (thanks @mizunokazumi) - When calling
GameObject.getPostPipelineand passing in a string for the pipeline name it would error with 'Uncaught TypeError: Right-hand side of 'instanceof' is not an object'. This is now handled correctly internally (thanks @neki-dev) - The
GameObject.willRendermethod will now factor in the parentdisplayList, if it has one, to the end result. This fixes issues like that where an invisible Layer will still process input events. Fix #5883 (thanks @rexrainbow) - The
GetBoundscomponent has been removed from the Point Light Game Object. Fix #5934 (thanks @x-wk @samme) - Although not recommended, when adding a
LayerGame Object to anotherLayerGame Object, it will no longer error because it cannot find theremoveFromDisplayListfunction. Fix #5595 (thanks @tringcooler) - The DisplayList will now enter a while loop until all Game Objects are destroyed, rather than cache the list length. This prevents "cannot read property 'destroy' of undefined" errors in Scenes. Fix #5520 (thanks @schontz @astei)
- Layers will now destroy more carefully when children destroy themselves (thanks @rexrainbow)
- The
DisplayList.addChildCallbackmethod will now check to see if the child has a parent container, and if it does, remove it from there before adding it to the Scene Display List. Fix #6091 (thanks @michalfialadev)
Rope Game Object Bug Fixes
- If
Rope.setPointswas called with the exact same number of points as before, it wouldn't set thedirtyflag, meaning the vertices were not updated on the next render (thanks @stupot)
Rectangle Game Object Bug Fixes
- During a call to
GameObject.Shapes.Rectangle.setSizeit will now correctly update the Rectangle object's display origin and default hitArea (thanks @rexrainbow)
Path Follower Game Object Bug Fixes
- If you start a
PathFollowerwith atovalue it will now tween and complete at that value, rather than the end of the path as before (thanks @samme)
Polygon Game Object Bug Fixes
- The
PolygonGame Object would ignore itsclosePathproperty when rendering in Canvas. Fix #5983 (thanks @optimumsuave)
Return to the Change Log index.
📖 Read the Phaser 3 API Docs 💻 Browse 2000+ Code Examples 🤝 Join the awesome Phaser Discord