@quenty/depthoffield 11.19.2 → 11.19.3
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/package.json +15 -15
- package/src/Client/DepthOfFieldEffect.lua +34 -17
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
|
+
## [11.19.3](https://github.com/Quenty/NevermoreEngine/compare/@quenty/depthoffield@11.19.2...@quenty/depthoffield@11.19.3) (2025-04-10)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @quenty/depthoffield
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
## [11.19.2](https://github.com/Quenty/NevermoreEngine/compare/@quenty/depthoffield@11.19.0...@quenty/depthoffield@11.19.2) (2025-04-07)
|
|
7
15
|
|
|
8
16
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quenty/depthoffield",
|
|
3
|
-
"version": "11.19.
|
|
3
|
+
"version": "11.19.3",
|
|
4
4
|
"description": "Depth of field service to allow multiple systems to write depth of field",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Roblox",
|
|
@@ -25,24 +25,24 @@
|
|
|
25
25
|
"Quenty"
|
|
26
26
|
],
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@quenty/acceltween": "^2.5.
|
|
29
|
-
"@quenty/attributeutils": "^14.17.
|
|
30
|
-
"@quenty/baseobject": "^10.8.
|
|
31
|
-
"@quenty/basicpane": "^13.17.
|
|
32
|
-
"@quenty/blend": "^12.18.
|
|
33
|
-
"@quenty/brio": "^14.17.
|
|
34
|
-
"@quenty/instanceutils": "^13.17.
|
|
35
|
-
"@quenty/loader": "^10.8.
|
|
36
|
-
"@quenty/maid": "^3.4.
|
|
28
|
+
"@quenty/acceltween": "^2.5.3",
|
|
29
|
+
"@quenty/attributeutils": "^14.17.3",
|
|
30
|
+
"@quenty/baseobject": "^10.8.3",
|
|
31
|
+
"@quenty/basicpane": "^13.17.3",
|
|
32
|
+
"@quenty/blend": "^12.18.3",
|
|
33
|
+
"@quenty/brio": "^14.17.3",
|
|
34
|
+
"@quenty/instanceutils": "^13.17.3",
|
|
35
|
+
"@quenty/loader": "^10.8.3",
|
|
36
|
+
"@quenty/maid": "^3.4.3",
|
|
37
37
|
"@quenty/math": "^2.7.3",
|
|
38
|
-
"@quenty/rx": "^13.17.
|
|
39
|
-
"@quenty/signal": "^7.10.
|
|
38
|
+
"@quenty/rx": "^13.17.3",
|
|
39
|
+
"@quenty/signal": "^7.10.3",
|
|
40
40
|
"@quenty/steputils": "^3.5.5",
|
|
41
|
-
"@quenty/transitionmodel": "^7.19.
|
|
42
|
-
"@quenty/valueobject": "^13.17.
|
|
41
|
+
"@quenty/transitionmodel": "^7.19.3",
|
|
42
|
+
"@quenty/valueobject": "^13.17.3"
|
|
43
43
|
},
|
|
44
44
|
"publishConfig": {
|
|
45
45
|
"access": "public"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "b06c070ae91d5dab7bd8de6e290ad2caabb15d8f"
|
|
48
48
|
}
|
|
@@ -37,12 +37,13 @@ export type DepthOfFieldEffect = typeof(setmetatable(
|
|
|
37
37
|
_nearIntensitySpring: SpringObject.SpringObject<number>,
|
|
38
38
|
_farIntensitySpring: SpringObject.SpringObject<number>,
|
|
39
39
|
_percentVisibleModel: SpringTransitionModel.SpringTransitionModel<number>,
|
|
40
|
+
_observeOtherStates: Observable.Observable<_Brio.Brio<DepthOfFieldEffect>?>,
|
|
40
41
|
},
|
|
41
|
-
DepthOfFieldEffect
|
|
42
|
-
))
|
|
42
|
+
{} :: typeof({ __index = DepthOfFieldEffect })
|
|
43
|
+
)) & TransitionModel.TransitionModel
|
|
43
44
|
|
|
44
45
|
function DepthOfFieldEffect.new(): DepthOfFieldEffect
|
|
45
|
-
local self = setmetatable(TransitionModel.new(), DepthOfFieldEffect)
|
|
46
|
+
local self = setmetatable(TransitionModel.new() :: any, DepthOfFieldEffect)
|
|
46
47
|
|
|
47
48
|
self._focusDistanceSpring = self._maid:Add(SpringObject.new(40, 30))
|
|
48
49
|
self._inFocusRadiusSpring = self._maid:Add(SpringObject.new(35, 30))
|
|
@@ -72,7 +73,7 @@ function DepthOfFieldEffect.new(): DepthOfFieldEffect
|
|
|
72
73
|
return self
|
|
73
74
|
end
|
|
74
75
|
|
|
75
|
-
function DepthOfFieldEffect
|
|
76
|
+
function DepthOfFieldEffect.SetShowSpeed(self: DepthOfFieldEffect, speed: number)
|
|
76
77
|
self._percentVisibleModel:SetSpeed(speed)
|
|
77
78
|
end
|
|
78
79
|
|
|
@@ -81,7 +82,11 @@ end
|
|
|
81
82
|
@param focusDistanceTarget number
|
|
82
83
|
@param doNotAnimate boolean
|
|
83
84
|
]=]
|
|
84
|
-
function DepthOfFieldEffect
|
|
85
|
+
function DepthOfFieldEffect.SetFocusDistanceTarget(
|
|
86
|
+
self: DepthOfFieldEffect,
|
|
87
|
+
focusDistanceTarget: number,
|
|
88
|
+
doNotAnimate: boolean?
|
|
89
|
+
)
|
|
85
90
|
assert(type(focusDistanceTarget) == "number", "Bad focusDistanceTarget")
|
|
86
91
|
|
|
87
92
|
self._focusDistanceSpring:SetTarget(focusDistanceTarget, doNotAnimate)
|
|
@@ -92,7 +97,11 @@ end
|
|
|
92
97
|
@param inFocusRadiusTarget number
|
|
93
98
|
@param doNotAnimate boolean
|
|
94
99
|
]=]
|
|
95
|
-
function DepthOfFieldEffect
|
|
100
|
+
function DepthOfFieldEffect.SetInFocusRadiusTarget(
|
|
101
|
+
self: DepthOfFieldEffect,
|
|
102
|
+
inFocusRadiusTarget: number,
|
|
103
|
+
doNotAnimate: boolean?
|
|
104
|
+
)
|
|
96
105
|
assert(type(inFocusRadiusTarget) == "number", "Bad inFocusRadiusTarget")
|
|
97
106
|
|
|
98
107
|
self._inFocusRadiusSpring:SetTarget(inFocusRadiusTarget, doNotAnimate)
|
|
@@ -103,7 +112,11 @@ end
|
|
|
103
112
|
@param nearIntensityTarget number
|
|
104
113
|
@param doNotAnimate boolean
|
|
105
114
|
]=]
|
|
106
|
-
function DepthOfFieldEffect
|
|
115
|
+
function DepthOfFieldEffect.SetNearIntensityTarget(
|
|
116
|
+
self: DepthOfFieldEffect,
|
|
117
|
+
nearIntensityTarget: number,
|
|
118
|
+
doNotAnimate: boolean?
|
|
119
|
+
)
|
|
107
120
|
assert(type(nearIntensityTarget) == "number", "Bad nearIntensityTarget")
|
|
108
121
|
|
|
109
122
|
self._nearIntensitySpring:SetTarget(nearIntensityTarget, doNotAnimate)
|
|
@@ -114,7 +127,11 @@ end
|
|
|
114
127
|
@param farIntensityTarget number
|
|
115
128
|
@param doNotAnimate boolean
|
|
116
129
|
]=]
|
|
117
|
-
function DepthOfFieldEffect
|
|
130
|
+
function DepthOfFieldEffect.SetFarIntensityTarget(
|
|
131
|
+
self: DepthOfFieldEffect,
|
|
132
|
+
farIntensityTarget: number,
|
|
133
|
+
doNotAnimate: boolean?
|
|
134
|
+
)
|
|
118
135
|
assert(type(farIntensityTarget) == "number", "Bad farIntensityTarget")
|
|
119
136
|
|
|
120
137
|
self._farIntensitySpring:SetTarget(farIntensityTarget, doNotAnimate)
|
|
@@ -124,7 +141,7 @@ end
|
|
|
124
141
|
Retrieves the distance target
|
|
125
142
|
@return number
|
|
126
143
|
]=]
|
|
127
|
-
function DepthOfFieldEffect
|
|
144
|
+
function DepthOfFieldEffect.GetFocusDistanceTarget(self: DepthOfFieldEffect): number
|
|
128
145
|
return self._focusDistanceSpring.Target
|
|
129
146
|
end
|
|
130
147
|
|
|
@@ -132,7 +149,7 @@ end
|
|
|
132
149
|
Retrieves the radius target
|
|
133
150
|
@return number
|
|
134
151
|
]=]
|
|
135
|
-
function DepthOfFieldEffect
|
|
152
|
+
function DepthOfFieldEffect.GetInFocusRadiusTarget(self: DepthOfFieldEffect): number
|
|
136
153
|
return self._inFocusRadiusSpring.Target
|
|
137
154
|
end
|
|
138
155
|
|
|
@@ -140,7 +157,7 @@ end
|
|
|
140
157
|
Retrieve the near intensity target
|
|
141
158
|
@return number
|
|
142
159
|
]=]
|
|
143
|
-
function DepthOfFieldEffect
|
|
160
|
+
function DepthOfFieldEffect.GetNearIntensityTarget(self: DepthOfFieldEffect): number
|
|
144
161
|
return self._nearIntensitySpring.Target
|
|
145
162
|
end
|
|
146
163
|
|
|
@@ -148,11 +165,11 @@ end
|
|
|
148
165
|
Retrieve the far intensity target
|
|
149
166
|
@return number
|
|
150
167
|
]=]
|
|
151
|
-
function DepthOfFieldEffect
|
|
168
|
+
function DepthOfFieldEffect.GetFarIntensityTarget(self: DepthOfFieldEffect): number
|
|
152
169
|
return self._farIntensitySpring.Target
|
|
153
170
|
end
|
|
154
171
|
|
|
155
|
-
function DepthOfFieldEffect
|
|
172
|
+
function DepthOfFieldEffect._render(self: DepthOfFieldEffect): any
|
|
156
173
|
-- Note: Roblox blends DepthOfField by picking highest value in each category, so we always drive the "hidden"
|
|
157
174
|
-- state towards zero. The only issue is `InFocusRadius` must be rendered at target of 500 to fade "out" the effect
|
|
158
175
|
-- if other
|
|
@@ -262,10 +279,10 @@ type DepthOfFieldState = {
|
|
|
262
279
|
targetInFocusRadius: number,
|
|
263
280
|
targetFocusDistance: number,
|
|
264
281
|
enabled: boolean,
|
|
265
|
-
depthOfField:
|
|
282
|
+
depthOfField: Instance?,
|
|
266
283
|
}
|
|
267
284
|
|
|
268
|
-
function DepthOfFieldEffect
|
|
285
|
+
function DepthOfFieldEffect._observeRenderedDepthOfFieldState(self: DepthOfFieldEffect)
|
|
269
286
|
if self._observeOtherStates then
|
|
270
287
|
return self._observeOtherStates
|
|
271
288
|
end
|
|
@@ -359,12 +376,12 @@ function DepthOfFieldEffect:_observeRenderedDepthOfFieldState()
|
|
|
359
376
|
return topMaid
|
|
360
377
|
end):Pipe({
|
|
361
378
|
Rx.cache() :: any,
|
|
362
|
-
})
|
|
379
|
+
}) :: any
|
|
363
380
|
|
|
364
381
|
return self._observeOtherStates
|
|
365
382
|
end
|
|
366
383
|
|
|
367
|
-
function DepthOfFieldEffect
|
|
384
|
+
function DepthOfFieldEffect._observeAllDepthOfFieldBrio(_self: DepthOfFieldEffect): Observable.Observable<_Brio.Brio<Instance>>
|
|
368
385
|
return Rx.merge({
|
|
369
386
|
RxInstanceUtils.observeChildrenOfClassBrio(Lighting, "DepthOfFieldEffect") :: any,
|
|
370
387
|
RxInstanceUtils.observePropertyBrio(Workspace, "CurrentCamera", function(camera)
|