@quenty/physicsutils 8.17.0 → 8.17.1-canary.545.2374fb2.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,6 +3,17 @@
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
+ ## [8.17.1-canary.545.2374fb2.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/physicsutils@8.17.0...@quenty/physicsutils@8.17.1-canary.545.2374fb2.0) (2025-04-05)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * Add types to packages ([2374fb2](https://github.com/Quenty/NevermoreEngine/commit/2374fb2b043cfbe0e9b507b3316eec46a4e353a0))
12
+
13
+
14
+
15
+
16
+
6
17
  # [8.17.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/physicsutils@8.16.2...@quenty/physicsutils@8.17.0) (2025-04-02)
7
18
 
8
19
  **Note:** Version bump only for package @quenty/physicsutils
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quenty/physicsutils",
3
- "version": "8.17.0",
3
+ "version": "8.17.1-canary.545.2374fb2.0",
4
4
  "description": "General physics library for use on Roblox",
5
5
  "keywords": [
6
6
  "Roblox",
@@ -28,9 +28,9 @@
28
28
  "access": "public"
29
29
  },
30
30
  "dependencies": {
31
- "@quenty/loader": "^10.8.0",
32
- "@quenty/maid": "^3.4.0",
33
- "@quenty/rx": "^13.17.0"
31
+ "@quenty/loader": "10.8.1-canary.545.2374fb2.0",
32
+ "@quenty/maid": "3.4.1-canary.545.2374fb2.0",
33
+ "@quenty/rx": "13.17.1-canary.545.2374fb2.0"
34
34
  },
35
- "gitHead": "e8ea56930e65322fcffc05a1556d5df988068f0b"
35
+ "gitHead": "2374fb2b043cfbe0e9b507b3316eec46a4e353a0"
36
36
  }
@@ -68,11 +68,11 @@ end
68
68
  ]=]
69
69
  function PhysicsUtils.getCenterOfMass(parts: { BasePart }): (Vector3, number)
70
70
  local mass = 0
71
- local weightedSum = Vector3.zero
71
+ local weightedSum: Vector3 = Vector3.zero
72
72
 
73
73
  for _, part in parts do
74
74
  mass = mass + part:GetMass()
75
- weightedSum = weightedSum + part:GetMass() * part.Position
75
+ weightedSum += part:GetMass() * part.Position
76
76
  end
77
77
 
78
78
  return weightedSum / mass, mass
@@ -1,3 +1,4 @@
1
+ --!strict
1
2
  --[=[
2
3
  @class RxPhysicsUtils
3
4
  ]=]
@@ -9,7 +10,7 @@ local Maid = require("Maid")
9
10
 
10
11
  local RxPhysicsUtils = {}
11
12
 
12
- function RxPhysicsUtils.observePartMass(part)
13
+ function RxPhysicsUtils.observePartMass(part: BasePart): Observable.Observable<number>
13
14
  assert(typeof(part) == "Instance" and part:IsA("BasePart"), "Bad part")
14
15
 
15
16
  return Observable.new(function(sub)
@@ -38,7 +39,7 @@ function RxPhysicsUtils.observePartMass(part)
38
39
  update()
39
40
 
40
41
  return maid
41
- end)
42
+ end) :: any
42
43
  end
43
44
 
44
45
  return RxPhysicsUtils