-
-
Notifications
You must be signed in to change notification settings - Fork 2
Documentation
Documentation for the Shime module. Shime is a class that allows you to create a shimmer effect on any GuiObject on Roblox. Based off of Roblox's Shimmer module from CoreGui.
new(parent: GuiObject) |
|---|
Returns a table containing Shimmer's metatable. Shimmers using default parameters. |
new(parent: GuiObject, time: number?, style: EasingStyle?, direction: EasingDirection?, repeatCount: number?, reverses: boolean?, delayTime: number?) |
|---|
Returns a table containing Shimmer's metatable. Shimmers using specified parameters. |
| Property | Details |
|---|---|
PlaybackState: Enum.PlaybackState
|
This read-only property will return Enum.PlaybackState. |
Stop(): void
|
|---|
The Stop function halts Shimmer. If Shimmer:Play() is called again the Shimmer will resume interpolating towards their destination but take the full length of the time to do so. |
Pause(): void
|
|---|
The Pause function halts Shimmer. If you call Shimmer:Play() again, the shimmer resumes playback from the moment it was paused. |
Play(): void
|
|---|
The Play function starts Shimmer. Note that if a shimmer has already begun calling Play will have no effect unless the shimmer has finished or has been stopped (either by Shimmer:Stop() or Shimmer:Pause()). |
Creates a new Shimmer from the provided parameters.
| Parameter | Details |
|---|---|
parent: GuiObject
|
|
time: number? |
Default Value: "1" |
style: EasingStyle? |
Default Value: "EasingStyle.Linear" |
direction: EasingDirection? |
Default Value: "EasingDirection.In" |
repeatCount: number? |
Default Value: "-1" |
reverses: boolean? |
Default Value: "false" |
delay: number? |
Default Value: "0" |
This read-only property will return Enum.PlaybackState.
This property is updated when the playback of the Shimmer is updated. This can be caused by a method changing the Shimmer, the Shimmer finishing, etc.
As PlaybackState is read only it can not be used to change the playback of the Shimmer.
This code sample contains demonstrates when the Shimmer.PlaybackState property is updated and how to utilize it.
A shimmer is created and played. Every 1 second the shimmer is paused then played again. The PlaybackState property is then printed to the output.
-- Require the Shime module
local Shime = require(game.ReplicatedStorage.Shime)
-- Create a new Shimmer and play it
local shimmer = Shime.new(script.Parent)
shimmer:Play()
-- Loop shimmers play and pause every 1 second
while true do
task.wait(1)
if shimmer.PlaybackState == Enum.PlaybackState.Playing then
-- Pause the shimmer and print PlaybackState
shimmer:Pause()
print("shimmer.PlaybackState: " .. tostring(shimmer.PlaybackState))
elseif shimmer.PlaybackState == Enum.PlaybackState.== Enum.PlaybackState.Playing then
-- Play the shimmer and print PlaybackState
shimmer:Play()
print("shimmer.PlaybackState: " .. tostring(shimmer.PlaybackState))
end
endStops the Shimmer. Sets Shimmer.PlaybackState to Enum.PlaybackState.Cancelled.
voidThis sample gives a simple demonstration of what each of the Shimmer functions (Shimmer.Play, Shimmer.Stop and Shimmer.Pause).
-- Require the Shime module
local Shime = require(game.ReplicatedStorage.Shime)
-- Create a new Shimmer and play it
local shimmer = Shime.new(script.Parent)
shimmer:Play()
-- Pause the Shimmer when the mouse enters the GuiObject
script.Parent.MouseEnter:Connect(function()
shimmer:Pause()
end)
-- Stop the Shimmer when the mouse leaves the GuiObject
script.Parent.MouseButton1Click:Connect(function()
shimmer:Stop()
end)Pauses the Shimmer. Sets Shimmer.PlaybackState to Enum.PlaybackState.Paused.
voidThis sample gives a simple demonstration of what each of the Shimmer functions (Shimmer.Play, Shimmer.Stop and Shimmer.Pause).
-- Require the Shime module
local Shime = require(game.ReplicatedStorage.Shime)
-- Create a new Shimmer and play it
local shimmer = Shime.new(script.Parent)
shimmer:Play()
-- Pause the Shimmer when the mouse enters the GuiObject
script.Parent.MouseEnter:Connect(function()
shimmer:Pause()
end)
-- Stop the Shimmer when the mouse leaves the GuiObject
script.Parent.MouseButton1Click:Connect(function()
shimmer:Stop()
end)Plays the Shimmer. Sets Shimmer.PlaybackState to Enum.PlaybackState.Playing.
voidThis sample gives a simple demonstration of what each of the Shimmer functions (Shimmer.Play, Shimmer.Stop and Shimmer.Pause).
-- Require the Shime module
local Shime = require(game.ReplicatedStorage.Shime)
-- Create a new Shimmer and play it
local shimmer = Shime.new(script.Parent)
shimmer:Play()
-- Pause the Shimmer when the mouse enters the GuiObject
script.Parent.MouseEnter:Connect(function()
shimmer:Pause()
end)
-- Stop the Shimmer when the mouse leaves the GuiObject
script.Parent.MouseButton1Click:Connect(function()
shimmer:Stop()
end)Shime has officially been released.
Shime development will be split between normal releases and long term support (LTS) releases. For those seeking stable builds with minor API changes or not worrying about having to update Shime as frequently you can choose the LTS release which will be specifically marked with LTS. For those seeking the lastest stable changes and occasional API changes you can select the normal release.
Shime has added new methods in it's first release from pre-release. These methods include :GetFrame() and :GetGradient() which will return their respective Instances. Seek documentation for more details.
Shimmer is a class required from the Shime module that allows you to easily create a shimmer effect on any GuiObject based off of CoreGui's Shimmer module.