-
-
Notifications
You must be signed in to change notification settings - Fork 0
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 ?, delay: number ?) |
---|
Returns a table containing Shimmer 's metatable. Shimmers using specified parameters. |
Property | Details |
---|---|
IsCompleted: boolean
|
This read-only property will return true when the Shimmer has completed. |
IsPaused: boolean
|
This read-only property will return true when the Shimmer is not playing. |
IsPlaying: boolean
|
This read-only property will return true when the Shimmer is playing. |
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 true when the Shimmer
has completed.
This property can only be true when Shimmer.IsPlaying
is false.
As IsCompleted is read only it can not be used to stop the Shimmer, Shimmer.Stop()
must be used instead.
This code sample contains demonstrates when the Shimmer.IsPlaying and Shimmer.IsPaused properties will be true or false.
A shimmer is created and played. Every 1 second the shimmer is paused then played again. The IsPlaying and IsPaused properties are then printed to the output.
-- Require the Shime module
local Shime = require(script.Parent.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.IsPlaying then
-- Pause the shimmer and print IsPaused
shimmer:Pause()
print("shimmer.IsPaused: " .. tostring(shimmer.IsPaused))
elseif shimmer.IsPaused then
-- Play the shimmer and print IsPlaying
shimmer:Play()
print("shimmer.IsPlaying: " .. tostring(shimmer.IsPlaying))
end
end
This read-only property will return true when the Shimmer
is not playing.
This property can only be true when Shimmer.IsPlaying
is false.
As IsPaused is read only it can not be used to pause the Shimmer, Shimmer.Pause()
must be used instead.
This code sample contains demonstrates when the Shimmer.IsPlaying and Shimmer.IsPaused properties will be true or false.
A shimmer is created and played. Every 1 second the shimmer is paused then played again. The IsPlaying and IsPaused properties are then printed to the output.
-- Require the Shime module
local Shime = require(script.Parent.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.IsPlaying then
-- Pause the shimmer and print IsPaused
shimmer:Pause()
print("shimmer.IsPaused: " .. tostring(shimmer.IsPaused))
elseif shimmer.IsPaused then
-- Play the shimmer and print IsPlaying
shimmer:Play()
print("shimmer.IsPlaying: " .. tostring(shimmer.IsPlaying))
end
end
This read-only property will return true when the Shimmer
is playing.
This property can only be true when Shimmer.IsPaused
is false.
As IsPlaying is read only it can not be used to play the Shimmer, Shimmer.Play()
must be used instead.
This code sample contains demonstrates when the Shimmer.IsPlaying and Shimmer.IsPaused properties will be true or false.
A shimmer is created and played. Every 1 second the shimmer is paused then played again. The IsPlaying and IsPaused properties are then printed to the output.
-- Require the Shime module
local Shime = require(script.Parent.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.IsPlaying then
-- Pause the shimmer and print IsPaused
shimmer:Pause()
print("shimmer.IsPaused: " .. tostring(shimmer.IsPaused))
elseif shimmer.IsPaused then
-- Play the shimmer and print IsPlaying
shimmer:Play()
print("shimmer.IsPlaying: " .. tostring(shimmer.IsPlaying))
end
end
Stops the Shimmer
. Sets Shimmer.IsPlaying
to false.
void
This 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(script.Parent.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.IsPlaying
to false.
void
This 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(script.Parent.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.IsPlaying
to true.
void
This 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(script.Parent.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.