@quenty/radial-image 9.5.2-canary.497.496fc5b.0 → 9.5.2

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 CHANGED
@@ -3,7 +3,7 @@
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.2-canary.497.496fc5b.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/radial-image@9.5.1...@quenty/radial-image@9.5.2-canary.497.496fc5b.0) (2024-09-20)
6
+ ## [9.5.2](https://github.com/Quenty/NevermoreEngine/compare/@quenty/radial-image@9.5.1...@quenty/radial-image@9.5.2) (2024-09-22)
7
7
 
8
8
  **Note:** Version bump only for package @quenty/radial-image
9
9
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quenty/radial-image",
3
- "version": "9.5.2-canary.497.496fc5b.0",
3
+ "version": "9.5.2",
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": "10.4.1-canary.497.496fc5b.0",
30
- "@quenty/blend": "12.5.2-canary.497.496fc5b.0",
31
- "@quenty/loader": "10.4.1-canary.497.496fc5b.0",
32
- "@quenty/maid": "3.3.0",
33
- "@quenty/math": "2.7.0",
34
- "@quenty/rx": "13.5.1-canary.497.496fc5b.0",
35
- "@quenty/valueobject": "13.5.1-canary.497.496fc5b.0"
29
+ "@quenty/baseobject": "^10.4.0",
30
+ "@quenty/blend": "^12.5.2",
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": "496fc5bb230a226ec6c86a8dfd025b8e326d92d8"
40
+ "gitHead": "1cd1ee70499c9c4a52465d2e5125732b8a10cb27"
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:GiveTask(self._image)
23
-
24
- self._percent = ValueObject.new(1, "number")
25
- self._maid:GiveTask(self._percent)
26
-
27
- self._transparency = ValueObject.new(0, "number")
28
- self._maid:GiveTask(self._transparency)
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
- [Blend.Children] = {
190
- Blend.New "UIAspectRatioConstraint" {
191
- AspectRatio = 1;
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 "Frame" {
195
- Name = "LeftFrame";
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
- ClipsDescendants = true;
210
-
211
- [Blend.Children] = {
212
- Blend.New "ImageLabel" {
213
- Size = UDim2.new(2, 0, 1, 0);
214
- BackgroundTransparency = 1;
215
- ImageTransparency = self._transparency;
216
- Image = self._image;
217
-
218
- [Blend.Children] = {
219
- Blend.New "UIGradient" {
220
- Transparency = Blend.Computed(
221
- self._enabledTransparency,
222
- self._disabledTransparency,
223
- function(enabled, disabled)
224
- return NumberSequence.new({
225
- NumberSequenceKeypoint.new(0, disabled);
226
- NumberSequenceKeypoint.new(0.5, disabled);
227
- NumberSequenceKeypoint.new(0.5001, enabled);
228
- NumberSequenceKeypoint.new(1, enabled);
229
- });
230
- end);
231
- Color = Blend.Computed(
232
- self._enabledColor,
233
- self._disabledColor,
234
- function(enabled, disabled)
235
- return ColorSequence.new({
236
- ColorSequenceKeypoint.new(0, disabled);
237
- ColorSequenceKeypoint.new(0.5, disabled);
238
- ColorSequenceKeypoint.new(0.5001, enabled);
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
- Blend.New "Frame" {
253
- Name = "RightFrame";
254
- Size = UDim2.new(0.5, 0, 1, 0);
255
- Position = UDim2.new(0.5, 0, 0, 0);
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
- ClipsDescendants = true;
258
-
259
- [Blend.Children] = {
260
- Blend.New "ImageLabel" {
261
- Size = UDim2.new(2, 0, 1, 0);
262
- AnchorPoint = Vector2.new(1, 0);
263
- Position = UDim2.new(1, 0, 0, 0);
264
- BackgroundTransparency = 1;
265
- ImageTransparency = self._transparency;
266
- Image = self._image;
267
-
268
- [Blend.Children] = {
269
- Blend.New "UIGradient" {
270
- Transparency = Blend.Computed(
271
- self._enabledTransparency,
272
- self._disabledTransparency,
273
- function(enabled, disabled)
274
- return NumberSequence.new({
275
- NumberSequenceKeypoint.new(0, disabled);
276
- NumberSequenceKeypoint.new(0.5, disabled);
277
- NumberSequenceKeypoint.new(0.5001, enabled);
278
- NumberSequenceKeypoint.new(1, enabled);
279
- });
280
- end);
281
- Color = Blend.Computed(
282
- self._enabledColor,
283
- self._disabledColor,
284
- function(enabled, disabled)
285
- return ColorSequence.new({
286
- ColorSequenceKeypoint.new(0, disabled);
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
  };