@quenty/colorpalette 5.1.0 → 5.1.2-canary.433.80025dc.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 +19 -0
- package/package.json +13 -13
- package/src/Shared/ColorPalette.lua +4 -11
- package/src/Shared/Grade/ColorGradePalette.lua +4 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,25 @@
|
|
|
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
|
+
## [5.1.2-canary.433.80025dc.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/colorpalette@5.1.1...@quenty/colorpalette@5.1.2-canary.433.80025dc.0) (2023-12-14)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* Allow grades of raw numbers to be passed in ([a4e291a](https://github.com/Quenty/NevermoreEngine/commit/a4e291a78d09ad498bd7646471bd2e43527cb541))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## [5.1.1](https://github.com/Quenty/NevermoreEngine/compare/@quenty/colorpalette@5.1.0...@quenty/colorpalette@5.1.1) (2023-10-28)
|
|
18
|
+
|
|
19
|
+
**Note:** Version bump only for package @quenty/colorpalette
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
6
25
|
# [5.1.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/colorpalette@5.0.0...@quenty/colorpalette@5.1.0) (2023-10-18)
|
|
7
26
|
|
|
8
27
|
**Note:** Version bump only for package @quenty/colorpalette
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quenty/colorpalette",
|
|
3
|
-
"version": "5.1.0",
|
|
3
|
+
"version": "5.1.2-canary.433.80025dc.0",
|
|
4
4
|
"description": "Color palette system for Roblox",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Roblox",
|
|
@@ -28,17 +28,17 @@
|
|
|
28
28
|
"access": "public"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@quenty/baseobject": "
|
|
32
|
-
"@quenty/blend": "
|
|
33
|
-
"@quenty/color3utils": "
|
|
34
|
-
"@quenty/colorpicker": "
|
|
35
|
-
"@quenty/loader": "
|
|
36
|
-
"@quenty/maid": "
|
|
37
|
-
"@quenty/math": "
|
|
38
|
-
"@quenty/rx": "
|
|
39
|
-
"@quenty/signal": "
|
|
40
|
-
"@quenty/table": "
|
|
41
|
-
"@quenty/valueobject": "
|
|
31
|
+
"@quenty/baseobject": "7.0.1-canary.433.80025dc.0",
|
|
32
|
+
"@quenty/blend": "7.1.2-canary.433.80025dc.0",
|
|
33
|
+
"@quenty/color3utils": "6.1.2-canary.433.80025dc.0",
|
|
34
|
+
"@quenty/colorpicker": "5.1.2-canary.433.80025dc.0",
|
|
35
|
+
"@quenty/loader": "7.0.1-canary.433.80025dc.0",
|
|
36
|
+
"@quenty/maid": "2.6.0",
|
|
37
|
+
"@quenty/math": "2.5.0",
|
|
38
|
+
"@quenty/rx": "8.1.2-canary.433.80025dc.0",
|
|
39
|
+
"@quenty/signal": "3.0.1-canary.433.80025dc.0",
|
|
40
|
+
"@quenty/table": "3.3.1-canary.433.80025dc.0",
|
|
41
|
+
"@quenty/valueobject": "8.1.2-canary.433.80025dc.0"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "80025dcd926765b502d322bb84e013b973409d8c"
|
|
44
44
|
}
|
|
@@ -24,17 +24,10 @@ ColorPalette.__index = ColorPalette
|
|
|
24
24
|
function ColorPalette.new()
|
|
25
25
|
local self = setmetatable(BaseObject.new(), ColorPalette)
|
|
26
26
|
|
|
27
|
-
self._gradePalette = ColorGradePalette.new()
|
|
28
|
-
self._maid:
|
|
29
|
-
|
|
30
|
-
self.
|
|
31
|
-
self._maid:GiveTask(self._gradeMaid)
|
|
32
|
-
|
|
33
|
-
self._colorMaid = Maid.new()
|
|
34
|
-
self._maid:GiveTask(self._colorMaid)
|
|
35
|
-
|
|
36
|
-
self._vividMaid = Maid.new()
|
|
37
|
-
self._maid:GiveTask(self._vividMaid)
|
|
27
|
+
self._gradePalette = self._maid:Add(ColorGradePalette.new())
|
|
28
|
+
self._gradeMaid = self._maid:Add(Maid.new())
|
|
29
|
+
self._colorMaid = self._maid:Add(Maid.new())
|
|
30
|
+
self._vividMaid = self._maid:Add(Maid.new())
|
|
38
31
|
|
|
39
32
|
self._swatches = {}
|
|
40
33
|
self._colorValues = {}
|
|
@@ -123,6 +123,7 @@ function ColorGradePalette:ObserveModified(gradeName, amount, multiplier)
|
|
|
123
123
|
assert(type(state.amount) == "number", "Bad state.amount")
|
|
124
124
|
assert(type(state.multiplier) == "number", "Bad state.multiplier")
|
|
125
125
|
|
|
126
|
+
|
|
126
127
|
return state.grade + state.multiplier*state.amount
|
|
127
128
|
end);
|
|
128
129
|
})
|
|
@@ -164,7 +165,9 @@ function ColorGradePalette:ObserveOn(gradeName, newSurfaceName, baseSurfaceName)
|
|
|
164
165
|
end
|
|
165
166
|
|
|
166
167
|
function ColorGradePalette:_observeGradeFromName(gradeName)
|
|
167
|
-
if
|
|
168
|
+
if type(gradeName) == "number" then
|
|
169
|
+
return Rx.of(gradeName)
|
|
170
|
+
elseif typeof(gradeName) == "Color3" then
|
|
168
171
|
return Rx.of(ColorGradeUtils.getGrade(gradeName))
|
|
169
172
|
elseif Observable.isObservable(gradeName) then
|
|
170
173
|
return gradeName:Pipe({
|