@quenty/r15utils 4.1.1-canary.256.edbbcfc.0 → 5.0.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,18 @@
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
- ## [4.1.1-canary.256.edbbcfc.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/r15utils@4.1.0...@quenty/r15utils@4.1.1-canary.256.edbbcfc.0) (2022-03-27)
6
+ # [5.0.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/r15utils@4.2.0...@quenty/r15utils@5.0.0) (2022-05-21)
7
+
8
+
9
+ ### Features
10
+
11
+ * Add RxR15Utils.observeRigMotorBrio() and RxR15Utils.observeCharacterPart() ([5931f10](https://github.com/Quenty/NevermoreEngine/commit/5931f101809a19a0352eb124919a08fe8609dba1))
12
+
13
+
14
+
15
+
16
+
17
+ # [4.2.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/r15utils@4.1.0...@quenty/r15utils@4.2.0) (2022-03-27)
7
18
 
8
19
  **Note:** Version bump only for package @quenty/r15utils
9
20
 
package/LICENSE.md CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2014-2021 Quenty
3
+ Copyright (c) 2014-2022 Quenty
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quenty/r15utils",
3
- "version": "4.1.1-canary.256.edbbcfc.0",
3
+ "version": "5.0.0",
4
4
  "description": "Utility methods for R15",
5
5
  "keywords": [
6
6
  "Roblox",
@@ -25,12 +25,12 @@
25
25
  "Quenty"
26
26
  ],
27
27
  "dependencies": {
28
- "@quenty/brio": "5.1.1-canary.256.edbbcfc.0",
29
- "@quenty/instanceutils": "4.1.1-canary.256.edbbcfc.0",
30
- "@quenty/loader": "4.0.1-canary.256.edbbcfc.0"
28
+ "@quenty/brio": "^6.0.0",
29
+ "@quenty/instanceutils": "^5.0.0",
30
+ "@quenty/loader": "^5.0.0"
31
31
  },
32
32
  "publishConfig": {
33
33
  "access": "public"
34
34
  },
35
- "gitHead": "edbbcfc38516772a791d50dc43cd6b304ffc4aff"
35
+ "gitHead": "9f7eaea7543c33c89d2e32c38491b13f9271f4f7"
36
36
  }
@@ -1,4 +1,5 @@
1
1
  --[=[
2
+ Utility methods to query components of an R15 character.
2
3
  @class RxR15Utils
3
4
  ]=]
4
5
 
@@ -9,12 +10,19 @@ local RxBrioUtils = require("RxBrioUtils")
9
10
 
10
11
  local RxR15Utils = {}
11
12
 
13
+ --[=[
14
+ Observes a rig attachment as a brio
15
+ @param character Model
16
+ @param partName string
17
+ @param attachmentName string
18
+ @return Observable<Brio<Attachment>>
19
+ ]=]
12
20
  function RxR15Utils.observeRigAttachmentBrio(character, partName, attachmentName)
13
21
  assert(typeof(character) == "Instance", "Bad character")
14
22
  assert(type(partName) == "string", "Bad partName")
15
23
  assert(type(attachmentName) == "string", "Bad attachmentName")
16
24
 
17
- return RxInstanceUtils.observeLastNamedChildBrio(character, "BasePart", partName)
25
+ return RxR15Utils.observeCharacterPart(character, partName)
18
26
  :Pipe({
19
27
  RxBrioUtils.switchMapBrio(function(part)
20
28
  return RxInstanceUtils.observeLastNamedChildBrio(part, "Attachment", attachmentName)
@@ -22,4 +30,37 @@ function RxR15Utils.observeRigAttachmentBrio(character, partName, attachmentName
22
30
  })
23
31
  end
24
32
 
33
+ --[=[
34
+ Observes a rig motor as a brio
35
+ @param character Model
36
+ @param partName string
37
+ @param motorName string
38
+ @return Observable<Brio<Motor6D>>
39
+ ]=]
40
+ function RxR15Utils.observeRigMotorBrio(character, partName, motorName)
41
+ assert(typeof(character) == "Instance", "Bad character")
42
+ assert(type(partName) == "string", "Bad partName")
43
+ assert(type(motorName) == "string", "Bad motorName")
44
+
45
+ return RxInstanceUtils.observeLastNamedChildBrio(character, "BasePart", partName)
46
+ :Pipe({
47
+ RxBrioUtils.switchMapBrio(function(part)
48
+ return RxInstanceUtils.observeLastNamedChildBrio(part, "Motor6D", motorName)
49
+ end);
50
+ })
51
+ end
52
+
53
+ --[=[
54
+ Observes a rig motor as a brio
55
+ @param character Model
56
+ @param partName string
57
+ @return Observable<Brio<BasePart>>
58
+ ]=]
59
+ function RxR15Utils.observeCharacterPart(character, partName)
60
+ assert(typeof(character) == "Instance", "Bad character")
61
+ assert(type(partName) == "string", "Bad partName")
62
+
63
+ return RxInstanceUtils.observeLastNamedChildBrio(character, "BasePart", partName)
64
+ end
65
+
25
66
  return RxR15Utils