GWEN is NOT supposed to be for spritesheet animations. It is solely just for fetching static images in spritesheets like icons.
What is GWEN?
GWEN (ipa: gwɛ́n) is a module that allows for simplifying the process of using static spritesheets. It is based off of the GWEN module used in the “Garry’s Mod” game.
What does this do?
This module creates fresh new images with spritesheets and sprite data. Support is available for sliced sprites and normal sprites.
How do I use this module?
The first thing to do is (obviously) grab the model from the Roblox website, and then add it into Studio. Then, simply require the module and then you will be able to access the functions.
There are 3 functions in GWEN that you can use:
- CreateTextureBorder, a function for creating spritesheet images with slicing
- CreateTextureNormal, a function for creating normal spritesheet images
- CreateTextureCentered, a function for creating normal spritesheet images but with the position centered in the canvas.
Each one of these functions returns a “draw” function which can be used to set the position and size of the image instance itself in the canvas.
An example is provided below:
local Button = GWEN.CreateTextureBorder(480, 0, 31, 31, 8, 8, 8, 8, "ImageButton", "rbxassetid://17094515999", gui)
Button(5, 5, 31, 31)
API Docs
Sorry pal if you want any form of documentation then just check the code itself.
Credits
Garry Newman - Creating the original GWEN code for Garry’s Mod
Roblox - Various code used from their 9 Slice Editor plugin for the conversion of offsets to slice center.