This Nine Patch plugin easily adds 9-slice scaling support to Phaser 3.

Article by Richard Davey. Posted on 25th Jul 2018.   @photonstorm

image

Koreez Games has released this really useful Phaser 3 Plugin that enables you to use 9-slice objects in your games:

Key features:

  • Blazing fast
  • Low memory usage
  • Easy to use API

What is Nine-Patch?

A Nine-Patch is an image format that uses extra information, defining what parts of it should be scaled (and which are not) when the image is rendered in a larger or smaller size. This technique is very useful for creating UI components like buttons, panels, containers, etc.

Using this technique, you can define the background of multiples UI components like panels or buttons with the same image asset. You can also create large panels with a reduced image asset so is very useful for optimizing your project resources."

Read More