@quenty/camera 14.52.0 → 14.54.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,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
|
+
# [14.54.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/camera@14.53.0...@quenty/camera@14.54.0) (2026-08-28)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @quenty/camera
|
|
9
|
+
|
|
10
|
+
# [14.53.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/camera@14.52.0...@quenty/camera@14.53.0) (2026-08-28)
|
|
11
|
+
|
|
12
|
+
**Note:** Version bump only for package @quenty/camera
|
|
13
|
+
|
|
6
14
|
# [14.52.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/camera@14.51.1...@quenty/camera@14.52.0) (2026-08-24)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @quenty/camera
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quenty/camera",
|
|
3
|
-
"version": "14.
|
|
3
|
+
"version": "14.54.0",
|
|
4
4
|
"description": "Quenty's camera system for Roblox",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Roblox",
|
|
@@ -29,33 +29,34 @@
|
|
|
29
29
|
],
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@quenty/acceltween": "2.8.0",
|
|
32
|
-
"@quenty/baseobject": "10.
|
|
32
|
+
"@quenty/baseobject": "10.16.0",
|
|
33
33
|
"@quenty/cframeutils": "5.5.6",
|
|
34
34
|
"@quenty/cubicspline": "10.13.1",
|
|
35
|
-
"@quenty/draw": "7.
|
|
35
|
+
"@quenty/draw": "7.17.0",
|
|
36
36
|
"@quenty/ducktype": "5.11.1",
|
|
37
|
-
"@quenty/inputobjectutils": "4.
|
|
37
|
+
"@quenty/inputobjectutils": "4.40.0",
|
|
38
|
+
"@quenty/jestutils": "1.1.0",
|
|
38
39
|
"@quenty/loader": "10.11.1",
|
|
39
|
-
"@quenty/maid": "3.
|
|
40
|
+
"@quenty/maid": "3.12.0",
|
|
40
41
|
"@quenty/math": "2.7.5",
|
|
41
|
-
"@quenty/nevermore-test-runner": "1.
|
|
42
|
-
"@quenty/playermock": "1.
|
|
43
|
-
"@quenty/promise": "10.
|
|
44
|
-
"@quenty/qframe": "10.
|
|
45
|
-
"@quenty/rx": "13.
|
|
46
|
-
"@quenty/servicebag": "11.
|
|
42
|
+
"@quenty/nevermore-test-runner": "1.6.0",
|
|
43
|
+
"@quenty/playermock": "1.8.0",
|
|
44
|
+
"@quenty/promise": "10.24.0",
|
|
45
|
+
"@quenty/qframe": "10.34.0",
|
|
46
|
+
"@quenty/rx": "13.34.0",
|
|
47
|
+
"@quenty/servicebag": "11.21.0",
|
|
47
48
|
"@quenty/spring": "10.12.1",
|
|
48
|
-
"@quenty/steputils": "3.
|
|
49
|
-
"@quenty/transitionmodel": "7.
|
|
50
|
-
"@quenty/valueobject": "13.
|
|
49
|
+
"@quenty/steputils": "3.9.0",
|
|
50
|
+
"@quenty/transitionmodel": "7.50.0",
|
|
51
|
+
"@quenty/valueobject": "13.38.0",
|
|
51
52
|
"@quenty/vector3utils": "10.11.1",
|
|
52
53
|
"@quentystudios/jest-lua": "3.10.0-quenty.2"
|
|
53
54
|
},
|
|
54
55
|
"devDependencies": {
|
|
55
|
-
"@quenty/camerastoryutils": "10.
|
|
56
|
+
"@quenty/camerastoryutils": "10.33.0"
|
|
56
57
|
},
|
|
57
58
|
"publishConfig": {
|
|
58
59
|
"access": "public"
|
|
59
60
|
},
|
|
60
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "346201e192e467cb71160f43029863853be855b5"
|
|
61
62
|
}
|
|
@@ -11,29 +11,24 @@ local CameraStackService = require("CameraStackService")
|
|
|
11
11
|
local CameraState = require("CameraState")
|
|
12
12
|
local CustomCameraEffect = require("CustomCameraEffect")
|
|
13
13
|
local Jest = require("Jest")
|
|
14
|
+
local JestUtils = require("JestUtils")
|
|
15
|
+
local Maid = require("Maid")
|
|
14
16
|
local PlayerMock = require("PlayerMock")
|
|
15
17
|
local ServiceBag = require("ServiceBag")
|
|
16
18
|
|
|
17
|
-
local afterEach = Jest.Globals.afterEach
|
|
18
19
|
local describe = Jest.Globals.describe
|
|
19
20
|
local expect = Jest.Globals.expect
|
|
20
21
|
local it = Jest.Globals.it
|
|
21
22
|
|
|
22
|
-
local currentServiceBag: ServiceBag.ServiceBag? = nil
|
|
23
|
-
local currentMock: Player? = nil
|
|
24
|
-
|
|
25
|
-
-- Boots the service the way production does (Init then Start). The mocked local player is designated
|
|
26
|
-
-- before boot so CameraStackService.Start skips BindToRenderStep, which is client-only and would
|
|
27
|
-
-- error in the server context these specs run in.
|
|
28
23
|
local function setup(options: { start: boolean? }?): CameraStackService.CameraStackService
|
|
24
|
+
local maid = Maid.new()
|
|
25
|
+
JestUtils.afterThis(maid)
|
|
26
|
+
|
|
29
27
|
local player = PlayerMock.new({ UserId = 66123201 })
|
|
30
28
|
player.Parent = Workspace
|
|
31
|
-
PlayerMock.setMockedLocalPlayer(player)
|
|
32
|
-
currentMock = player
|
|
29
|
+
local restoreLocalPlayer = PlayerMock.setMockedLocalPlayer(player)
|
|
33
30
|
|
|
34
31
|
local serviceBag = ServiceBag.new()
|
|
35
|
-
currentServiceBag = serviceBag
|
|
36
|
-
|
|
37
32
|
local service: CameraStackService.CameraStackService = serviceBag:GetService(CameraStackService) :: any
|
|
38
33
|
serviceBag:Init()
|
|
39
34
|
|
|
@@ -41,6 +36,12 @@ local function setup(options: { start: boolean? }?): CameraStackService.CameraSt
|
|
|
41
36
|
serviceBag:Start()
|
|
42
37
|
end
|
|
43
38
|
|
|
39
|
+
maid:GiveTask(function()
|
|
40
|
+
serviceBag:Destroy()
|
|
41
|
+
restoreLocalPlayer()
|
|
42
|
+
player:Destroy()
|
|
43
|
+
end)
|
|
44
|
+
|
|
44
45
|
return service
|
|
45
46
|
end
|
|
46
47
|
|
|
@@ -52,19 +53,6 @@ local function makeEffect(): (CustomCameraEffect.CustomCameraEffect, CameraState
|
|
|
52
53
|
return effect, state
|
|
53
54
|
end
|
|
54
55
|
|
|
55
|
-
afterEach(function()
|
|
56
|
-
if currentServiceBag then
|
|
57
|
-
currentServiceBag:Destroy()
|
|
58
|
-
currentServiceBag = nil
|
|
59
|
-
end
|
|
60
|
-
|
|
61
|
-
PlayerMock.setMockedLocalPlayer(nil)
|
|
62
|
-
if currentMock then
|
|
63
|
-
currentMock:Destroy()
|
|
64
|
-
currentMock = nil
|
|
65
|
-
end
|
|
66
|
-
end)
|
|
67
|
-
|
|
68
56
|
describe("CameraStackService.Init", function()
|
|
69
57
|
it("initializes with the default camera at the bottom of the stack", function()
|
|
70
58
|
local service = setup()
|
|
@@ -85,7 +73,7 @@ describe("CameraStackService.Init", function()
|
|
|
85
73
|
|
|
86
74
|
it("errors when used before the service bag runs Init", function()
|
|
87
75
|
local serviceBag = ServiceBag.new()
|
|
88
|
-
|
|
76
|
+
JestUtils.afterThis(serviceBag)
|
|
89
77
|
local service: CameraStackService.CameraStackService = serviceBag:GetService(CameraStackService) :: any
|
|
90
78
|
|
|
91
79
|
expect(function()
|
|
@@ -93,7 +81,7 @@ describe("CameraStackService.Init", function()
|
|
|
93
81
|
end).toThrow("Not initialized")
|
|
94
82
|
|
|
95
83
|
-- Destroying a never-initialized CameraStackService errors on its nil maid, so finish
|
|
96
|
-
-- initialization for
|
|
84
|
+
-- initialization for teardown.
|
|
97
85
|
serviceBag:Init()
|
|
98
86
|
end)
|
|
99
87
|
end)
|
|
@@ -13,6 +13,8 @@ local CameraState = require("CameraState")
|
|
|
13
13
|
local CameraStateTweener = require("CameraStateTweener")
|
|
14
14
|
local CustomCameraEffect = require("CustomCameraEffect")
|
|
15
15
|
local Jest = require("Jest")
|
|
16
|
+
local JestUtils = require("JestUtils")
|
|
17
|
+
local Maid = require("Maid")
|
|
16
18
|
local PlayerMock = require("PlayerMock")
|
|
17
19
|
local ServiceBag = require("ServiceBag")
|
|
18
20
|
local TransitionModel = require("TransitionModel")
|
|
@@ -26,7 +28,7 @@ type Controller = {
|
|
|
26
28
|
cameraEffect: CustomCameraEffect.CustomCameraEffect,
|
|
27
29
|
tweener: CameraStateTweener.CameraStateTweener,
|
|
28
30
|
advance: (seconds: number) -> (),
|
|
29
|
-
|
|
31
|
+
Destroy: (self: Controller) -> (),
|
|
30
32
|
}
|
|
31
33
|
|
|
32
34
|
local function makeEffect(): CustomCameraEffect.CustomCameraEffect
|
|
@@ -36,20 +38,27 @@ local function makeEffect(): CustomCameraEffect.CustomCameraEffect
|
|
|
36
38
|
end)
|
|
37
39
|
end
|
|
38
40
|
|
|
39
|
-
-- The underlying spring reads wall time analytically, so swapping its clock makes every
|
|
40
|
-
-- animation assertion deterministic instead of a timing race.
|
|
41
41
|
local function setup(options: { speed: number? }?): Controller
|
|
42
|
+
local maid = Maid.new()
|
|
43
|
+
|
|
42
44
|
local cameraStack = CameraStack.new()
|
|
43
45
|
local cameraEffect = makeEffect()
|
|
44
46
|
local tweener = CameraStateTweener.new(cameraStack, cameraEffect, options and options.speed)
|
|
45
47
|
|
|
48
|
+
maid:GiveTask(function()
|
|
49
|
+
if tweener.Destroy then
|
|
50
|
+
tweener:Destroy()
|
|
51
|
+
end
|
|
52
|
+
cameraStack:Destroy()
|
|
53
|
+
end)
|
|
54
|
+
|
|
46
55
|
local now = 0
|
|
47
56
|
local fader: any = tweener:GetFader()
|
|
48
57
|
fader.Spring.Clock = function()
|
|
49
58
|
return now
|
|
50
59
|
end
|
|
51
60
|
|
|
52
|
-
|
|
61
|
+
local controller: Controller = {
|
|
53
62
|
cameraStack = cameraStack,
|
|
54
63
|
cameraEffect = cameraEffect,
|
|
55
64
|
tweener = tweener,
|
|
@@ -60,13 +69,14 @@ local function setup(options: { speed: number? }?): Controller
|
|
|
60
69
|
task.wait()
|
|
61
70
|
task.wait()
|
|
62
71
|
end,
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
tweener:Destroy()
|
|
66
|
-
end
|
|
67
|
-
cameraStack:Destroy()
|
|
72
|
+
Destroy = function(_self)
|
|
73
|
+
maid:DoCleaning()
|
|
68
74
|
end,
|
|
69
75
|
}
|
|
76
|
+
|
|
77
|
+
maid:GiveTask(JestUtils.afterThis(controller))
|
|
78
|
+
|
|
79
|
+
return controller
|
|
70
80
|
end
|
|
71
81
|
|
|
72
82
|
describe("CameraStateTweener.new", function()
|
|
@@ -77,7 +87,7 @@ describe("CameraStateTweener.new", function()
|
|
|
77
87
|
expect(controller.tweener:GetCameraEffect()).toBe(controller.cameraEffect)
|
|
78
88
|
expect(controller.tweener:GetCameraBelow()).never.toBe(controller.cameraEffect)
|
|
79
89
|
|
|
80
|
-
controller
|
|
90
|
+
controller:Destroy()
|
|
81
91
|
end)
|
|
82
92
|
|
|
83
93
|
it("starts fully hidden", function()
|
|
@@ -87,7 +97,7 @@ describe("CameraStateTweener.new", function()
|
|
|
87
97
|
expect(controller.tweener:IsFinishedHiding()).toBe(true)
|
|
88
98
|
expect(controller.tweener:IsFinishedShowing()).toBe(false)
|
|
89
99
|
|
|
90
|
-
controller
|
|
100
|
+
controller:Destroy()
|
|
91
101
|
end)
|
|
92
102
|
|
|
93
103
|
it("defaults to a speed of 20", function()
|
|
@@ -95,7 +105,7 @@ describe("CameraStateTweener.new", function()
|
|
|
95
105
|
|
|
96
106
|
expect((controller.tweener:GetFader() :: any).Speed).toBe(20)
|
|
97
107
|
|
|
98
|
-
controller
|
|
108
|
+
controller:Destroy()
|
|
99
109
|
end)
|
|
100
110
|
|
|
101
111
|
it("honors an explicit speed", function()
|
|
@@ -103,13 +113,13 @@ describe("CameraStateTweener.new", function()
|
|
|
103
113
|
|
|
104
114
|
expect((controller.tweener:GetFader() :: any).Speed).toBe(5)
|
|
105
115
|
|
|
106
|
-
controller
|
|
116
|
+
controller:Destroy()
|
|
107
117
|
end)
|
|
108
118
|
|
|
109
119
|
it("accepts a service bag holding a CameraStackService", function()
|
|
110
120
|
local player = PlayerMock.new({ UserId = 66123202 })
|
|
111
121
|
player.Parent = Workspace
|
|
112
|
-
PlayerMock.setMockedLocalPlayer(player)
|
|
122
|
+
local restoreLocalPlayer = PlayerMock.setMockedLocalPlayer(player)
|
|
113
123
|
|
|
114
124
|
local serviceBag = ServiceBag.new()
|
|
115
125
|
local service: CameraStackService.CameraStackService = serviceBag:GetService(CameraStackService) :: any
|
|
@@ -122,7 +132,7 @@ describe("CameraStateTweener.new", function()
|
|
|
122
132
|
|
|
123
133
|
tweener:Destroy()
|
|
124
134
|
serviceBag:Destroy()
|
|
125
|
-
|
|
135
|
+
restoreLocalPlayer()
|
|
126
136
|
player:Destroy()
|
|
127
137
|
end)
|
|
128
138
|
|
|
@@ -154,7 +164,7 @@ describe("CameraStateTweener:Show", function()
|
|
|
154
164
|
expect(controller.tweener:IsFinishedShowing()).toBe(false)
|
|
155
165
|
expect(controller.tweener:IsFinishedHiding()).toBe(false)
|
|
156
166
|
|
|
157
|
-
controller
|
|
167
|
+
controller:Destroy()
|
|
158
168
|
end)
|
|
159
169
|
|
|
160
170
|
it("arrives once enough time passes", function()
|
|
@@ -167,7 +177,7 @@ describe("CameraStateTweener:Show", function()
|
|
|
167
177
|
expect(controller.tweener:IsFinishedShowing()).toBe(true)
|
|
168
178
|
expect(controller.tweener:IsFinishedHiding()).toBe(false)
|
|
169
179
|
|
|
170
|
-
controller
|
|
180
|
+
controller:Destroy()
|
|
171
181
|
end)
|
|
172
182
|
|
|
173
183
|
it("snaps when told not to animate", function()
|
|
@@ -178,7 +188,7 @@ describe("CameraStateTweener:Show", function()
|
|
|
178
188
|
expect(controller.tweener:GetPercentVisible()).toBe(1)
|
|
179
189
|
expect(controller.tweener:IsFinishedShowing()).toBe(true)
|
|
180
190
|
|
|
181
|
-
controller
|
|
191
|
+
controller:Destroy()
|
|
182
192
|
end)
|
|
183
193
|
|
|
184
194
|
it("snaps an already-running show when told not to animate", function()
|
|
@@ -192,7 +202,7 @@ describe("CameraStateTweener:Show", function()
|
|
|
192
202
|
expect(controller.tweener:GetPercentVisible()).toBe(1)
|
|
193
203
|
expect(controller.tweener:IsFinishedShowing()).toBe(true)
|
|
194
204
|
|
|
195
|
-
controller
|
|
205
|
+
controller:Destroy()
|
|
196
206
|
end)
|
|
197
207
|
end)
|
|
198
208
|
|
|
@@ -207,7 +217,7 @@ describe("CameraStateTweener:Hide", function()
|
|
|
207
217
|
expect(controller.tweener:GetPercentVisible()).toBe(1)
|
|
208
218
|
expect(controller.tweener:IsFinishedHiding()).toBe(false)
|
|
209
219
|
|
|
210
|
-
controller
|
|
220
|
+
controller:Destroy()
|
|
211
221
|
end)
|
|
212
222
|
|
|
213
223
|
it("arrives once enough time passes", function()
|
|
@@ -220,7 +230,7 @@ describe("CameraStateTweener:Hide", function()
|
|
|
220
230
|
expect(controller.tweener:GetPercentVisible()).toBe(0)
|
|
221
231
|
expect(controller.tweener:IsFinishedHiding()).toBe(true)
|
|
222
232
|
|
|
223
|
-
controller
|
|
233
|
+
controller:Destroy()
|
|
224
234
|
end)
|
|
225
235
|
|
|
226
236
|
it("snaps when told not to animate", function()
|
|
@@ -232,7 +242,7 @@ describe("CameraStateTweener:Hide", function()
|
|
|
232
242
|
expect(controller.tweener:GetPercentVisible()).toBe(0)
|
|
233
243
|
expect(controller.tweener:IsFinishedHiding()).toBe(true)
|
|
234
244
|
|
|
235
|
-
controller
|
|
245
|
+
controller:Destroy()
|
|
236
246
|
end)
|
|
237
247
|
end)
|
|
238
248
|
|
|
@@ -244,7 +254,7 @@ describe("CameraStateTweener:SetVisible", function()
|
|
|
244
254
|
|
|
245
255
|
expect(controller.tweener:GetPercentVisible()).toBe(1)
|
|
246
256
|
|
|
247
|
-
controller
|
|
257
|
+
controller:Destroy()
|
|
248
258
|
end)
|
|
249
259
|
|
|
250
260
|
it("hides when not visible", function()
|
|
@@ -255,7 +265,7 @@ describe("CameraStateTweener:SetVisible", function()
|
|
|
255
265
|
|
|
256
266
|
expect(controller.tweener:GetPercentVisible()).toBe(0)
|
|
257
267
|
|
|
258
|
-
controller
|
|
268
|
+
controller:Destroy()
|
|
259
269
|
end)
|
|
260
270
|
end)
|
|
261
271
|
|
|
@@ -268,7 +278,7 @@ describe("CameraStateTweener:SetTarget", function()
|
|
|
268
278
|
|
|
269
279
|
expect(controller.tweener:GetPercentVisible()).toBe(0.5)
|
|
270
280
|
|
|
271
|
-
controller
|
|
281
|
+
controller:Destroy()
|
|
272
282
|
end)
|
|
273
283
|
|
|
274
284
|
it("snaps to a partial value when told not to animate", function()
|
|
@@ -278,7 +288,7 @@ describe("CameraStateTweener:SetTarget", function()
|
|
|
278
288
|
|
|
279
289
|
expect(controller.tweener:GetPercentVisible()).toBe(0.5)
|
|
280
290
|
|
|
281
|
-
controller
|
|
291
|
+
controller:Destroy()
|
|
282
292
|
end)
|
|
283
293
|
|
|
284
294
|
it("returns itself so calls can chain", function()
|
|
@@ -286,7 +296,7 @@ describe("CameraStateTweener:SetTarget", function()
|
|
|
286
296
|
|
|
287
297
|
expect(controller.tweener:SetTarget(1)).toBe(controller.tweener)
|
|
288
298
|
|
|
289
|
-
controller
|
|
299
|
+
controller:Destroy()
|
|
290
300
|
end)
|
|
291
301
|
|
|
292
302
|
it("hides on a target of zero without discarding the shown target", function()
|
|
@@ -302,7 +312,7 @@ describe("CameraStateTweener:SetTarget", function()
|
|
|
302
312
|
|
|
303
313
|
expect(controller.tweener:GetPercentVisible()).toBe(0.5)
|
|
304
314
|
|
|
305
|
-
controller
|
|
315
|
+
controller:Destroy()
|
|
306
316
|
end)
|
|
307
317
|
|
|
308
318
|
it("rejects a target that is not a number", function()
|
|
@@ -312,7 +322,7 @@ describe("CameraStateTweener:SetTarget", function()
|
|
|
312
322
|
controller.tweener:SetTarget(nil :: any)
|
|
313
323
|
end).toThrow("Bad target")
|
|
314
324
|
|
|
315
|
-
controller
|
|
325
|
+
controller:Destroy()
|
|
316
326
|
end)
|
|
317
327
|
end)
|
|
318
328
|
|
|
@@ -326,7 +336,7 @@ describe("CameraStateTweener:SetShownTarget", function()
|
|
|
326
336
|
expect(controller.tweener:GetShownTarget()).toBe(0.25)
|
|
327
337
|
expect(controller.tweener:GetPercentVisible()).toBe(0.25)
|
|
328
338
|
|
|
329
|
-
controller
|
|
339
|
+
controller:Destroy()
|
|
330
340
|
end)
|
|
331
341
|
|
|
332
342
|
it("retargets and runs the show transition again when changed while shown", function()
|
|
@@ -349,7 +359,7 @@ describe("CameraStateTweener:SetShownTarget", function()
|
|
|
349
359
|
expect(showingComplete).toBe(2)
|
|
350
360
|
expect(controller.tweener:GetPercentVisible()).toBe(0.5)
|
|
351
361
|
|
|
352
|
-
controller
|
|
362
|
+
controller:Destroy()
|
|
353
363
|
end)
|
|
354
364
|
|
|
355
365
|
it("does not start a transition when changed while hidden", function()
|
|
@@ -360,7 +370,7 @@ describe("CameraStateTweener:SetShownTarget", function()
|
|
|
360
370
|
expect((controller.tweener:GetFader() :: any).Target).toBe(0)
|
|
361
371
|
expect(controller.tweener:IsHidingComplete()).toBe(true)
|
|
362
372
|
|
|
363
|
-
controller
|
|
373
|
+
controller:Destroy()
|
|
364
374
|
end)
|
|
365
375
|
end)
|
|
366
376
|
|
|
@@ -370,7 +380,7 @@ describe("CameraStateTweener as a transition model", function()
|
|
|
370
380
|
|
|
371
381
|
expect(TransitionModel.isTransitionModel(controller.tweener)).toBe(true)
|
|
372
382
|
|
|
373
|
-
controller
|
|
383
|
+
controller:Destroy()
|
|
374
384
|
end)
|
|
375
385
|
|
|
376
386
|
it("promises the show until the fade arrives", function()
|
|
@@ -384,7 +394,7 @@ describe("CameraStateTweener as a transition model", function()
|
|
|
384
394
|
expect(promise:IsFulfilled()).toBe(true)
|
|
385
395
|
expect(controller.tweener:GetPercentVisible()).toBe(1)
|
|
386
396
|
|
|
387
|
-
controller
|
|
397
|
+
controller:Destroy()
|
|
388
398
|
end)
|
|
389
399
|
|
|
390
400
|
it("resolves the show promise without waiting when told not to animate", function()
|
|
@@ -392,7 +402,7 @@ describe("CameraStateTweener as a transition model", function()
|
|
|
392
402
|
|
|
393
403
|
expect(controller.tweener:PromiseShow(true):IsFulfilled()).toBe(true)
|
|
394
404
|
|
|
395
|
-
controller
|
|
405
|
+
controller:Destroy()
|
|
396
406
|
end)
|
|
397
407
|
|
|
398
408
|
it("promises the hide until the fade arrives", function()
|
|
@@ -408,7 +418,7 @@ describe("CameraStateTweener as a transition model", function()
|
|
|
408
418
|
expect(promise:IsFulfilled()).toBe(true)
|
|
409
419
|
expect(controller.tweener:GetPercentVisible()).toBe(0)
|
|
410
420
|
|
|
411
|
-
controller
|
|
421
|
+
controller:Destroy()
|
|
412
422
|
end)
|
|
413
423
|
|
|
414
424
|
it("fires ShowingComplete only once the fade arrives", function()
|
|
@@ -425,7 +435,7 @@ describe("CameraStateTweener as a transition model", function()
|
|
|
425
435
|
|
|
426
436
|
expect(showingComplete).toBe(1)
|
|
427
437
|
|
|
428
|
-
controller
|
|
438
|
+
controller:Destroy()
|
|
429
439
|
end)
|
|
430
440
|
|
|
431
441
|
it("toggles visibility", function()
|
|
@@ -439,7 +449,7 @@ describe("CameraStateTweener as a transition model", function()
|
|
|
439
449
|
expect(controller.tweener:IsVisible()).toBe(false)
|
|
440
450
|
expect(controller.tweener:GetPercentVisible()).toBe(0)
|
|
441
451
|
|
|
442
|
-
controller
|
|
452
|
+
controller:Destroy()
|
|
443
453
|
end)
|
|
444
454
|
end)
|
|
445
455
|
|
|
@@ -456,7 +466,7 @@ describe("CameraStateTweener:Finish", function()
|
|
|
456
466
|
expect(calls).toBe(1)
|
|
457
467
|
expect(controller.tweener:GetPercentVisible()).toBe(0)
|
|
458
468
|
|
|
459
|
-
controller
|
|
469
|
+
controller:Destroy()
|
|
460
470
|
end)
|
|
461
471
|
|
|
462
472
|
it("waits for the hide to complete before invoking the callback", function()
|
|
@@ -471,7 +481,7 @@ describe("CameraStateTweener:Finish", function()
|
|
|
471
481
|
expect(calls).toBe(0)
|
|
472
482
|
expect((controller.tweener:GetFader() :: any).Target).toBe(0)
|
|
473
483
|
|
|
474
|
-
controller
|
|
484
|
+
controller:Destroy()
|
|
475
485
|
end)
|
|
476
486
|
|
|
477
487
|
it("rejects a callback that is not a function", function()
|
|
@@ -481,7 +491,7 @@ describe("CameraStateTweener:Finish", function()
|
|
|
481
491
|
controller.tweener:Finish(true, nil :: any)
|
|
482
492
|
end).toThrow("Bad callback")
|
|
483
493
|
|
|
484
|
-
controller
|
|
494
|
+
controller:Destroy()
|
|
485
495
|
end)
|
|
486
496
|
end)
|
|
487
497
|
|
|
@@ -492,7 +502,7 @@ describe("CameraStateTweener:SetSpeed", function()
|
|
|
492
502
|
expect(controller.tweener:SetSpeed(40)).toBe(controller.tweener)
|
|
493
503
|
expect((controller.tweener:GetFader() :: any).Speed).toBe(40)
|
|
494
504
|
|
|
495
|
-
controller
|
|
505
|
+
controller:Destroy()
|
|
496
506
|
end)
|
|
497
507
|
|
|
498
508
|
it("rejects a speed that is not a number", function()
|
|
@@ -502,7 +512,7 @@ describe("CameraStateTweener:SetSpeed", function()
|
|
|
502
512
|
controller.tweener:SetSpeed("fast" :: any)
|
|
503
513
|
end).toThrow("Bad speed")
|
|
504
514
|
|
|
505
|
-
controller
|
|
515
|
+
controller:Destroy()
|
|
506
516
|
end)
|
|
507
517
|
end)
|
|
508
518
|
|
|
@@ -514,7 +524,7 @@ describe("CameraStateTweener:SetEpsilon", function()
|
|
|
514
524
|
|
|
515
525
|
expect((controller.tweener:GetFader() :: any).Epsilon).toBe(0.1)
|
|
516
526
|
|
|
517
|
-
controller
|
|
527
|
+
controller:Destroy()
|
|
518
528
|
end)
|
|
519
529
|
|
|
520
530
|
it("counts the tween as arrived sooner than the default epsilon would", function()
|
|
@@ -531,8 +541,8 @@ describe("CameraStateTweener:SetEpsilon", function()
|
|
|
531
541
|
expect(loose.tweener:IsFinishedShowing()).toBe(true)
|
|
532
542
|
expect(strict.tweener:IsFinishedShowing()).toBe(false)
|
|
533
543
|
|
|
534
|
-
strict
|
|
535
|
-
loose
|
|
544
|
+
strict:Destroy()
|
|
545
|
+
loose:Destroy()
|
|
536
546
|
end)
|
|
537
547
|
end)
|
|
538
548
|
|
|
@@ -547,6 +557,6 @@ describe("CameraStateTweener:Destroy", function()
|
|
|
547
557
|
|
|
548
558
|
expect(controller.cameraStack:GetIndex(fader)).toBeNil()
|
|
549
559
|
|
|
550
|
-
controller
|
|
560
|
+
controller:Destroy()
|
|
551
561
|
end)
|
|
552
562
|
end)
|