@quenty/radial-image 9.5.0 → 9.5.1-canary.f162cba.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/package.json +9 -9
- package/src/Client/RadialImage.lua +102 -127
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [9.5.1-canary.f162cba.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/radial-image@9.5.0...@quenty/radial-image@9.5.1-canary.f162cba.0) (2024-09-22)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @quenty/radial-image
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
# [9.5.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/radial-image@9.4.0...@quenty/radial-image@9.5.0) (2024-09-12)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @quenty/radial-image
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quenty/radial-image",
|
|
3
|
-
"version": "9.5.0",
|
|
3
|
+
"version": "9.5.1-canary.f162cba.0",
|
|
4
4
|
"description": "Quenty's radial image system",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Roblox",
|
|
@@ -26,16 +26,16 @@
|
|
|
26
26
|
"Quenty"
|
|
27
27
|
],
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@quenty/baseobject": "
|
|
30
|
-
"@quenty/blend": "
|
|
31
|
-
"@quenty/loader": "
|
|
32
|
-
"@quenty/maid": "
|
|
33
|
-
"@quenty/math": "
|
|
34
|
-
"@quenty/rx": "
|
|
35
|
-
"@quenty/valueobject": "
|
|
29
|
+
"@quenty/baseobject": "10.4.0",
|
|
30
|
+
"@quenty/blend": "12.5.1-canary.f162cba.0",
|
|
31
|
+
"@quenty/loader": "10.4.0",
|
|
32
|
+
"@quenty/maid": "3.3.0",
|
|
33
|
+
"@quenty/math": "2.7.0",
|
|
34
|
+
"@quenty/rx": "13.5.0",
|
|
35
|
+
"@quenty/valueobject": "13.5.0"
|
|
36
36
|
},
|
|
37
37
|
"publishConfig": {
|
|
38
38
|
"access": "public"
|
|
39
39
|
},
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "f162cba4d1b4a8bba2c99cf22be2a44bdee1b198"
|
|
41
41
|
}
|
|
@@ -18,29 +18,14 @@ RadialImage.__index = RadialImage
|
|
|
18
18
|
function RadialImage.new()
|
|
19
19
|
local self = setmetatable(BaseObject.new(), RadialImage)
|
|
20
20
|
|
|
21
|
-
self._image = ValueObject.new("", "string")
|
|
22
|
-
self._maid:
|
|
23
|
-
|
|
24
|
-
self.
|
|
25
|
-
self._maid:
|
|
26
|
-
|
|
27
|
-
self.
|
|
28
|
-
self._maid:
|
|
29
|
-
|
|
30
|
-
self._enabledTransparency = ValueObject.new(0, "number")
|
|
31
|
-
self._maid:GiveTask(self._enabledTransparency)
|
|
32
|
-
|
|
33
|
-
self._disabledTransparency = ValueObject.new(1, "number")
|
|
34
|
-
self._maid:GiveTask(self._disabledTransparency)
|
|
35
|
-
|
|
36
|
-
self._enabledColor = ValueObject.new(Color3.new(1, 1, 1), "Color3")
|
|
37
|
-
self._maid:GiveTask(self._enabledColor)
|
|
38
|
-
|
|
39
|
-
self._disabledColor = ValueObject.new(Color3.new(1, 1, 1), "Color3")
|
|
40
|
-
self._maid:GiveTask(self._disabledColor)
|
|
41
|
-
|
|
42
|
-
self._absoluteSize = ValueObject.new(Vector2.zero, "Vector2")
|
|
43
|
-
self._maid:GiveTask(self._absoluteSize)
|
|
21
|
+
self._image = self._maid:Add(ValueObject.new("", "string"))
|
|
22
|
+
self._percent = self._maid:Add(ValueObject.new(1, "number"))
|
|
23
|
+
self._transparency = self._maid:Add(ValueObject.new(0, "number"))
|
|
24
|
+
self._enabledTransparency = self._maid:Add(ValueObject.new(0, "number"))
|
|
25
|
+
self._disabledTransparency = self._maid:Add(ValueObject.new(1, "number"))
|
|
26
|
+
self._enabledColor = self._maid:Add(ValueObject.new(Color3.new(1, 1, 1), "Color3"))
|
|
27
|
+
self._disabledColor = self._maid:Add(ValueObject.new(Color3.new(1, 1, 1), "Color3"))
|
|
28
|
+
self._absoluteSize = self._maid:Add(ValueObject.new(Vector2.zero, "Vector2"))
|
|
44
29
|
|
|
45
30
|
self._maid:GiveTask(self:_render():Subscribe(function(gui)
|
|
46
31
|
self.Gui = gui
|
|
@@ -186,116 +171,106 @@ function RadialImage:_render()
|
|
|
186
171
|
BackgroundTransparency = 1;
|
|
187
172
|
[Blend.OnChange("AbsoluteSize")] = self._absoluteSize;
|
|
188
173
|
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
174
|
+
Blend.New "UIAspectRatioConstraint" {
|
|
175
|
+
AspectRatio = 1;
|
|
176
|
+
};
|
|
177
|
+
|
|
178
|
+
Blend.New "Frame" {
|
|
179
|
+
Name = "LeftFrame";
|
|
180
|
+
Size = Blend.Computed(self._absoluteSize, function(size)
|
|
181
|
+
-- hack: ensures when we're 24.5 wide or something we don't end
|
|
182
|
+
-- up with a split in the middle.
|
|
183
|
+
-- this is an issue because clips descendants tends towards floor
|
|
184
|
+
-- pixel clipping.
|
|
185
|
+
if size.x % 2 ~= 0 then
|
|
186
|
+
return UDim2.new(0.5, 1, 1, 0);
|
|
187
|
+
else
|
|
188
|
+
return UDim2.new(0.5, 0, 1, 0);
|
|
189
|
+
end
|
|
190
|
+
end);
|
|
191
|
+
Position = UDim2.new(0, 0, 0, 0);
|
|
192
|
+
BackgroundTransparency = 1;
|
|
193
|
+
ClipsDescendants = true;
|
|
193
194
|
|
|
194
|
-
Blend.New "
|
|
195
|
-
|
|
196
|
-
Size = Blend.Computed(self._absoluteSize, function(size)
|
|
197
|
-
-- hack: ensures when we're 24.5 wide or something we don't end
|
|
198
|
-
-- up with a split in the middle.
|
|
199
|
-
-- this is an issue because clips descendants tends towards floor
|
|
200
|
-
-- pixel clipping.
|
|
201
|
-
if size.x % 2 ~= 0 then
|
|
202
|
-
return UDim2.new(0.5, 1, 1, 0);
|
|
203
|
-
else
|
|
204
|
-
return UDim2.new(0.5, 0, 1, 0);
|
|
205
|
-
end
|
|
206
|
-
end);
|
|
207
|
-
Position = UDim2.new(0, 0, 0, 0);
|
|
195
|
+
Blend.New "ImageLabel" {
|
|
196
|
+
Size = UDim2.new(2, 0, 1, 0);
|
|
208
197
|
BackgroundTransparency = 1;
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
ColorSequenceKeypoint.new(1, enabled);
|
|
240
|
-
});
|
|
241
|
-
end);
|
|
242
|
-
Rotation = Blend.Computed(self._percent, function(percent)
|
|
243
|
-
local mapped = math.clamp(Math.map(percent, 0.5, 1, 0, 1), 0, 1)
|
|
244
|
-
return mapped*180
|
|
245
|
-
end);
|
|
246
|
-
};
|
|
247
|
-
};
|
|
248
|
-
};
|
|
198
|
+
ImageTransparency = self._transparency;
|
|
199
|
+
Image = self._image;
|
|
200
|
+
|
|
201
|
+
Blend.New "UIGradient" {
|
|
202
|
+
Transparency = Blend.Computed(
|
|
203
|
+
self._enabledTransparency,
|
|
204
|
+
self._disabledTransparency,
|
|
205
|
+
function(enabled, disabled)
|
|
206
|
+
return NumberSequence.new({
|
|
207
|
+
NumberSequenceKeypoint.new(0, disabled);
|
|
208
|
+
NumberSequenceKeypoint.new(0.5, disabled);
|
|
209
|
+
NumberSequenceKeypoint.new(0.5001, enabled);
|
|
210
|
+
NumberSequenceKeypoint.new(1, enabled);
|
|
211
|
+
});
|
|
212
|
+
end);
|
|
213
|
+
Color = Blend.Computed(
|
|
214
|
+
self._enabledColor,
|
|
215
|
+
self._disabledColor,
|
|
216
|
+
function(enabled, disabled)
|
|
217
|
+
return ColorSequence.new({
|
|
218
|
+
ColorSequenceKeypoint.new(0, disabled);
|
|
219
|
+
ColorSequenceKeypoint.new(0.5, disabled);
|
|
220
|
+
ColorSequenceKeypoint.new(0.5001, enabled);
|
|
221
|
+
ColorSequenceKeypoint.new(1, enabled);
|
|
222
|
+
});
|
|
223
|
+
end);
|
|
224
|
+
Rotation = Blend.Computed(self._percent, function(percent)
|
|
225
|
+
local mapped = math.clamp(Math.map(percent, 0.5, 1, 0, 1), 0, 1)
|
|
226
|
+
return mapped*180
|
|
227
|
+
end);
|
|
249
228
|
};
|
|
250
229
|
};
|
|
230
|
+
};
|
|
251
231
|
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
232
|
+
Blend.New "Frame" {
|
|
233
|
+
Name = "RightFrame";
|
|
234
|
+
Size = UDim2.new(0.5, 0, 1, 0);
|
|
235
|
+
Position = UDim2.new(0.5, 0, 0, 0);
|
|
236
|
+
BackgroundTransparency = 1;
|
|
237
|
+
ClipsDescendants = true;
|
|
238
|
+
|
|
239
|
+
Blend.New "ImageLabel" {
|
|
240
|
+
Size = UDim2.new(2, 0, 1, 0);
|
|
241
|
+
AnchorPoint = Vector2.new(1, 0);
|
|
242
|
+
Position = UDim2.new(1, 0, 0, 0);
|
|
256
243
|
BackgroundTransparency = 1;
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
ColorSequenceKeypoint.new(0.5, disabled);
|
|
288
|
-
ColorSequenceKeypoint.new(0.5001, enabled);
|
|
289
|
-
ColorSequenceKeypoint.new(1, enabled);
|
|
290
|
-
});
|
|
291
|
-
end);
|
|
292
|
-
Rotation = Blend.Computed(self._percent, function(percent)
|
|
293
|
-
local mapped = math.clamp(Math.map(percent, 0, 0.5, 0, 1), 0, 1)
|
|
294
|
-
return 180 + mapped*180
|
|
295
|
-
end);
|
|
296
|
-
};
|
|
297
|
-
};
|
|
298
|
-
};
|
|
244
|
+
ImageTransparency = self._transparency;
|
|
245
|
+
Image = self._image;
|
|
246
|
+
|
|
247
|
+
Blend.New "UIGradient" {
|
|
248
|
+
Transparency = Blend.Computed(
|
|
249
|
+
self._enabledTransparency,
|
|
250
|
+
self._disabledTransparency,
|
|
251
|
+
function(enabled, disabled)
|
|
252
|
+
return NumberSequence.new({
|
|
253
|
+
NumberSequenceKeypoint.new(0, disabled);
|
|
254
|
+
NumberSequenceKeypoint.new(0.5, disabled);
|
|
255
|
+
NumberSequenceKeypoint.new(0.5001, enabled);
|
|
256
|
+
NumberSequenceKeypoint.new(1, enabled);
|
|
257
|
+
});
|
|
258
|
+
end);
|
|
259
|
+
Color = Blend.Computed(
|
|
260
|
+
self._enabledColor,
|
|
261
|
+
self._disabledColor,
|
|
262
|
+
function(enabled, disabled)
|
|
263
|
+
return ColorSequence.new({
|
|
264
|
+
ColorSequenceKeypoint.new(0, disabled);
|
|
265
|
+
ColorSequenceKeypoint.new(0.5, disabled);
|
|
266
|
+
ColorSequenceKeypoint.new(0.5001, enabled);
|
|
267
|
+
ColorSequenceKeypoint.new(1, enabled);
|
|
268
|
+
});
|
|
269
|
+
end);
|
|
270
|
+
Rotation = Blend.Computed(self._percent, function(percent)
|
|
271
|
+
local mapped = math.clamp(Math.map(percent, 0, 0.5, 0, 1), 0, 1)
|
|
272
|
+
return 180 + mapped*180
|
|
273
|
+
end);
|
|
299
274
|
};
|
|
300
275
|
};
|
|
301
276
|
};
|