@quenty/getpercentexposedutils 3.2.0 → 3.2.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 +8 -0
- package/LICENSE.md +1 -1
- package/README.md +2 -2
- package/package.json +4 -4
- package/src/Shared/GetPercentExposedUtils.lua +12 -7
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
|
+
## [3.2.1-canary.238.2c4d310.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/getpercentexposedutils@3.2.0...@quenty/getpercentexposedutils@3.2.1-canary.238.2c4d310.0) (2021-12-29)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @quenty/getpercentexposedutils
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
# [3.2.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/getpercentexposedutils@3.1.1...@quenty/getpercentexposedutils@3.2.0) (2021-11-20)
|
|
7
15
|
|
|
8
16
|
|
package/LICENSE.md
CHANGED
package/README.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
## GetPercentExposedUtils
|
|
2
2
|
<div align="center">
|
|
3
|
-
<a href="http://quenty.github.io/
|
|
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/
|
|
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/getpercentexposedutils",
|
|
3
|
-
"version": "3.2.0",
|
|
3
|
+
"version": "3.2.1-canary.238.2c4d310.0",
|
|
4
4
|
"description": "Identify parts that are potentially exposed to an explosion using a random vector raycasting",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Roblox",
|
|
@@ -26,11 +26,11 @@
|
|
|
26
26
|
"Quenty"
|
|
27
27
|
],
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@quenty/loader": "
|
|
30
|
-
"@quenty/vector3utils": "
|
|
29
|
+
"@quenty/loader": "3.1.2-canary.238.2c4d310.0",
|
|
30
|
+
"@quenty/vector3utils": "3.2.1-canary.238.2c4d310.0"
|
|
31
31
|
},
|
|
32
32
|
"publishConfig": {
|
|
33
33
|
"access": "public"
|
|
34
34
|
},
|
|
35
|
-
"gitHead": "
|
|
35
|
+
"gitHead": "2c4d310b84afd0570d89667dc5d4aa69a0ef304a"
|
|
36
36
|
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
--[=[
|
|
2
|
+
Identify parts that are potentially exposed to an explosion using a random vector raycasting
|
|
3
|
+
@class GetPercentExposed
|
|
4
|
+
]=]
|
|
3
5
|
|
|
4
6
|
local require = require(script.Parent.loader).load(script)
|
|
5
7
|
|
|
@@ -10,10 +12,14 @@ local RandomVector3Utils = require("RandomVector3Utils")
|
|
|
10
12
|
local GetPercentExposed = {}
|
|
11
13
|
GetPercentExposed.RAY_COUNT = 314
|
|
12
14
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
--[=[
|
|
16
|
+
Searches for percent exposure of all parts given.
|
|
17
|
+
|
|
18
|
+
@param point Vector3 -- Point to search
|
|
19
|
+
@param radius number
|
|
20
|
+
@param raycaster Raycaster?
|
|
21
|
+
@return { [BasePart]: number } -- A table mapping parts to to percent exposure
|
|
22
|
+
]=]
|
|
17
23
|
function GetPercentExposed.search(point, radius, raycaster)
|
|
18
24
|
local hits = {}
|
|
19
25
|
local totalHits = 0
|
|
@@ -46,5 +52,4 @@ function GetPercentExposed.search(point, radius, raycaster)
|
|
|
46
52
|
return hits
|
|
47
53
|
end
|
|
48
54
|
|
|
49
|
-
|
|
50
55
|
return GetPercentExposed
|