@quenty/camera 14.26.2 → 14.26.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 +6 -6
- package/src/Client/CameraStack.lua +9 -7
- package/src/Client/Controls/GamepadRotateModel.lua +11 -9
- package/src/Client/Effects/CustomCameraEffect.lua +9 -7
- package/src/Client/Effects/DefaultCamera.lua +13 -11
- package/src/Client/Effects/FadeBetween/FadeBetweenCamera3.lua +17 -15
- package/src/Client/Effects/FadingCamera.lua +14 -12
- package/src/Client/Effects/HeartbeatCamera.lua +11 -9
- package/src/Client/Effects/ImpulseCamera.lua +13 -11
- package/src/Client/Effects/InverseFader.lua +10 -8
- package/src/Client/Effects/LagPointCamera.lua +15 -13
- package/src/Client/Effects/OverrideDefaultCameraToo.lua +11 -9
- package/src/Client/Effects/PointCamera.lua +12 -10
- package/src/Client/Effects/PushCamera.lua +20 -18
- package/src/Client/Effects/RotatedCamera.lua +13 -11
- package/src/Client/Effects/SmoothPositionCamera.lua +11 -9
- package/src/Client/Effects/SmoothRotatedCamera.lua +27 -25
- package/src/Client/Effects/SmoothZoomedCamera.lua +18 -16
- package/src/Client/Effects/SummedCamera.lua +13 -11
- package/src/Client/Effects/TrackCamera.lua +9 -7
- package/src/Client/Effects/XZPlaneLockCamera.lua +9 -7
- package/src/Client/Effects/ZoomedCamera.lua +16 -14
- package/src/Client/Utility/CameraStateTweener.lua +11 -9
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.26.3](https://github.com/Quenty/NevermoreEngine/compare/@quenty/camera@14.26.2...@quenty/camera@14.26.3) (2025-12-28)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @quenty/camera
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
## [14.26.2](https://github.com/Quenty/NevermoreEngine/compare/@quenty/camera@14.26.1...@quenty/camera@14.26.2) (2025-11-22)
|
|
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.26.
|
|
3
|
+
"version": "14.26.3",
|
|
4
4
|
"description": "Quenty's camera system for Roblox",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Roblox",
|
|
@@ -27,18 +27,18 @@
|
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@quenty/acceltween": "^2.5.3",
|
|
29
29
|
"@quenty/baseobject": "^10.9.0",
|
|
30
|
-
"@quenty/cframeutils": "^5.5.
|
|
30
|
+
"@quenty/cframeutils": "^5.5.4",
|
|
31
31
|
"@quenty/cubicspline": "^10.9.0",
|
|
32
32
|
"@quenty/ducktype": "^5.9.0",
|
|
33
|
-
"@quenty/inputobjectutils": "^4.21.
|
|
33
|
+
"@quenty/inputobjectutils": "^4.21.1",
|
|
34
34
|
"@quenty/loader": "^10.9.0",
|
|
35
35
|
"@quenty/maid": "^3.5.0",
|
|
36
36
|
"@quenty/math": "^2.7.3",
|
|
37
37
|
"@quenty/qframe": "^10.12.1",
|
|
38
38
|
"@quenty/rx": "^13.20.0",
|
|
39
|
-
"@quenty/servicebag": "^11.13.
|
|
39
|
+
"@quenty/servicebag": "^11.13.2",
|
|
40
40
|
"@quenty/spring": "^10.9.1",
|
|
41
|
-
"@quenty/valueobject": "^13.21.
|
|
41
|
+
"@quenty/valueobject": "^13.21.3",
|
|
42
42
|
"@quenty/vector3utils": "^10.9.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
"publishConfig": {
|
|
48
48
|
"access": "public"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "821c9336020dfbcf5cd2f67f2dfe61624233ee06"
|
|
51
51
|
}
|
|
@@ -17,13 +17,15 @@ local CameraStack = setmetatable({}, BaseObject)
|
|
|
17
17
|
CameraStack.ClassName = "CameraStack"
|
|
18
18
|
CameraStack.__index = CameraStack
|
|
19
19
|
|
|
20
|
-
export type CameraStack =
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
20
|
+
export type CameraStack =
|
|
21
|
+
typeof(setmetatable(
|
|
22
|
+
{} :: {
|
|
23
|
+
_stack: { CameraEffectUtils.CameraLike },
|
|
24
|
+
_disabledSet: { [string]: boolean },
|
|
25
|
+
},
|
|
26
|
+
{} :: typeof({ __index = CameraStack })
|
|
27
|
+
))
|
|
28
|
+
& BaseObject.BaseObject
|
|
27
29
|
|
|
28
30
|
--[=[
|
|
29
31
|
Constructs a new camera stack
|
|
@@ -16,15 +16,17 @@ local GamepadRotateModel = setmetatable({}, BaseObject)
|
|
|
16
16
|
GamepadRotateModel.__index = GamepadRotateModel
|
|
17
17
|
GamepadRotateModel.ClassName = "GamepadRotateModel"
|
|
18
18
|
|
|
19
|
-
export type GamepadRotateModel =
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
19
|
+
export type GamepadRotateModel =
|
|
20
|
+
typeof(setmetatable(
|
|
21
|
+
{} :: {
|
|
22
|
+
_lastInputObject: InputObject?,
|
|
23
|
+
_rampVelocityX: AccelTween.AccelTween,
|
|
24
|
+
_rampVelocityY: AccelTween.AccelTween,
|
|
25
|
+
IsRotating: ValueObject.ValueObject<boolean>,
|
|
26
|
+
},
|
|
27
|
+
{} :: typeof({ __index = GamepadRotateModel })
|
|
28
|
+
))
|
|
29
|
+
& BaseObject.BaseObject
|
|
28
30
|
|
|
29
31
|
--[=[
|
|
30
32
|
Constructs a new GamepadRotateModel.
|
|
@@ -15,13 +15,15 @@ CustomCameraEffect.ClassName = "CustomCameraEffect"
|
|
|
15
15
|
|
|
16
16
|
export type ComputeCameraState = () -> CameraState.CameraState
|
|
17
17
|
|
|
18
|
-
export type CustomCameraEffect =
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
18
|
+
export type CustomCameraEffect =
|
|
19
|
+
typeof(setmetatable(
|
|
20
|
+
{} :: {
|
|
21
|
+
CameraState: CameraState.CameraState,
|
|
22
|
+
_getCurrentStateFunc: ComputeCameraState,
|
|
23
|
+
},
|
|
24
|
+
{} :: typeof({ __index = CustomCameraEffect })
|
|
25
|
+
))
|
|
26
|
+
& CameraEffectUtils.CameraEffect
|
|
25
27
|
|
|
26
28
|
--[=[
|
|
27
29
|
Constructs a new custom camera effect
|
|
@@ -28,17 +28,19 @@ local EPSILON = 0.001
|
|
|
28
28
|
local DefaultCamera = {}
|
|
29
29
|
DefaultCamera.ClassName = "DefaultCamera"
|
|
30
30
|
|
|
31
|
-
export type DefaultCamera =
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
31
|
+
export type DefaultCamera =
|
|
32
|
+
typeof(setmetatable(
|
|
33
|
+
{} :: {
|
|
34
|
+
CameraState: CameraState.CameraState,
|
|
35
|
+
_key: string,
|
|
36
|
+
_maid: Maid.Maid,
|
|
37
|
+
_isFirstPerson: ValueObject.ValueObject<boolean>,
|
|
38
|
+
_cameraState: CameraState.CameraState,
|
|
39
|
+
_lastCameraFrame: CameraFrame.CameraFrame?,
|
|
40
|
+
},
|
|
41
|
+
{} :: typeof({ __index = DefaultCamera })
|
|
42
|
+
))
|
|
43
|
+
& CameraEffectUtils.CameraEffect
|
|
42
44
|
|
|
43
45
|
--[=[
|
|
44
46
|
Constructs a new DefaultCamera
|
|
@@ -19,21 +19,23 @@ local SummedCamera = require("SummedCamera")
|
|
|
19
19
|
local FadeBetweenCamera3 = {}
|
|
20
20
|
FadeBetweenCamera3.ClassName = "FadeBetweenCamera3"
|
|
21
21
|
|
|
22
|
-
export type FadeBetweenCamera3 =
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
22
|
+
export type FadeBetweenCamera3 =
|
|
23
|
+
typeof(setmetatable(
|
|
24
|
+
{} :: {
|
|
25
|
+
_spring: Spring.Spring<number>,
|
|
26
|
+
CameraA: CameraEffectUtils.CameraLike,
|
|
27
|
+
CameraB: CameraEffectUtils.CameraLike,
|
|
28
|
+
HasReachedTarget: boolean,
|
|
29
|
+
Damper: number,
|
|
30
|
+
Value: number,
|
|
31
|
+
Speed: number,
|
|
32
|
+
Velocity: number,
|
|
33
|
+
Target: number,
|
|
34
|
+
Epsilon: number?,
|
|
35
|
+
},
|
|
36
|
+
{} :: typeof({ __index = FadeBetweenCamera3 })
|
|
37
|
+
))
|
|
38
|
+
& CameraEffectUtils.CameraEffect
|
|
37
39
|
|
|
38
40
|
--[=[
|
|
39
41
|
@param cameraA CameraLike
|
|
@@ -14,18 +14,20 @@ local SummedCamera = require("SummedCamera")
|
|
|
14
14
|
local FadingCamera = {}
|
|
15
15
|
FadingCamera.ClassName = "FadingCamera"
|
|
16
16
|
|
|
17
|
-
export type FadingCamera =
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
17
|
+
export type FadingCamera =
|
|
18
|
+
typeof(setmetatable(
|
|
19
|
+
{} :: {
|
|
20
|
+
CameraState: CameraState.CameraState,
|
|
21
|
+
Spring: Spring.Spring<number>,
|
|
22
|
+
Camera: CameraEffectUtils.CameraLike,
|
|
23
|
+
Damper: number,
|
|
24
|
+
Speed: number,
|
|
25
|
+
Target: number,
|
|
26
|
+
Value: number,
|
|
27
|
+
},
|
|
28
|
+
{} :: typeof({ __index = FadingCamera })
|
|
29
|
+
))
|
|
30
|
+
& CameraEffectUtils.CameraEffect
|
|
29
31
|
|
|
30
32
|
--[=[
|
|
31
33
|
@param camera CameraEffect
|
|
@@ -20,15 +20,17 @@ local HeartbeatCamera = {}
|
|
|
20
20
|
HeartbeatCamera.ClassName = "HeartbeatCamera"
|
|
21
21
|
HeartbeatCamera.ProfileName = "HeartbeatCamera"
|
|
22
22
|
|
|
23
|
-
export type HeartbeatCamera =
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
23
|
+
export type HeartbeatCamera =
|
|
24
|
+
typeof(setmetatable(
|
|
25
|
+
{} :: {
|
|
26
|
+
CameraState: CameraState.CameraState,
|
|
27
|
+
_maid: Maid.Maid,
|
|
28
|
+
_camera: CameraEffectUtils.CameraEffect,
|
|
29
|
+
_currentStateCache: CameraState.CameraState,
|
|
30
|
+
},
|
|
31
|
+
{} :: typeof({ __index = HeartbeatCamera })
|
|
32
|
+
))
|
|
33
|
+
& CameraEffectUtils.CameraEffect
|
|
32
34
|
|
|
33
35
|
function HeartbeatCamera.new(camera: CameraEffectUtils.CameraEffect): HeartbeatCamera
|
|
34
36
|
local self: HeartbeatCamera = setmetatable({} :: any, HeartbeatCamera)
|
|
@@ -19,17 +19,19 @@ local EPSILON = 1e-6
|
|
|
19
19
|
local ImpulseCamera = {}
|
|
20
20
|
ImpulseCamera.ClassName = "ImpulseCamera"
|
|
21
21
|
|
|
22
|
-
export type ImpulseCamera =
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
22
|
+
export type ImpulseCamera =
|
|
23
|
+
typeof(setmetatable(
|
|
24
|
+
{} :: {
|
|
25
|
+
CameraState: CameraState.CameraState,
|
|
26
|
+
Damper: number,
|
|
27
|
+
Speed: number,
|
|
28
|
+
Spring: Spring.Spring<Vector3>,
|
|
29
|
+
_defaultSpring: Spring.Spring<Vector3>,
|
|
30
|
+
_springs: { Spring.Spring<Vector3> },
|
|
31
|
+
},
|
|
32
|
+
{} :: typeof({ __index = ImpulseCamera })
|
|
33
|
+
))
|
|
34
|
+
& CameraEffectUtils.CameraEffect
|
|
33
35
|
|
|
34
36
|
function ImpulseCamera.new(): ImpulseCamera
|
|
35
37
|
local self: ImpulseCamera = setmetatable(
|
|
@@ -14,14 +14,16 @@ local SummedCamera = require("SummedCamera")
|
|
|
14
14
|
local InverseFader = {}
|
|
15
15
|
InverseFader.ClassName = "InverseFader"
|
|
16
16
|
|
|
17
|
-
export type InverseFader =
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
17
|
+
export type InverseFader =
|
|
18
|
+
typeof(setmetatable(
|
|
19
|
+
{} :: {
|
|
20
|
+
CameraState: CameraState.CameraState,
|
|
21
|
+
_camera: CameraEffectUtils.CameraEffect,
|
|
22
|
+
_fader: FadingCamera.FadingCamera,
|
|
23
|
+
},
|
|
24
|
+
{} :: typeof({ __index = InverseFader })
|
|
25
|
+
))
|
|
26
|
+
& CameraEffectUtils.CameraEffect
|
|
25
27
|
|
|
26
28
|
function InverseFader.new(camera: CameraEffectUtils.CameraEffect, fader: FadingCamera.FadingCamera)
|
|
27
29
|
local self: InverseFader = setmetatable({} :: any, InverseFader)
|
|
@@ -16,19 +16,21 @@ LagPointCamera.ClassName = "LagPointCamera"
|
|
|
16
16
|
LagPointCamera._FocusCamera = nil
|
|
17
17
|
LagPointCamera._OriginCamera = nil
|
|
18
18
|
|
|
19
|
-
export type LagPointCamera =
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
19
|
+
export type LagPointCamera =
|
|
20
|
+
typeof(setmetatable(
|
|
21
|
+
{} :: {
|
|
22
|
+
CameraState: CameraState.CameraState,
|
|
23
|
+
Origin: CameraState.CameraState,
|
|
24
|
+
FocusCamera: CameraEffectUtils.CameraEffect,
|
|
25
|
+
OriginCamera: CameraEffectUtils.CameraEffect,
|
|
26
|
+
FocusSpring: Spring.Spring<Vector3>,
|
|
27
|
+
LastFocusUpdate: number,
|
|
28
|
+
FocusPosition: Vector3,
|
|
29
|
+
Speed: number,
|
|
30
|
+
},
|
|
31
|
+
{} :: typeof({ __index = LagPointCamera })
|
|
32
|
+
))
|
|
33
|
+
& CameraEffectUtils.CameraEffect
|
|
32
34
|
|
|
33
35
|
--[=[
|
|
34
36
|
Camera that lags behind the actual camera.
|
|
@@ -24,15 +24,17 @@ local Vector3Utils = require("Vector3Utils")
|
|
|
24
24
|
local OverrideDefaultCameraToo = {}
|
|
25
25
|
OverrideDefaultCameraToo.ClassName = "OverrideDefaultCameraToo"
|
|
26
26
|
|
|
27
|
-
export type OverrideDefaultCameraToo =
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
27
|
+
export type OverrideDefaultCameraToo =
|
|
28
|
+
typeof(setmetatable(
|
|
29
|
+
{} :: {
|
|
30
|
+
CameraState: CameraState.CameraState,
|
|
31
|
+
BaseCamera: CameraEffectUtils.CameraEffect,
|
|
32
|
+
DefaultCamera: CameraEffectUtils.CameraEffect,
|
|
33
|
+
Predicate: ((CameraState.CameraState) -> boolean)?,
|
|
34
|
+
},
|
|
35
|
+
{} :: typeof({ __index = OverrideDefaultCameraToo })
|
|
36
|
+
))
|
|
37
|
+
& CameraEffectUtils.CameraEffect
|
|
36
38
|
|
|
37
39
|
--[=[
|
|
38
40
|
Initializes a new OverrideDefaultCameraToo
|
|
@@ -13,16 +13,18 @@ local SummedCamera = require("SummedCamera")
|
|
|
13
13
|
local PointCamera = {}
|
|
14
14
|
PointCamera.ClassName = "PointCamera"
|
|
15
15
|
|
|
16
|
-
export type PointCamera =
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
16
|
+
export type PointCamera =
|
|
17
|
+
typeof(setmetatable(
|
|
18
|
+
{} :: {
|
|
19
|
+
CameraState: CameraState.CameraState,
|
|
20
|
+
OriginCamera: CameraEffectUtils.CameraEffect,
|
|
21
|
+
FocusCamera: CameraEffectUtils.CameraEffect,
|
|
22
|
+
Origin: CameraState.CameraState,
|
|
23
|
+
Focus: CameraState.CameraState,
|
|
24
|
+
},
|
|
25
|
+
{} :: typeof({ __index = PointCamera })
|
|
26
|
+
))
|
|
27
|
+
& CameraEffectUtils.CameraEffect
|
|
26
28
|
|
|
27
29
|
--[=[
|
|
28
30
|
Initializes a new PointCamera
|
|
@@ -27,24 +27,26 @@ PushCamera.DefaultAngleXZ0 = 0
|
|
|
27
27
|
PushCamera._lastUpdateTime = -1
|
|
28
28
|
PushCamera.PushBackAfter = 0.5
|
|
29
29
|
|
|
30
|
-
export type PushCamera =
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
30
|
+
export type PushCamera =
|
|
31
|
+
typeof(setmetatable(
|
|
32
|
+
{} :: {
|
|
33
|
+
CameraState: CameraState.CameraState,
|
|
34
|
+
AngleX: number,
|
|
35
|
+
AngleY: number,
|
|
36
|
+
AngleXZ: number,
|
|
37
|
+
LastUpdateTime: number,
|
|
38
|
+
MinX: number,
|
|
39
|
+
MinY: number,
|
|
40
|
+
MaxY: number,
|
|
41
|
+
Rotation: CFrame,
|
|
42
|
+
CFrame: CFrame,
|
|
43
|
+
PushBackDelta: number,
|
|
44
|
+
PercentFaded: number,
|
|
45
|
+
PercentFadedCurved: number,
|
|
46
|
+
},
|
|
47
|
+
{} :: typeof({ __index = PushCamera })
|
|
48
|
+
))
|
|
49
|
+
& CameraEffectUtils.CameraEffect
|
|
48
50
|
|
|
49
51
|
--[=[
|
|
50
52
|
Constructs a new PushCamera
|
|
@@ -17,17 +17,19 @@ local getRotationInXZPlane = require("getRotationInXZPlane")
|
|
|
17
17
|
local RotatedCamera = {}
|
|
18
18
|
RotatedCamera.ClassName = "RotatedCamera"
|
|
19
19
|
|
|
20
|
-
export type RotatedCamera =
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
20
|
+
export type RotatedCamera =
|
|
21
|
+
typeof(setmetatable(
|
|
22
|
+
{} :: {
|
|
23
|
+
CameraState: CameraState.CameraState,
|
|
24
|
+
CFrame: CFrame,
|
|
25
|
+
AngleX: number,
|
|
26
|
+
AngleY: number,
|
|
27
|
+
MaxY: number,
|
|
28
|
+
MinY: number,
|
|
29
|
+
},
|
|
30
|
+
{} :: typeof({ __index = RotatedCamera })
|
|
31
|
+
))
|
|
32
|
+
& CameraEffectUtils.CameraEffect
|
|
31
33
|
|
|
32
34
|
-- Max/Min aim up and down
|
|
33
35
|
RotatedCamera._maxY = math.rad(80)
|
|
@@ -16,15 +16,17 @@ local SummedCamera = require("SummedCamera")
|
|
|
16
16
|
local SmoothPositionCamera = {}
|
|
17
17
|
SmoothPositionCamera.ClassName = "SmoothPositionCamera"
|
|
18
18
|
|
|
19
|
-
export type SmoothPositionCamera =
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
19
|
+
export type SmoothPositionCamera =
|
|
20
|
+
typeof(setmetatable(
|
|
21
|
+
{} :: {
|
|
22
|
+
CameraState: CameraState.CameraState,
|
|
23
|
+
Spring: Spring.Spring<Vector3>,
|
|
24
|
+
BaseCamera: CameraEffectUtils.CameraEffect,
|
|
25
|
+
Speed: number,
|
|
26
|
+
},
|
|
27
|
+
{} :: typeof({ __index = SmoothPositionCamera })
|
|
28
|
+
))
|
|
29
|
+
& CameraEffectUtils.CameraEffect
|
|
28
30
|
|
|
29
31
|
function SmoothPositionCamera.new(baseCamera): SmoothPositionCamera
|
|
30
32
|
local self: SmoothPositionCamera = setmetatable({} :: any, SmoothPositionCamera)
|
|
@@ -18,31 +18,33 @@ local getRotationInXZPlane = require("getRotationInXZPlane")
|
|
|
18
18
|
local SmoothRotatedCamera = {}
|
|
19
19
|
SmoothRotatedCamera.ClassName = "SmoothRotatedCamera"
|
|
20
20
|
|
|
21
|
-
export type SmoothRotatedCamera =
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
21
|
+
export type SmoothRotatedCamera =
|
|
22
|
+
typeof(setmetatable(
|
|
23
|
+
{} :: {
|
|
24
|
+
AngleX: number,
|
|
25
|
+
AngleXZ: number,
|
|
26
|
+
RenderAngleXZ: number,
|
|
27
|
+
AngleY: number,
|
|
28
|
+
CFrame: CFrame,
|
|
29
|
+
RenderAngleY: number,
|
|
30
|
+
CameraState: CameraState.CameraState,
|
|
31
|
+
MaxY: number,
|
|
32
|
+
MinY: number,
|
|
33
|
+
Rotation: CFrame,
|
|
34
|
+
Speed: number,
|
|
35
|
+
ZoomGiveY: number,
|
|
36
|
+
SpeedAngleX: number,
|
|
37
|
+
SpeedAngleY: number,
|
|
38
|
+
SpringX: Spring.Spring<number>,
|
|
39
|
+
SpringY: Spring.Spring<number>,
|
|
40
|
+
TargetAngleX: number,
|
|
41
|
+
TargetAngleXZ: number,
|
|
42
|
+
TargetAngleY: number,
|
|
43
|
+
TargetXZ: number,
|
|
44
|
+
},
|
|
45
|
+
{} :: typeof({ __index = SmoothRotatedCamera })
|
|
46
|
+
))
|
|
47
|
+
& CameraEffectUtils.CameraEffect
|
|
46
48
|
|
|
47
49
|
-- Max/Min aim up and down
|
|
48
50
|
SmoothRotatedCamera._maxY = math.rad(80)
|
|
@@ -20,22 +20,24 @@ SmoothZoomedCamera._maxZoom = 100
|
|
|
20
20
|
SmoothZoomedCamera._minZoom = 0.5
|
|
21
21
|
SmoothZoomedCamera.BounceAtEnd = true
|
|
22
22
|
|
|
23
|
-
export type SmoothZoomedCamera =
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
23
|
+
export type SmoothZoomedCamera =
|
|
24
|
+
typeof(setmetatable(
|
|
25
|
+
{} :: {
|
|
26
|
+
CameraState: CameraState.CameraState,
|
|
27
|
+
Zoom: number,
|
|
28
|
+
Speed: number,
|
|
29
|
+
Range: number,
|
|
30
|
+
MaxZoom: number,
|
|
31
|
+
MinZoom: number,
|
|
32
|
+
Target: number,
|
|
33
|
+
Value: number,
|
|
34
|
+
Velocity: number,
|
|
35
|
+
TargetZoom: number,
|
|
36
|
+
Spring: Spring.Spring<number>,
|
|
37
|
+
},
|
|
38
|
+
{} :: typeof({ __index = SmoothZoomedCamera })
|
|
39
|
+
))
|
|
40
|
+
& CameraEffectUtils.CameraEffect
|
|
39
41
|
|
|
40
42
|
function SmoothZoomedCamera.new(): SmoothZoomedCamera
|
|
41
43
|
local self: SmoothZoomedCamera = setmetatable({} :: any, SmoothZoomedCamera)
|
|
@@ -16,17 +16,19 @@ SummedCamera.ClassName = "SummedCamera"
|
|
|
16
16
|
|
|
17
17
|
export type SummedCameraMode = "World" | "Relative"
|
|
18
18
|
|
|
19
|
-
export type SummedCamera =
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
19
|
+
export type SummedCamera =
|
|
20
|
+
typeof(setmetatable(
|
|
21
|
+
{} :: {
|
|
22
|
+
CameraState: CameraState.CameraState,
|
|
23
|
+
CameraAState: CameraState.CameraState,
|
|
24
|
+
CameraBState: CameraState.CameraState,
|
|
25
|
+
_cameraA: CameraEffectUtils.CameraEffect,
|
|
26
|
+
_cameraB: CameraEffectUtils.CameraEffect,
|
|
27
|
+
_mode: SummedCameraMode,
|
|
28
|
+
},
|
|
29
|
+
{} :: typeof({ __index = SummedCamera })
|
|
30
|
+
))
|
|
31
|
+
& CameraEffectUtils.CameraEffect
|
|
30
32
|
|
|
31
33
|
--[=[
|
|
32
34
|
Construct a new summed camera
|
|
@@ -14,13 +14,15 @@ local TrackCamera = {}
|
|
|
14
14
|
TrackCamera.ClassName = "TrackCamera"
|
|
15
15
|
TrackCamera.FieldOfView = 0
|
|
16
16
|
|
|
17
|
-
export type TrackCamera =
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
17
|
+
export type TrackCamera =
|
|
18
|
+
typeof(setmetatable(
|
|
19
|
+
{} :: {
|
|
20
|
+
CameraState: CameraState.CameraState,
|
|
21
|
+
CameraSubject: Instance?,
|
|
22
|
+
},
|
|
23
|
+
{} :: typeof({ __index = TrackCamera })
|
|
24
|
+
))
|
|
25
|
+
& CameraEffectUtils.CameraEffect
|
|
24
26
|
|
|
25
27
|
--[=[
|
|
26
28
|
|
|
@@ -14,13 +14,15 @@ local getRotationInXZPlane = require("getRotationInXZPlane")
|
|
|
14
14
|
local XZPlaneLockCamera = {}
|
|
15
15
|
XZPlaneLockCamera.ClassName = "XZPlaneLockCamera"
|
|
16
16
|
|
|
17
|
-
export type XZPlaneLockCamera =
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
17
|
+
export type XZPlaneLockCamera =
|
|
18
|
+
typeof(setmetatable(
|
|
19
|
+
{} :: {
|
|
20
|
+
CameraState: CameraState.CameraState,
|
|
21
|
+
_camera: CameraEffectUtils.CameraLike,
|
|
22
|
+
},
|
|
23
|
+
{} :: typeof({ __index = XZPlaneLockCamera })
|
|
24
|
+
))
|
|
25
|
+
& CameraEffectUtils.CameraEffect
|
|
24
26
|
|
|
25
27
|
function XZPlaneLockCamera.new(camera: CameraEffectUtils.CameraLike): XZPlaneLockCamera
|
|
26
28
|
local self: XZPlaneLockCamera = setmetatable({} :: any, XZPlaneLockCamera)
|
|
@@ -28,20 +28,22 @@ ZoomedCamera._maxZoom = 100
|
|
|
28
28
|
ZoomedCamera._minZoom = 0.5
|
|
29
29
|
ZoomedCamera._zoom = 10
|
|
30
30
|
|
|
31
|
-
export type ZoomedCamera =
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
31
|
+
export type ZoomedCamera =
|
|
32
|
+
typeof(setmetatable(
|
|
33
|
+
{} :: {
|
|
34
|
+
CameraState: CameraState.CameraState,
|
|
35
|
+
Zoom: number,
|
|
36
|
+
MaxZoom: number,
|
|
37
|
+
MinZoom: number,
|
|
38
|
+
|
|
39
|
+
-- Private
|
|
40
|
+
_zoom: number,
|
|
41
|
+
_maxZoom: number,
|
|
42
|
+
_minZoom: number,
|
|
43
|
+
},
|
|
44
|
+
{} :: typeof({ __index = ZoomedCamera })
|
|
45
|
+
))
|
|
46
|
+
& CameraEffectUtils.CameraEffect
|
|
45
47
|
|
|
46
48
|
function ZoomedCamera.new(): ZoomedCamera
|
|
47
49
|
local self: ZoomedCamera = setmetatable({} :: any, ZoomedCamera)
|
|
@@ -20,15 +20,17 @@ local CameraStateTweener = setmetatable({}, BaseObject)
|
|
|
20
20
|
CameraStateTweener.ClassName = "CameraStateTweener"
|
|
21
21
|
CameraStateTweener.__index = CameraStateTweener
|
|
22
22
|
|
|
23
|
-
export type CameraStateTweener =
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
23
|
+
export type CameraStateTweener =
|
|
24
|
+
typeof(setmetatable(
|
|
25
|
+
{} :: {
|
|
26
|
+
_cameraStack: CameraStack.CameraStack,
|
|
27
|
+
_cameraEffect: any,
|
|
28
|
+
_cameraBelow: any,
|
|
29
|
+
_fadeBetween: FadeBetweenCamera3.FadeBetweenCamera3,
|
|
30
|
+
},
|
|
31
|
+
{} :: typeof({ __index = CameraStateTweener })
|
|
32
|
+
))
|
|
33
|
+
& BaseObject.BaseObject
|
|
32
34
|
|
|
33
35
|
--[=[
|
|
34
36
|
Constructs a new camera state tweener
|