-
-
Notifications
You must be signed in to change notification settings - Fork 0
Getting Started
This page will cover installation and basic usage including code samples of Shime. For more information about Shime, you can read the Documentation.
Shime is simple and straightforward, you will need the require Shime's module script as a variable and then you can use constructors such as Shime.new()
to create a new Shimmer object. Below are two methods to install Shime.
Warning This installation method will not allow for automatic updates including security updates. It is recommended to use the Require from Roblox method. Only use this method if you are planning to use a modified version of Shime.
- Get the Shime module from the Creator Marketplace.
-
Open Roblox Studio and create a new place or open an existing place.
-
Open or locate the Toolbox.
- Search for
Shimmer Module
created byWinnersTakesAll
and click on it.
- Insert
Shimmer Module
into the Explorer and drag into ReplicatedStorage.
Warning This installation method will not allow for automatic updates including security updates. It is recommended to use the Require from Roblox method. Only use this method if you are planning to use a modified version of Shime.
You can install Shime from GitHub, this is intended if you want to use a modified version of Shime.
- Download the
Shime.rbxm
file from Releases.
-
Open Roblox Studio and create a new place or open an existing place.
-
Go to the Explorer and right click on
ReplicatedStorage
and click onInsert from file...
.
- Select the
Shime.rbxm
you downloaded from GitHub and clickOpen
.
- Require the Shime module in your script like below when you want to use Shime.
local Shime = require(game.ReplicatedStorage.Shime)
The below code samples will show you how to use Shime and it's constructors, methods, and functions. To learn more about Shime, you can read the Documentation.
The examples below expect the script.Parent
to be a GuiObject
and that you have the Shime module in ReplicatedStorage, to learn about how to add the module to ReplicatedStorage go to Installation > Download from GitHub & Install in Studio. If you are using Shime from Roblox, you will need to change the require
line to local Shime = require(1234567890)
where 1234567890
is the ID of the Shime module.
To create a Shimmer, you need to create a new Shimmer
object. You can do this by calling the Shime module like a function. The below script will create a new Shimmer object and store it in a variable called shimmer
and add it to the script.Parent
then play it using Shimmer:Play()
.
-- 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()
Shime allows you to create a Shimmer with a custom animation using the Shimmer.new()
methods and specifying the parameters which are based closely off the TweenBase class. The below script will create a new Shimmer object and store it in a variable called shimmer
and add it to the script.Parent
then play it using Shimmer:Play()
. The Shimmer will use a custom animation that will be played when the Shimmer is played.
-- Require the Shime module
local Shime = require(game.ReplicatedStorage.Shime)
local time = 1 -- Time for shimmer animation
local style = Enum.EasingStyle.Linear -- Easing style for shimmer animation
local direction = Enum.EasingDirection.InOut -- Easing direction for easing style
local repeatCount = -1 -- Repeat amount for shimmer (negative number means infinite)
local reverse = false -- Reverse direction of shimmer when it reaches the end
local delayTime = 0 -- Delay between each shimmer
-- Create a new Shimmer and play it
local shimmer = Shime.new(script.Parent, time, style, direction, repeatCount, reverse, delayTime)
shimmer:Play()
To pause a Shimmer, you need to call the Shimmer.Pause()
function which can be paused again to toggle the playback state. The below script will create a new Shimmer object and store it in a variable called shimmer
and add it to the script.Parent
then play it. When the mouse enters the GuiObject the Shimmer will be paused using Shimmer.Pause
and when the mouse leaves the GuiObject the Shimmer will be stopped.
-- 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)
Shimmer has a few properties that you can use to get information about the Shimmer mostly related to the Shimmer's state. The below script will create a new Shimmer object and store it in a variable called shimmer
and add it to the script.Parent
then play it. 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
end
Shimmer can be customized using the Shimmer.GetFrame()
and Shimmer.GetGradient()
functions. The below script will create a new Shimmer object and store it in a variable called shimmer
and add it to the script.Parent
then play it. The Shimmer will use a custom frame and gradient.
-- 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()
-- Get the Shimmer's frame and set it's properties
local frame = shimmer:GetFrame()
frame.Size = UDim2.new(0.5, 0, 1, 0)
frame.Position = UDim2.new(0, 0, 0, 0)
frame.AnchorPoint = Vector2.new(0, 0)
-- Get the Shimmer's gradient and set it's properties
local gradient = shimmer:GetGradient()
gradient.Rotation = 90
gradient.Transparency = NumberSequence.new({
NumberSequenceKeypoint.new(0, 0),
NumberSequenceKeypoint.new(0.5, 0.5),
NumberSequenceKeypoint.new(1, 0)
})
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.