Comments (5)
From what your stating you would prefer to have the constructor be changed from
new(parent: GuiObject, time: number?, style: EasingStyle?, direction: EasingDirection?, repeatCount: number?, reverses: boolean?, delayTime: number?)
to
new(parent: GuiObject, tweenInfo: TweenInfo?)
or something similar. The TweenInfo data type already can be used instead of a table.
Shime aims to be as familiar and easy to use as possible so it would make sense to borrow TweenInfo table, which is very much in scope of Shime.
Currently as it stands if I do change the constructor, it would break backwards compatibility with the previous, including LTS releases of Shime.
from shime.
Yeah that is better ;)
For now I gotta close this
I found how to fix this
function Shime.new(parent: GuiObject, tweenInfo: TweenInfo?)
tweenInfo = tweenInfo or TweenInfo.new(1, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut, -1, false, 0)
local self = setmetatable({}, Shime)
-- Create the shimmer frame and animation
local shimmer = createShimmer(parent)
self._frame = shimmer
self._gradient = shimmer:FindFirstChildOfClass("UIGradient")
self._corner = shimmer:FindFirstChildOfClass("UICorner")
-- Create the tween
self._tween = TweenService:Create(
self._gradient,
tweenInfo,
{ Offset = Vector2.new(1, 0) }
)
-- Setup tween completion callback. Under default constants this will never be called as the tween will repeat infinitely
self._tween.Completed:Connect(function()
self:_TweenCompleted()
end)
return self
end
from shime.
I didn't push any commits? I'm not sure how I solved this issue but alright.
from shime.
You mentioned this:
From what your stating you would prefer to have the constructor be changed from
new(parent: GuiObject, time: number?, style: EasingStyle?, direction: EasingDirection?, repeatCount: number?, reverses: boolean?, delayTime: number?)
to
new(parent: GuiObject, tweenInfo: TweenInfo?)
or something similar. The TweenInfo data type already can be used instead of a table.
from shime.
You mentioned this:
From what your stating you would prefer to have the constructor be changed from
new(parent: GuiObject, time: number?, style: EasingStyle?, direction: EasingDirection?, repeatCount: number?, reverses: boolean?, delayTime: number?)
to
new(parent: GuiObject, tweenInfo: TweenInfo?)
or something similar. The TweenInfo data type already can be used instead of a table.
I'm not planning to introduce a new constructor yet as it will break all pre-existing ones and require me to update all documentation for a small change which gives little benefits.
So I don't get why this is marked as completed.
from shime.
Related Issues (3)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from shime.