@quenty/blend 12.3.1-canary.478.013677d.0 → 12.3.1-canary.478.34e8ede.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 CHANGED
@@ -3,7 +3,12 @@
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
- ## [12.3.1-canary.478.013677d.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/blend@12.3.0...@quenty/blend@12.3.1-canary.478.013677d.0) (2024-08-24)
6
+ ## [12.3.1-canary.478.34e8ede.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/blend@12.3.0...@quenty/blend@12.3.1-canary.478.34e8ede.0) (2024-08-27)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * Fix some spring object stuff ([34e8ede](https://github.com/Quenty/NevermoreEngine/commit/34e8edee97fa93a0a5bd84442b85826082444f2a))
7
12
 
8
13
 
9
14
  ### Features
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quenty/blend",
3
- "version": "12.3.1-canary.478.013677d.0",
3
+ "version": "12.3.1-canary.478.34e8ede.0",
4
4
  "description": "Declarative UI system.",
5
5
  "keywords": [
6
6
  "Roblox",
@@ -27,24 +27,24 @@
27
27
  "access": "public"
28
28
  },
29
29
  "dependencies": {
30
- "@quenty/acceltween": "2.4.1-canary.478.013677d.0",
31
- "@quenty/brio": "14.3.1-canary.478.013677d.0",
32
- "@quenty/ducktype": "5.3.1-canary.478.013677d.0",
33
- "@quenty/instanceutils": "13.3.1-canary.478.013677d.0",
34
- "@quenty/loader": "10.3.1-canary.478.013677d.0",
30
+ "@quenty/acceltween": "2.4.1-canary.478.34e8ede.0",
31
+ "@quenty/brio": "14.3.1-canary.478.34e8ede.0",
32
+ "@quenty/ducktype": "5.3.1-canary.478.34e8ede.0",
33
+ "@quenty/instanceutils": "13.3.1-canary.478.34e8ede.0",
34
+ "@quenty/loader": "10.3.1-canary.478.34e8ede.0",
35
35
  "@quenty/maid": "3.2.0",
36
- "@quenty/promise": "10.3.1-canary.478.013677d.0",
37
- "@quenty/rx": "13.3.1-canary.478.013677d.0",
38
- "@quenty/signal": "7.3.1-canary.478.013677d.0",
39
- "@quenty/spring": "10.3.1-canary.478.013677d.0",
36
+ "@quenty/promise": "10.3.1-canary.478.34e8ede.0",
37
+ "@quenty/rx": "13.3.1-canary.478.34e8ede.0",
38
+ "@quenty/signal": "7.3.1-canary.478.34e8ede.0",
39
+ "@quenty/spring": "10.3.1-canary.478.34e8ede.0",
40
40
  "@quenty/steputils": "3.4.0",
41
41
  "@quenty/string": "3.2.0",
42
- "@quenty/valuebaseutils": "13.3.1-canary.478.013677d.0",
43
- "@quenty/valueobject": "13.3.1-canary.478.013677d.0"
42
+ "@quenty/valuebaseutils": "13.3.1-canary.478.34e8ede.0",
43
+ "@quenty/valueobject": "13.3.1-canary.478.34e8ede.0"
44
44
  },
45
45
  "devDependencies": {
46
- "@quenty/contentproviderutils": "12.3.1-canary.478.013677d.0",
47
- "@quenty/playerthumbnailutils": "10.3.1-canary.478.013677d.0"
46
+ "@quenty/contentproviderutils": "12.3.1-canary.478.34e8ede.0",
47
+ "@quenty/playerthumbnailutils": "10.3.1-canary.478.34e8ede.0"
48
48
  },
49
- "gitHead": "013677ddf1f34b223c027d332d00450722b8fd41"
49
+ "gitHead": "34e8edee97fa93a0a5bd84442b85826082444f2a"
50
50
  }
@@ -45,7 +45,7 @@ function SpringObject.new(target, speed, damper)
45
45
  self._maid:GiveTask(self.Changed)
46
46
 
47
47
  if target then
48
- self.Target = target
48
+ self:SetTarget(target)
49
49
  else
50
50
  self:_getSpringForType(0)
51
51
  end
@@ -287,8 +287,10 @@ function SpringObject:__index(index)
287
287
  return self._epsilon
288
288
  elseif SpringObject[index] then
289
289
  return SpringObject[index]
290
+ elseif index == "_currentSpring" then
291
+ return rawget(self, "_currentSpring")
290
292
  else
291
- error(("%q is not a member of SpringObject"):format(tostring(index)))
293
+ error(string.format("%q is not a member of SpringObject", tostring(index)))
292
294
  end
293
295
  end
294
296
 
@@ -323,6 +325,7 @@ function SpringObject:__newindex(index, value)
323
325
  end)
324
326
  elseif index == "Speed" or index == "s" then
325
327
  local observable = assert(Blend.toNumberObservable(value), "Invalid speed")
328
+ assert(self._currentSpring, "No self._currentSpring")
326
329
 
327
330
  self._maid._speedSub = observable:Subscribe(function(unconverted)
328
331
  assert(type(unconverted) == "number", "Bad damper")
@@ -337,15 +340,22 @@ function SpringObject:__newindex(index, value)
337
340
  assert(type(value) == "function", "Bad clock value")
338
341
  self._currentSpring.Clock = value
339
342
  self.Changed:Fire()
343
+ elseif index == "_currentSpring" then
344
+ rawset(self, "_currentSpring", value)
340
345
  else
341
- error(("%q is not a member of SpringObject"):format(tostring(index)))
346
+ error(string.format("%q is not a member of SpringObject", tostring(index)))
342
347
  end
343
348
  end
344
349
 
350
+ function SpringObject:_ensureSpringOrInitSpring()
351
+
352
+ end
353
+
345
354
  function SpringObject:_getSpringForType(converted)
346
355
  if rawget(self, "_currentSpring") == nil then
347
356
  -- only happens on init
348
- rawset(self, "_currentSpring", Spring.new(converted))
357
+ local created = Spring.new(converted)
358
+ rawset(self, "_currentSpring", created)
349
359
  return self._currentSpring
350
360
  else
351
361
  local currentType = typeof(SpringUtils.fromLinearIfNeeded(self._currentSpring.Value))