English(Current) | 中文版
A GDExtension that adds NinePatchSprite2D
which works similarly to NinePatch
while maintains some functions of Sprite2D
.
- Clone the repo to any folders and copy the
gdextension
folder - Go into the directory of your project where a
project.godot
exists - Paste the folder you just copied to the directory
A NinePatchSprite2D
class is the class that mixed NinePatch
with Sprite2D
together, with critical features extracted from the two classes and arranged in this one. NinePatchSprite2D
provides a Sprite2D
-like implementation; however, it allows you to make the 2d sprite nine patches, or nine different tiles. You can set the stretch mode of both X-axis and Y-axis of a nine patch sprite, as well as its margin that defines which are border of the sprite patches.
Meanwhile, as a Sprite2D
-alike class, NinePatchSprite2D
also provides frames system that helps developers with animations, so that they don't need to take total care of the offset of the rect that samples the texture, which is more flexible and convenience than NinePatch
, and useful out of the box.
See the Wiki in this repo.
4.3 or above
- Windows x86 & x64, arm32 & arm64
- Linux x64, rv64, arm64
- iOS
- MacOS
- Android x86 & x64, arm32 & arm64
- Web wasm32