@quenty/viewport 11.21.4-canary.559.9f38947.0 → 11.22.0-canary.559.b31717d.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 +1 -1
- package/package.json +15 -15
- package/src/Client/Viewport.lua +34 -34
- package/src/Client/Viewport.story.lua +6 -10
- package/src/Client/ViewportControls.lua +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
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
|
-
|
|
6
|
+
# [11.22.0-canary.559.b31717d.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/viewport@11.21.3...@quenty/viewport@11.22.0-canary.559.b31717d.0) (2025-05-10)
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
### Bug Fixes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quenty/viewport",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.22.0-canary.559.b31717d.0",
|
|
4
4
|
"description": "Rendering functionality for viewportFrames",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Roblox",
|
|
@@ -25,25 +25,25 @@
|
|
|
25
25
|
],
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@quenty/adorneeutils": "3.3.3",
|
|
28
|
-
"@quenty/baseobject": "10.8.
|
|
29
|
-
"@quenty/basicpane": "13.
|
|
30
|
-
"@quenty/blend": "12.
|
|
31
|
-
"@quenty/camera": "14.
|
|
32
|
-
"@quenty/geometryutils": "6.8.
|
|
33
|
-
"@quenty/inputobjectutils": "4.
|
|
34
|
-
"@quenty/loader": "10.8.
|
|
35
|
-
"@quenty/maid": "3.4.
|
|
28
|
+
"@quenty/baseobject": "10.8.3",
|
|
29
|
+
"@quenty/basicpane": "13.18.0-canary.559.b31717d.0",
|
|
30
|
+
"@quenty/blend": "12.19.0-canary.559.b31717d.0",
|
|
31
|
+
"@quenty/camera": "14.21.0-canary.559.b31717d.0",
|
|
32
|
+
"@quenty/geometryutils": "6.8.4",
|
|
33
|
+
"@quenty/inputobjectutils": "4.19.0-canary.559.b31717d.0",
|
|
34
|
+
"@quenty/loader": "10.8.3",
|
|
35
|
+
"@quenty/maid": "3.4.3",
|
|
36
36
|
"@quenty/math": "2.7.3",
|
|
37
|
-
"@quenty/rx": "13.
|
|
38
|
-
"@quenty/signal": "7.10.
|
|
39
|
-
"@quenty/spring": "10.
|
|
40
|
-
"@quenty/valueobject": "13.
|
|
37
|
+
"@quenty/rx": "13.18.0-canary.559.b31717d.0",
|
|
38
|
+
"@quenty/signal": "7.10.3",
|
|
39
|
+
"@quenty/spring": "10.9.0-canary.559.b31717d.0",
|
|
40
|
+
"@quenty/valueobject": "13.18.0-canary.559.b31717d.0"
|
|
41
41
|
},
|
|
42
42
|
"publishConfig": {
|
|
43
43
|
"access": "public"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@quenty/insertserviceutils": "10.
|
|
46
|
+
"@quenty/insertserviceutils": "10.11.0-canary.559.b31717d.0"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "b31717d8c9f7620c457f5018a2affa760a65334a"
|
|
49
49
|
}
|
package/src/Client/Viewport.lua
CHANGED
|
@@ -26,11 +26,11 @@ local CircleUtils = require("CircleUtils")
|
|
|
26
26
|
local Maid = require("Maid")
|
|
27
27
|
local Math = require("Math")
|
|
28
28
|
local Observable = require("Observable")
|
|
29
|
-
local Rx = require("Rx")
|
|
30
|
-
local Signal = require("Signal")
|
|
31
29
|
local SpringObject = require("SpringObject")
|
|
32
30
|
local ValueObject = require("ValueObject")
|
|
33
31
|
local ViewportControls = require("ViewportControls")
|
|
32
|
+
local Signal = require("Signal")
|
|
33
|
+
local Rx = require("Rx")
|
|
34
34
|
|
|
35
35
|
local MAX_PITCH = math.pi / 3
|
|
36
36
|
local MIN_PITCH = -math.pi / 3
|
|
@@ -252,46 +252,46 @@ function Viewport.Render(self: Viewport, props)
|
|
|
252
252
|
props.Transparency or 0,
|
|
253
253
|
self._transparency,
|
|
254
254
|
function(propTransparency, selfTransparency)
|
|
255
|
-
|
|
255
|
+
return Math.map(propTransparency, 0, 1, selfTransparency, 1)
|
|
256
256
|
end
|
|
257
257
|
),
|
|
258
258
|
[Blend.OnChange("AbsoluteSize")] = self._absoluteSize,
|
|
259
259
|
[Blend.Attached(function(viewport)
|
|
260
|
-
|
|
260
|
+
local controlsMaid = Maid.new()
|
|
261
261
|
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
262
|
+
-- create viewport controls and obey enabled state
|
|
263
|
+
local viewportControls = ViewportControls.new(viewport, self)
|
|
264
|
+
controlsMaid:Add(viewportControls)
|
|
265
|
+
controlsMaid:Add(self._controlsEnabled:Observe():Subscribe(function(controlsEnabled)
|
|
266
|
+
viewportControls:SetEnabled(controlsEnabled)
|
|
267
|
+
end))
|
|
268
268
|
|
|
269
|
-
|
|
269
|
+
return controlsMaid
|
|
270
270
|
end)] = true,
|
|
271
271
|
[Blend.Attached(function(viewport)
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
end
|
|
272
|
+
-- custom parenting scheme to ensure we don't call destroy on children
|
|
273
|
+
local maid = Maid.new()
|
|
274
|
+
|
|
275
|
+
local function update()
|
|
276
|
+
local value = self._current.Value
|
|
277
|
+
if value then
|
|
278
|
+
value.Parent = viewport
|
|
280
279
|
end
|
|
280
|
+
end
|
|
281
281
|
|
|
282
|
-
|
|
283
|
-
|
|
282
|
+
maid:GiveTask(self._current.Changed:Connect(update))
|
|
283
|
+
update()
|
|
284
284
|
|
|
285
|
-
|
|
286
|
-
|
|
285
|
+
maid:GiveTask(function()
|
|
286
|
+
local value = self._current.Value
|
|
287
287
|
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
288
|
+
-- Ensure we don't call :Destroy() on our preview instance.
|
|
289
|
+
if value then
|
|
290
|
+
value.Parent = nil
|
|
291
|
+
end
|
|
292
|
+
end)
|
|
293
293
|
|
|
294
|
-
|
|
294
|
+
return maid
|
|
295
295
|
end)] = true,
|
|
296
296
|
[Blend.Children] = {
|
|
297
297
|
props[Blend.Children],
|
|
@@ -312,12 +312,12 @@ function Viewport.Render(self: Viewport, props)
|
|
|
312
312
|
Rx.defaultsToNil :: any,
|
|
313
313
|
}),
|
|
314
314
|
function(inst: Instance, absSize: Vector2, fov: number, rotationYaw: number, rotationPitch: number)
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
315
|
+
if typeof(inst) ~= "Instance" then
|
|
316
|
+
return CFrame.new()
|
|
317
|
+
end
|
|
318
318
|
|
|
319
|
-
|
|
320
|
-
|
|
319
|
+
local aspectRatio = absSize.X / absSize.Y
|
|
320
|
+
local bbCFrame, bbSize = AdorneeUtils.getBoundingBox(inst)
|
|
321
321
|
if not (bbCFrame and bbSize) then
|
|
322
322
|
return CFrame.new()
|
|
323
323
|
end
|
|
@@ -2,11 +2,10 @@
|
|
|
2
2
|
@class Viewport.story
|
|
3
3
|
]]
|
|
4
4
|
|
|
5
|
-
local require =
|
|
6
|
-
require(game:GetService("ServerScriptService"):FindFirstChild("LoaderUtils", true).Parent).bootstrapStory(script)
|
|
5
|
+
local require = require(game:GetService("ServerScriptService"):FindFirstChild("LoaderUtils", true).Parent).bootstrapStory(script)
|
|
7
6
|
|
|
8
|
-
local InsertServiceUtils = require("InsertServiceUtils")
|
|
9
7
|
local Maid = require("Maid")
|
|
8
|
+
local InsertServiceUtils = require("InsertServiceUtils")
|
|
10
9
|
|
|
11
10
|
local Viewport = require("Viewport")
|
|
12
11
|
|
|
@@ -16,17 +15,14 @@ return function(target)
|
|
|
16
15
|
local viewport = Viewport.new()
|
|
17
16
|
maid:GiveTask(viewport)
|
|
18
17
|
|
|
19
|
-
maid
|
|
20
|
-
:GivePromise(InsertServiceUtils.promiseAsset(182451181)) --The account must own the asset in order to insert it.
|
|
18
|
+
maid:GivePromise(InsertServiceUtils.promiseAsset(182451181)) --The account must own the asset in order to insert it.
|
|
21
19
|
:Then(function(crate)
|
|
22
20
|
viewport:SetInstance(crate)
|
|
23
21
|
end)
|
|
24
22
|
|
|
25
|
-
maid:GiveTask(viewport
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
})
|
|
29
|
-
:Subscribe())
|
|
23
|
+
maid:GiveTask(viewport:Render({
|
|
24
|
+
Parent = target;
|
|
25
|
+
}):Subscribe())
|
|
30
26
|
|
|
31
27
|
return function()
|
|
32
28
|
maid:DoCleaning()
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
local require = require(script.Parent.loader).load(script)
|
|
8
8
|
|
|
9
9
|
local BaseObject = require("BaseObject")
|
|
10
|
-
local InputObjectUtils = require("InputObjectUtils")
|
|
11
10
|
local Maid = require("Maid")
|
|
11
|
+
local InputObjectUtils = require("InputObjectUtils")
|
|
12
12
|
local ValueObject = require("ValueObject")
|
|
13
13
|
|
|
14
14
|
local SENSITIVITY = Vector2.new(8, 4)
|