Thank you to everyone who helped test our Beta 5 release and the incredible new SpriteGPU Game Object! If you missed out on this, please see our earlier announcement containing loads of cool demos. Since then, it has been truly exciting to see the shader tests and insane sprite demos you've been making with it. We've continued development and listened to your feedback, and Beta 6 includes many fixes and updates as a result.

Before we get to those, if you'd like to experiment with Phaser v4 Beta 6 you can download it from npm and GitHub, or use it right now in our Phaser Sandbox.

npm install phaser@beta

And now, on with the updates:

Additions

  • Add Filter support to Layer.
  • Allow RenderTexture to automatically re-render.
    • DynamicTexture#preserve() allows you to keep the command buffer for reuse after rendering.
    • DynamicTexture#callback() allows you to run callbacks during command buffer execution.
    • RenderTexture.setTextureMode() allows you to set the RenderTexture to automatically re-render during the render loop.

Fixes and Eliminations

  • Fix roundPixels handling in many places, mostly by removing it from irrelevant situations.
    • Remove TransformMatrix#setQuad parameter roundPixels, as it is no longer used.
  • Filters are correctly destroyed along with their owners, unless ignoreDestroy is enabled. This supports multi-owner Filter controllers.
  • WebGLRenderer destroys itself properly.
  • Remove unnecessary transform related to camera scroll.
  • Remove references to Mesh.
  • Fix UV coordinates in Shader.
  • Shader#setTextures() now replaces the texture array, rather than adding to it.
  • Fix SpriteGPULayer#getMember(), which previously multiplied the index by 4.
  • Fix flipX/flipY in Filter#focusFilters.
  • Fix BatchHandlerQuad#run() parameter tintFill, which was set as a Number but should be used as a Boolean.
  • Eliminate rounding in Camera#preRender().

Please be sure to drop by our phaser4-beta channel in our Discord to chat to the team and see what the community has been working on.

Phaser v4 Beta 6 on GitHub