search/
Start typing to search packages!
package_2
spritesheet
By @mercy213
Roblox
Mirrored from WallySpriteSheet
A Wally package for animating 3D Texture instances and UI ImageLabel/ImageButton elements as sprite sheets in Roblox.
Installation
Add to your wally.toml:
[dependencies]
SpriteSheet = "ariel/spritesheet@0.1.0"
Then run wally install.
API
SpriteSheetController:Play(Texture, Rows, Columns, Options?)
Animates a 3D Texture on a part. Returns a Handle with a :Stop() method.
local handle = SpriteSheet:Play(texture, 4, 8, {
FPS = 24,
Loop = true,
StartFrame = 0,
Frames = 30, -- optional: use fewer than Rows*Columns
ImageSize = Vector2.new(512, 512), -- optional: skip async size lookup
})
-- later:
handle:Stop()
SpriteSheetController:PlayUI(Target, Rows, Columns, Options?)
Animates one or more ImageLabel/ImageButton instances. Supports multi-sheet sequences and ping-pong.
-- Single image
local handle = SpriteSheet:PlayUI(imageLabel, 4, 8, {
FPS = 12,
Loop = true,
PingPong = false,
})
-- Multi-sheet sequence
local handle = SpriteSheet:PlayUI(imageLabel, 0, 0, {
Sheets = {
{ Image = "rbxassetid://111", Rows = 4, Columns = 8, Frames = 30 },
{ Image = "rbxassetid://222", Rows = 2, Columns = 4, Frames = 8 },
},
FPS = 24,
Loop = true,
})
handle:Stop()
SpriteSheetController:GetImageSize(AssetId): Vector2?
Returns the pixel size of an asset (cached after first call). Yields on first call.
local size = SpriteSheet:GetImageSize("rbxassetid://123456789")
Options
| Key | Type | Default | Description |
|---|---|---|---|
FPS | number | 12 | Frames per second |
Loop | bool | true | Loop the animation |
PingPong | bool | false | Play forward then backward |
StartFrame | number | 0 | Which frame to start on |
Frames | number | Rows*Columns | How many frames to use |
ImageSize | Vector2 | auto | Skip async size lookup |
Image | string | — | Override asset ID (PlayUI) |
Sheets | table | — | Multi-sheet sequence (PlayUI) |
Package Details
Install command (Click to copy)
Version
0.1.0
License
MIT
Safe for commercial use
The package archive does not include its license text; the license is declared in its manifest metadata.
Automated license review — not legal advice.
