release notes
release notes
Published 5/24/2021
MinorContains new featuresGameObjects.DOMElement.pointerEvents is a new property that allows you to set the pointerEvents attribute on the DOM Element CSS. This is auto by default and should not be changed unless you know what you're doing.Core.Config.domPointerEvents is a new config property set via dom: { pointerEvents } within the Game Config that allows you to set the pointerEvents css attribute on the DOM Element container.RenderTexture.endDraw method has a new optional boolean erase which allows you to draw all objects in the batch using a blend mode of ERASE. This has the effect of erasing any filled pixels in the objects being drawn.GraphicsPipeline have now been merged with the MultiPipeline, these include batchFillRect, batchFillTriangle, batchStrokeTriangle, batchFillPath, batchStrokePath and batchLine. The Graphics Game Object and all of the Shape Game Objects have been updated to use the new Multi Pipeline. This means that drawing Sprites and Graphics / Shapes will all batch together again. Fix #5553 #5500 (thanks @venarius @roberthook823)Container.moveAbove is a new method that will move a Game Object above another in the same Container (thanks @rexrainbow)Container.moveBelow is a new method that will move a Game Object below another in the same Container (thanks @rexrainbow)List.moveAbove is a new method that will move a Game Object above another in the same List (thanks @rexrainbow)List.moveBelow is a new method that will move a Game Object below another in the same List (thanks @rexrainbow)MeasureText function, as used by Text Game Objects, has had its performance enhanced by removing a duplicate image data check and also now checks for metrics properties correctly (thanks @valadaptive)WebGLShader.setUniform1 has a new optional boolean parameter skipCheck which will force the function to set the values without checking against the previously held ones.WebGLShader.setUniform2 has a new optional boolean parameter skipCheck which will force the function to set the values without checking against the previously held ones.WebGLShader.setUniform3 has a new optional boolean parameter skipCheck which will force the function to set the values without checking against the previously held ones.WebGLShader.setUniform4 has a new optional boolean parameter skipCheck which will force the function to set the values without checking against the previously held ones.WebGLShader.set1fv, set2fv, set3fv, set4fv, set1iv, set2iv, set3iv, set4iv, setMatrix2fv, setMatrix3fv and setMatrix4fv methods no longer try to do array comparisons when setting the uniforms, but sets them directly. Fix #5670 (thanks @telinc1)Mesh Game Object would incorrectly cull faces if the Scene Camera scrolled. It now calculates the cull correctly, regardless of camera world position, zoom or rotation. Fix #5570 (thanks @hendrikras)Math.ToXY will now return an empty Vector 2 if the index is out of range, where before it would return the input Vector2 (thanks @Trissolo)UpdateList.shutdown method will now remove the PRE_UPDATE handler from the ProcessQueue correctly (thanks @samme)key value from it (thanks @mattjennings)GameObjectFactory.existing method will now accept Layer as a TypeScript type. Fix #5642 (thanks @michal-bures)Input.Pointer.event property can now be a WheelEvent as well.addToRenderList before leaving the render method, fixing an issue with Container Input. Fix #5506 (thanks @vforsh @rexrainbow)Game.postBoot callback was never being invoked due to an incorrect internal property setter. Fix #5689 (thanks @sebastianfast)Light Game Object didn't set the shader uniforms correctly, causing it to appear to ignore image rotation with normal maps. Fix #5660 (thanks @sroboubi @telinc1)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:
@x-wk @samme @trynx @Palats @supertorpe @Pixelguy @Fractal @halgorithm @Golden @H0rn0chse @EmilSV @Patapits @karbassi
release notes
Published 5/24/2021
MinorContains new featuresGameObjects.DOMElement.pointerEvents is a new property that allows you to set the pointerEvents attribute on the DOM Element CSS. This is auto by default and should not be changed unless you know what you're doing.Core.Config.domPointerEvents is a new config property set via dom: { pointerEvents } within the Game Config that allows you to set the pointerEvents css attribute on the DOM Element container.RenderTexture.endDraw method has a new optional boolean erase which allows you to draw all objects in the batch using a blend mode of ERASE. This has the effect of erasing any filled pixels in the objects being drawn.GraphicsPipeline have now been merged with the MultiPipeline, these include batchFillRect, batchFillTriangle, batchStrokeTriangle, batchFillPath, batchStrokePath and batchLine. The Graphics Game Object and all of the Shape Game Objects have been updated to use the new Multi Pipeline. This means that drawing Sprites and Graphics / Shapes will all batch together again. Fix #5553 #5500 (thanks @venarius @roberthook823)Container.moveAbove is a new method that will move a Game Object above another in the same Container (thanks @rexrainbow)Container.moveBelow is a new method that will move a Game Object below another in the same Container (thanks @rexrainbow)List.moveAbove is a new method that will move a Game Object above another in the same List (thanks @rexrainbow)List.moveBelow is a new method that will move a Game Object below another in the same List (thanks @rexrainbow)MeasureText function, as used by Text Game Objects, has had its performance enhanced by removing a duplicate image data check and also now checks for metrics properties correctly (thanks @valadaptive)WebGLShader.setUniform1 has a new optional boolean parameter skipCheck which will force the function to set the values without checking against the previously held ones.WebGLShader.setUniform2 has a new optional boolean parameter skipCheck which will force the function to set the values without checking against the previously held ones.WebGLShader.setUniform3 has a new optional boolean parameter skipCheck which will force the function to set the values without checking against the previously held ones.WebGLShader.setUniform4 has a new optional boolean parameter skipCheck which will force the function to set the values without checking against the previously held ones.WebGLShader.set1fv, set2fv, set3fv, set4fv, set1iv, set2iv, set3iv, set4iv, setMatrix2fv, setMatrix3fv and setMatrix4fv methods no longer try to do array comparisons when setting the uniforms, but sets them directly. Fix #5670 (thanks @telinc1)Mesh Game Object would incorrectly cull faces if the Scene Camera scrolled. It now calculates the cull correctly, regardless of camera world position, zoom or rotation. Fix #5570 (thanks @hendrikras)Math.ToXY will now return an empty Vector 2 if the index is out of range, where before it would return the input Vector2 (thanks @Trissolo)UpdateList.shutdown method will now remove the PRE_UPDATE handler from the ProcessQueue correctly (thanks @samme)key value from it (thanks @mattjennings)GameObjectFactory.existing method will now accept Layer as a TypeScript type. Fix #5642 (thanks @michal-bures)Input.Pointer.event property can now be a WheelEvent as well.addToRenderList before leaving the render method, fixing an issue with Container Input. Fix #5506 (thanks @vforsh @rexrainbow)Game.postBoot callback was never being invoked due to an incorrect internal property setter. Fix #5689 (thanks @sebastianfast)Light Game Object didn't set the shader uniforms correctly, causing it to appear to ignore image rotation with normal maps. Fix #5660 (thanks @sroboubi @telinc1)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:
@x-wk @samme @trynx @Palats @supertorpe @Pixelguy @Fractal @halgorithm @Golden @H0rn0chse @EmilSV @Patapits @karbassi
Phaser is a fun, free and fast 2D game framework for making HTML5 games for desktop and mobile web browsers, supporting Canvas and WebGL rendering.