You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Scripts/BaseClasses/PanZoomBase.cs
+9-14Lines changed: 9 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -27,23 +27,23 @@ public abstract class PanZoomBase : MonoBehaviour,
27
27
/// Ability to pan using your eye gaze without any additional input (e.g., air tap or
28
28
/// button presses).
29
29
/// </summary>
30
-
internalboolAutoGazePanIsActive=true;
30
+
internalboolautoGazePanIsActive=true;
31
31
32
32
/// <summary>
33
33
/// Horizontal panning speed. For example: 0.1f for slow panning. 0.6f for fast panning.
34
34
/// </summary>
35
-
internalfloatPanSpeedLeftRight;// Comment: This could be improved by using panning step sizes depending on the zoom level.
35
+
internalfloatpanSpeedLeftRight;// Comment: This could be improved by using panning step sizes depending on the zoom level.
36
36
37
37
/// <summary>
38
38
/// Vertical panning speed. For example: 0.1f for slow panning. 0.6f for fast panning.
39
39
/// </summary>
40
-
internalfloatPanSpeedUpDown;
40
+
internalfloatpanSpeedUpDown;
41
41
42
42
/// <summary>
43
43
/// Minimal distance in x and y from center of the target (0, 0) to trigger panning. Thus,
44
44
/// values must range between 0 (always panning) and 0.5 (no panning).
Copy file name to clipboardExpand all lines: Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Scripts/BaseClasses/PanZoomBase_RectTransf.cs
Copy file name to clipboardExpand all lines: Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Scripts/BaseClasses/PanZoomBase_Texture.cs
+5-4Lines changed: 5 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -26,8 +26,9 @@ public string TextureShaderProperty
26
26
}
27
27
}
28
28
29
+
[Tooltip("Underlying aspect ratio of the loaded texture to correctly determine scaling.")]
29
30
[SerializeField]
30
-
privatefloatDefaultAspectRatio=1.0f;
31
+
privatefloatdefaultAspectRatio=1.0f;
31
32
32
33
privatefloataspectRatio=-1;
33
34
@@ -37,7 +38,7 @@ public override void Initialize()
37
38
{
38
39
if(aspectRatio==-1)
39
40
{
40
-
Initialize(DefaultAspectRatio);
41
+
Initialize(defaultAspectRatio);
41
42
}
42
43
else
43
44
{
@@ -141,8 +142,8 @@ public override void ZoomIn()
141
142
ZoomInOut(zoomDir*zoomSpeed,cursorPos);
142
143
143
144
// Panning across entire target (-0.5, +0.5) to move target of interest towards center while zooming in
Copy file name to clipboardExpand all lines: Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/Demo_ScrollPanZoom/Scripts/PanZoom_RectTransf.cs
+59-63Lines changed: 59 additions & 63 deletions
Original file line number
Diff line number
Diff line change
@@ -13,111 +13,107 @@ public class PanZoom_RectTransf : PanZoomBase_RectTransf
13
13
{
14
14
[Tooltip("RectTransform from, for example, your TextMeshPro game object.")]
15
15
[SerializeField]
16
-
privateRectTransformRectTransfToNavigate=null;
16
+
privateRectTransformrectTransfToNavigate=null;
17
17
18
18
[Tooltip("Reference to the viewport restricting the viewbox. This is important for identifying the max constrains for panning.")]
19
19
[SerializeField]
20
-
privateRectTransformRefToViewPort=null;
20
+
privateRectTransformrefToViewPort=null;
21
21
22
-
// Scroll
23
-
[Tooltip("Ability to scroll using your eye gaze without any additional input (e.g., air tap or button presses).")]
22
+
// Zoom
23
+
[Tooltip("Zoom acceleration defining the steepness of logistic speed function mapping.")]
24
24
[SerializeField]
25
-
privateboolAutoGazeScrollIsActive=true;
25
+
privatefloatzoomAcceleration=10f;
26
26
27
-
[Tooltip("Horizontal scroll speed. For example: 0.1f for slow panning. 0.6f for fast panning.")]
27
+
[Tooltip("Maximum zoom speed.")]
28
28
[SerializeField]
29
-
privatefloatScrollSpeed_x=0.2f;
29
+
privatefloatzoomSpeedMax=0.02f;
30
30
31
-
[Tooltip("Vertical scroll speed. For example: 0.1f for slow panning. 0.6f for fast panning.")]
31
+
[Tooltip("Minimum scale of the texture for zoom in - e.g., 0.5f (half the original size)")]
32
32
[SerializeField]
33
-
privatefloatScrollSpeed_y=0.2f;
33
+
privatefloatzoomMinScale=0.1f;
34
34
35
-
[Tooltip("Minimal distance in x and y from center of the target's hit box (0, 0) to scroll. Thus, values must range between 0 (always scroll) and 0.5 (no scroll).")]
35
+
[Tooltip("Maximum scale of the texture for zoom out - e.g., 1f (the original size) or 2.0f (double the original size).")]
[Tooltip("Set to true to prevent sudden scrolling when quickly looking around. This may make scrolling feel less responsive though.")]
39
+
[Tooltip("Timed zoom: Once triggered, a zoom in/out will be performed for the given amount of time in seconds.")]
40
40
[SerializeField]
41
-
privateboolUseSkimProofing=false;
41
+
privatefloatzoomTimeInSecToZoom=0.5f;
42
42
43
-
[Tooltip("The lower the value, the slower the scrolling will speed up after skimming. Recommended value: 5.")]
43
+
[Tooltip("Enable or disable hand gestures for zooming on startup.")]
44
44
[SerializeField]
45
-
[Range(0,10)]
46
-
privatefloatSkimProofUpdateSpeed=5f;
45
+
privateboolzoomGestureEnabledOnStartup=false;
47
46
48
-
// Zoom
49
-
[Tooltip("Zoom acceleration defining the steepness of logistic speed function mapping.")]
47
+
// Pan
48
+
[Tooltip("Ability to scroll using your eye gaze without any additional input (e.g., air tap or button presses).")]
50
49
[SerializeField]
51
-
privatefloatZoom_Acceleration=10f;
50
+
privateboolpanAutoScrollIsActive=true;
52
51
53
-
[Tooltip("Maximum zoom speed.")]
52
+
[Tooltip("Horizontal scroll speed. For example: 0.1f for slow panning. 0.6f for fast panning.")]
54
53
[SerializeField]
55
-
privatefloatZoom_SpeedMax=0.02f;
54
+
privatefloatpanSpeedHorizontal=0.3f;
56
55
57
-
[Tooltip("Minimum scale of the texture for zoom in - e.g., 0.5f (half the original size)")]
56
+
[Tooltip("Vertical scroll speed. For example: 0.1f for slow panning. 0.6f for fast panning.")]
58
57
[SerializeField]
59
-
privatefloatZoom_MinScale=0.1f;
58
+
privatefloatpanSpeedVertical=0.3f;
60
59
61
-
[Tooltip("Maximum scale of the texture for zoom out - e.g., 1f (the original size) or 2.0f (double the original size).")]
60
+
[Tooltip("Minimal distance in x and y from center of the target's hit box (0, 0) to scroll. Thus, values must range between 0 (always scroll) and 0.5 (no scroll).")]
0 commit comments