@quenty/adorneeutils 2.1.0 → 2.1.2-canary.247.1597949.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,22 @@
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.2-canary.247.1597949.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/adorneeutils@2.1.1...@quenty/adorneeutils@2.1.2-canary.247.1597949.0) (2022-01-17)
7
+
8
+ **Note:** Version bump only for package @quenty/adorneeutils
9
+
10
+
11
+
12
+
13
+
14
+ ## [2.1.1](https://github.com/Quenty/NevermoreEngine/compare/@quenty/adorneeutils@2.1.0...@quenty/adorneeutils@2.1.1) (2021-12-30)
15
+
16
+ **Note:** Version bump only for package @quenty/adorneeutils
17
+
18
+
19
+
20
+
21
+
6
22
  # [2.1.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/adorneeutils@2.0.0...@quenty/adorneeutils@2.1.0) (2021-09-22)
7
23
 
8
24
 
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/">
4
- <img src="https://img.shields.io/badge/docs-website-green.svg" alt="Documentation" />
3
+ <a href="http://quenty.github.io/NevermoreEngine/">
4
+ <img src="https://github.com/Quenty/NevermoreEngine/actions/workflows/docs.yml/badge.svg" alt="Documentation status" />
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" />
@@ -13,6 +13,8 @@
13
13
 
14
14
  AdorneeUtils - Generic adornee functions to make attaching to objects in Roblox easier.
15
15
 
16
+ <div align="center"><a href="https://quenty.github.io/NevermoreEngine/api/AdorneeUtils">View docs →</a></div>
17
+
16
18
  ## Installation
17
19
  ```
18
20
  npm install @quenty/adorneeutils --save
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quenty/adorneeutils",
3
- "version": "2.1.0",
3
+ "version": "2.1.2-canary.247.1597949.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": "159794913fb32aedaf48d2a2d7808d50449f4c01"
31
31
  }
@@ -1,9 +1,18 @@
1
- ---
2
- -- @module AdorneeUtils
3
- -- @author Quenty
1
+ --[=[
2
+ Utilities involving an "Adornee" effectively, any Roblox instance. This is an extremely
3
+ useful library to use as it lets you abstract applying effects to any Roblox instance
4
+ instead of specifically switching for different Roblox types.
5
+
6
+ @class AdorneeUtils
7
+ ]=]
4
8
 
5
9
  local AdorneeUtils = {}
6
10
 
11
+ --[=[
12
+ Gets the center of the adornee
13
+ @param adornee Instance
14
+ @return Vector3?
15
+ ]=]
7
16
  function AdorneeUtils.getCenter(adornee)
8
17
  assert(typeof(adornee) == "Instance", "Adornee must by of type 'Instance'")
9
18
 
@@ -39,6 +48,12 @@ function AdorneeUtils.getCenter(adornee)
39
48
  end
40
49
  end
41
50
 
51
+ --[=[
52
+ Gets the bounding box of the adornee
53
+ @param adornee Instance
54
+ @return CFrame?
55
+ @return Vector3?
56
+ ]=]
42
57
  function AdorneeUtils.getBoundingBox(adornee)
43
58
  if adornee:IsA("Model") then
44
59
  return adornee:GetBoundingBox()
@@ -49,6 +64,12 @@ function AdorneeUtils.getBoundingBox(adornee)
49
64
  end
50
65
  end
51
66
 
67
+ --[=[
68
+ Returns whether a part is a part of an adornee
69
+ @param adornee Instance
70
+ @param part BasePart
71
+ @return boolean
72
+ ]=]
52
73
  function AdorneeUtils.isPartOfAdornee(adornee, part)
53
74
  assert(part:IsA("BasePart"))
54
75
 
@@ -63,6 +84,11 @@ function AdorneeUtils.isPartOfAdornee(adornee, part)
63
84
  return adornee == part or part:IsDescendantOf(adornee)
64
85
  end
65
86
 
87
+ --[=[
88
+ Retrieves all parts of an adornee
89
+ @param adornee Instance
90
+ @return { BasePart }
91
+ ]=]
66
92
  function AdorneeUtils.getParts(adornee)
67
93
  assert(typeof(adornee) == "Instance", "Adornee must by of type 'Instance'")
68
94
 
@@ -89,6 +115,11 @@ function AdorneeUtils.getParts(adornee)
89
115
  return parts
90
116
  end
91
117
 
118
+ --[=[
119
+ Retrieves a size aligned the adornee's CFrame
120
+ @param adornee Instance
121
+ @return Vector3?
122
+ ]=]
92
123
  function AdorneeUtils.getAlignedSize(adornee)
93
124
  if adornee:IsA("Model") then
94
125
  return select(2, adornee:GetBoundingBox())
@@ -108,6 +139,11 @@ function AdorneeUtils.getAlignedSize(adornee)
108
139
  return nil
109
140
  end
110
141
 
142
+ --[=[
143
+ Retrieves this adornee's "part"'s CFrame.
144
+ @param adornee Instance
145
+ @return CFrame
146
+ ]=]
111
147
  function AdorneeUtils.getPartCFrame(adornee)
112
148
  assert(typeof(adornee) == "Instance", "Adornee must by of type 'Instance'")
113
149
 
@@ -119,6 +155,11 @@ function AdorneeUtils.getPartCFrame(adornee)
119
155
  return part.CFrame
120
156
  end
121
157
 
158
+ --[=[
159
+ Retrieves this adornee's "part"'s position.
160
+ @param adornee Instance
161
+ @return Position
162
+ ]=]
122
163
  function AdorneeUtils.getPartPosition(adornee)
123
164
  assert(typeof(adornee) == "Instance", "Adornee must by of type 'Instance'")
124
165
 
@@ -130,6 +171,11 @@ function AdorneeUtils.getPartPosition(adornee)
130
171
  return part.Position
131
172
  end
132
173
 
174
+ --[=[
175
+ Retrieves this adornee's "part"'s Velocity.
176
+ @param adornee Instance
177
+ @return Vector3
178
+ ]=]
133
179
  function AdorneeUtils.getPartVelocity(adornee)
134
180
  local part = AdorneeUtils.getPart(adornee)
135
181
  if not part then
@@ -139,6 +185,11 @@ function AdorneeUtils.getPartVelocity(adornee)
139
185
  return part.Velocity
140
186
  end
141
187
 
188
+ --[=[
189
+ Retrieves this adornee's part
190
+ @param adornee Instance
191
+ @return BasePart
192
+ ]=]
142
193
  function AdorneeUtils.getPart(adornee)
143
194
  assert(typeof(adornee) == "Instance", "Adornee must by of type 'Instance'")
144
195
 
@@ -168,6 +219,11 @@ function AdorneeUtils.getPart(adornee)
168
219
  end
169
220
  end
170
221
 
222
+ --[=[
223
+ Retrieves this adornee's part on which to attach a rendering instance to
224
+ @param adornee Instance
225
+ @return Instance
226
+ ]=]
171
227
  function AdorneeUtils.getRenderAdornee(adornee)
172
228
  assert(typeof(adornee) == "Instance", "Adornee must by of type 'Instance'")
173
229