@quenty/adorneeutils 2.1.0 → 2.1.1-canary.238.2c4d310.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,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
+ ## [2.1.1-canary.238.2c4d310.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/adorneeutils@2.1.0...@quenty/adorneeutils@2.1.1-canary.238.2c4d310.0) (2021-12-29)
7
+
8
+ **Note:** Version bump only for package @quenty/adorneeutils
9
+
10
+
11
+
12
+
13
+
6
14
  # [2.1.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/adorneeutils@2.0.0...@quenty/adorneeutils@2.1.0) (2021-09-22)
7
15
 
8
16
 
package/LICENSE.md CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2014 Quenty
3
+ Copyright (c) 2014-2021 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/README.md CHANGED
@@ -1,10 +1,10 @@
1
1
  ## AdorneeUtils
2
2
  <div align="center">
3
- <a href="http://quenty.github.io/api/">
3
+ <a href="http://quenty.github.io/NevermoreEngine/">
4
4
  <img src="https://img.shields.io/badge/docs-website-green.svg" alt="Documentation" />
5
5
  </a>
6
6
  <a href="https://discord.gg/mhtGUS8">
7
- <img src="https://img.shields.io/badge/discord-nevermore-blue.svg" alt="Discord" />
7
+ <img src="https://img.shields.io/discord/385151591524597761?color=5865F2&label=discord&logo=discord&logoColor=white" alt="Discord" />
8
8
  </a>
9
9
  <a href="https://github.com/Quenty/NevermoreEngine/actions">
10
10
  <img src="https://github.com/Quenty/NevermoreEngine/actions/workflows/build.yml/badge.svg" alt="Build and release status" />
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quenty/adorneeutils",
3
- "version": "2.1.0",
3
+ "version": "2.1.1-canary.238.2c4d310.0",
4
4
  "description": "AdorneeUtils - Generic adornee functions to make attaching to objects in Roblox easier.",
5
5
  "keywords": [
6
6
  "Roblox",
@@ -27,5 +27,5 @@
27
27
  "publishConfig": {
28
28
  "access": "public"
29
29
  },
30
- "gitHead": "6288c63115f31544fce6663d018826e81ef01c7f"
30
+ "gitHead": "2c4d310b84afd0570d89667dc5d4aa69a0ef304a"
31
31
  }
@@ -1,9 +1,15 @@
1
- ---
2
- -- @module AdorneeUtils
3
- -- @author Quenty
1
+ --[=[
2
+ Utilities involving an "Adornee" effectively, any Roblox instance
3
+ @class AdorneeUtils
4
+ ]=]
4
5
 
5
6
  local AdorneeUtils = {}
6
7
 
8
+ --[=[
9
+ Gets the center of the adornee
10
+ @param adornee Instance
11
+ @return Vector3?
12
+ ]=]
7
13
  function AdorneeUtils.getCenter(adornee)
8
14
  assert(typeof(adornee) == "Instance", "Adornee must by of type 'Instance'")
9
15
 
@@ -39,6 +45,12 @@ function AdorneeUtils.getCenter(adornee)
39
45
  end
40
46
  end
41
47
 
48
+ --[=[
49
+ Gets the bounding box of the adornee
50
+ @param adornee Instance
51
+ @return CFrame?
52
+ @return Vector3?
53
+ ]=]
42
54
  function AdorneeUtils.getBoundingBox(adornee)
43
55
  if adornee:IsA("Model") then
44
56
  return adornee:GetBoundingBox()
@@ -49,6 +61,12 @@ function AdorneeUtils.getBoundingBox(adornee)
49
61
  end
50
62
  end
51
63
 
64
+ --[=[
65
+ Returns whether a part is a part of an adornee
66
+ @param adornee Instance
67
+ @param part BasePart
68
+ @return boolean
69
+ ]=]
52
70
  function AdorneeUtils.isPartOfAdornee(adornee, part)
53
71
  assert(part:IsA("BasePart"))
54
72
 
@@ -63,6 +81,11 @@ function AdorneeUtils.isPartOfAdornee(adornee, part)
63
81
  return adornee == part or part:IsDescendantOf(adornee)
64
82
  end
65
83
 
84
+ --[=[
85
+ Retrieves all parts of an adornee
86
+ @param adornee Instance
87
+ @return { BasePart }
88
+ ]=]
66
89
  function AdorneeUtils.getParts(adornee)
67
90
  assert(typeof(adornee) == "Instance", "Adornee must by of type 'Instance'")
68
91
 
@@ -89,6 +112,11 @@ function AdorneeUtils.getParts(adornee)
89
112
  return parts
90
113
  end
91
114
 
115
+ --[=[
116
+ Retrieves a size aligned the adornee's CFrame
117
+ @param adornee Instance
118
+ @return Vector3?
119
+ ]=]
92
120
  function AdorneeUtils.getAlignedSize(adornee)
93
121
  if adornee:IsA("Model") then
94
122
  return select(2, adornee:GetBoundingBox())
@@ -108,6 +136,11 @@ function AdorneeUtils.getAlignedSize(adornee)
108
136
  return nil
109
137
  end
110
138
 
139
+ --[=[
140
+ Retrieves this adornee's "part"'s CFrame.
141
+ @param adornee Instance
142
+ @return CFrame
143
+ ]=]
111
144
  function AdorneeUtils.getPartCFrame(adornee)
112
145
  assert(typeof(adornee) == "Instance", "Adornee must by of type 'Instance'")
113
146
 
@@ -119,6 +152,11 @@ function AdorneeUtils.getPartCFrame(adornee)
119
152
  return part.CFrame
120
153
  end
121
154
 
155
+ --[=[
156
+ Retrieves this adornee's "part"'s position.
157
+ @param adornee Instance
158
+ @return Position
159
+ ]=]
122
160
  function AdorneeUtils.getPartPosition(adornee)
123
161
  assert(typeof(adornee) == "Instance", "Adornee must by of type 'Instance'")
124
162
 
@@ -130,6 +168,11 @@ function AdorneeUtils.getPartPosition(adornee)
130
168
  return part.Position
131
169
  end
132
170
 
171
+ --[=[
172
+ Retrieves this adornee's "part"'s Velocity.
173
+ @param adornee Instance
174
+ @return Vector3
175
+ ]=]
133
176
  function AdorneeUtils.getPartVelocity(adornee)
134
177
  local part = AdorneeUtils.getPart(adornee)
135
178
  if not part then
@@ -139,6 +182,11 @@ function AdorneeUtils.getPartVelocity(adornee)
139
182
  return part.Velocity
140
183
  end
141
184
 
185
+ --[=[
186
+ Retrieves this adornee's part
187
+ @param adornee Instance
188
+ @return BasePart
189
+ ]=]
142
190
  function AdorneeUtils.getPart(adornee)
143
191
  assert(typeof(adornee) == "Instance", "Adornee must by of type 'Instance'")
144
192
 
@@ -168,6 +216,11 @@ function AdorneeUtils.getPart(adornee)
168
216
  end
169
217
  end
170
218
 
219
+ --[=[
220
+ Retrieves this adornee's part on which to attach a rendering instance to
221
+ @param adornee Instance
222
+ @return Instance
223
+ ]=]
171
224
  function AdorneeUtils.getRenderAdornee(adornee)
172
225
  assert(typeof(adornee) == "Instance", "Adornee must by of type 'Instance'")
173
226