@quenty/modelappearance 10.8.1 → 10.8.2
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 +11 -0
- package/package.json +4 -4
- package/src/Shared/ModelAppearance.lua +11 -11
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
|
+
## [10.8.2](https://github.com/Quenty/NevermoreEngine/compare/@quenty/modelappearance@10.8.1...@quenty/modelappearance@10.8.2) (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
|
## [10.8.1](https://github.com/Quenty/NevermoreEngine/compare/@quenty/modelappearance@10.8.0...@quenty/modelappearance@10.8.1) (2025-03-21)
|
|
7
18
|
|
|
8
19
|
**Note:** Version bump only for package @quenty/modelappearance
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quenty/modelappearance",
|
|
3
|
-
"version": "10.8.
|
|
3
|
+
"version": "10.8.2",
|
|
4
4
|
"description": "Allows the appearance of a model to be overridden. Most commonly used when placing down an object in a building game.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Roblox",
|
|
@@ -25,11 +25,11 @@
|
|
|
25
25
|
"Quenty"
|
|
26
26
|
],
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@quenty/loader": "^10.8.
|
|
29
|
-
"@quenty/math": "^2.7.
|
|
28
|
+
"@quenty/loader": "^10.8.1",
|
|
29
|
+
"@quenty/math": "^2.7.2"
|
|
30
30
|
},
|
|
31
31
|
"publishConfig": {
|
|
32
32
|
"access": "public"
|
|
33
33
|
},
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "78c3ac0ab08dd18085b6e6e6e4f745e76ed99f68"
|
|
35
35
|
}
|
|
@@ -20,7 +20,7 @@ function ModelAppearance.new(model)
|
|
|
20
20
|
self._interactions = {}
|
|
21
21
|
self._seats = {}
|
|
22
22
|
|
|
23
|
-
for _, part in
|
|
23
|
+
for _, part in model:GetDescendants() do
|
|
24
24
|
if part:IsA("BasePart") then
|
|
25
25
|
self._parts[part] = {
|
|
26
26
|
Transparency = part.Transparency;
|
|
@@ -46,18 +46,18 @@ end
|
|
|
46
46
|
|
|
47
47
|
-- Destructive, cannot be reverted
|
|
48
48
|
function ModelAppearance:DisableInteractions()
|
|
49
|
-
for _, item in
|
|
49
|
+
for _, item in self._interactions do
|
|
50
50
|
item:Destroy()
|
|
51
51
|
end
|
|
52
52
|
self._interactions = {}
|
|
53
|
-
for seat, _ in
|
|
53
|
+
for seat, _ in self._seats do
|
|
54
54
|
seat.Disabled = true
|
|
55
55
|
end
|
|
56
56
|
|
|
57
57
|
self:SetCanCollide(false)
|
|
58
58
|
end
|
|
59
59
|
|
|
60
|
-
function ModelAppearance:SetCanCollide(canCollide)
|
|
60
|
+
function ModelAppearance:SetCanCollide(canCollide: boolean)
|
|
61
61
|
assert(type(canCollide) == "boolean", "Bad canCollide")
|
|
62
62
|
|
|
63
63
|
if self._canCollide == canCollide then
|
|
@@ -65,7 +65,7 @@ function ModelAppearance:SetCanCollide(canCollide)
|
|
|
65
65
|
end
|
|
66
66
|
|
|
67
67
|
self._canCollide = canCollide
|
|
68
|
-
for part, properties in
|
|
68
|
+
for part, properties in self._parts do
|
|
69
69
|
part.CanCollide = properties.CanCollide and canCollide
|
|
70
70
|
end
|
|
71
71
|
end
|
|
@@ -80,7 +80,7 @@ function ModelAppearance:SetTransparency(transparency)
|
|
|
80
80
|
end
|
|
81
81
|
|
|
82
82
|
self._transparency = transparency
|
|
83
|
-
for part, properties in
|
|
83
|
+
for part, properties in self._parts do
|
|
84
84
|
part.Transparency = Math.map(transparency, 0, 1, properties.Transparency, 1)
|
|
85
85
|
end
|
|
86
86
|
end
|
|
@@ -91,7 +91,7 @@ function ModelAppearance:ResetTransparency()
|
|
|
91
91
|
end
|
|
92
92
|
|
|
93
93
|
self._transparency = nil
|
|
94
|
-
for part, properties in
|
|
94
|
+
for part, properties in self._parts do
|
|
95
95
|
part.Transparency = properties.Transparency
|
|
96
96
|
end
|
|
97
97
|
end
|
|
@@ -104,7 +104,7 @@ function ModelAppearance:SetColor(color)
|
|
|
104
104
|
end
|
|
105
105
|
|
|
106
106
|
self._color = color
|
|
107
|
-
for part, _ in
|
|
107
|
+
for part, _ in self._parts do
|
|
108
108
|
part.Color = color
|
|
109
109
|
|
|
110
110
|
if part:IsA("PartOperation") then
|
|
@@ -119,7 +119,7 @@ function ModelAppearance:ResetColor()
|
|
|
119
119
|
end
|
|
120
120
|
|
|
121
121
|
self._color = nil
|
|
122
|
-
for part, properties in
|
|
122
|
+
for part, properties in self._parts do
|
|
123
123
|
part.Color = properties.Color
|
|
124
124
|
|
|
125
125
|
if part:IsA("PartOperation") then
|
|
@@ -134,7 +134,7 @@ function ModelAppearance:ResetMaterial()
|
|
|
134
134
|
end
|
|
135
135
|
|
|
136
136
|
self._material = nil
|
|
137
|
-
for part, properties in
|
|
137
|
+
for part, properties in self._parts do
|
|
138
138
|
part.Material = properties.Material
|
|
139
139
|
end
|
|
140
140
|
end
|
|
@@ -145,7 +145,7 @@ function ModelAppearance:SetMaterial(material)
|
|
|
145
145
|
end
|
|
146
146
|
|
|
147
147
|
self._material = material
|
|
148
|
-
for part, _ in
|
|
148
|
+
for part, _ in self._parts do
|
|
149
149
|
part.Material = material
|
|
150
150
|
end
|
|
151
151
|
end
|