-
Notifications
You must be signed in to change notification settings - Fork 1.3k
/
constants.js
221 lines (198 loc) · 6.04 KB
/
constants.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
/**
* Inline - always available type of session. It has limited features availability and is rendered
* into HTML element.
*
* @type {string}
* @category XR
*/
export const XRTYPE_INLINE = 'inline';
/**
* Immersive VR - session that provides exclusive access to VR device with best available tracking
* features.
*
* @type {string}
* @category XR
*/
export const XRTYPE_VR = 'immersive-vr';
/**
* Immersive AR - session that provides exclusive access to VR/AR device that is intended to be
* blended with real-world environment.
*
* @type {string}
* @category XR
*/
export const XRTYPE_AR = 'immersive-ar';
/**
* Viewer - always supported space with some basic tracking capabilities.
*
* @type {string}
* @category XR
*/
export const XRSPACE_VIEWER = 'viewer';
/**
* Local - represents a tracking space with a native origin near the viewer at the time of
* creation. The exact position and orientation will be initialized based on the conventions of the
* underlying platform. When using this reference space the user is not expected to move beyond
* their initial position much, if at all, and tracking is optimized for that purpose. For devices
* with 6DoF tracking, local reference spaces should emphasize keeping the origin stable relative
* to the user's environment.
*
* @type {string}
* @category XR
*/
export const XRSPACE_LOCAL = 'local';
/**
* Local Floor - represents a tracking space with a native origin at the floor in a safe position
* for the user to stand. The y axis equals 0 at floor level, with the x and z position and
* orientation initialized based on the conventions of the underlying platform. Floor level value
* might be estimated by the underlying platform. When using this reference space, the user is not
* expected to move beyond their initial position much, if at all, and tracking is optimized for
* that purpose. For devices with 6DoF tracking, local-floor reference spaces should emphasize
* keeping the origin stable relative to the user's environment.
*
* @type {string}
* @category XR
*/
export const XRSPACE_LOCALFLOOR = 'local-floor';
/**
* Bounded Floor - represents a tracking space with its native origin at the floor, where the user
* is expected to move within a pre-established boundary. Tracking in a bounded-floor reference
* space is optimized for keeping the native origin and bounds geometry stable relative to the
* user's environment.
*
* @type {string}
* @category XR
*/
export const XRSPACE_BOUNDEDFLOOR = 'bounded-floor';
/**
* Unbounded - represents a tracking space where the user is expected to move freely around their
* environment, potentially even long distances from their starting point. Tracking in an unbounded
* reference space is optimized for stability around the user's current position, and as such the
* native origin may drift over time.
*
* @type {string}
* @category XR
*/
export const XRSPACE_UNBOUNDED = 'unbounded';
/**
* Gaze - indicates the target ray will originate at the viewer and follow the direction it is
* facing. This is commonly referred to as a "gaze input" device in the context of head-mounted
* displays.
*
* @type {string}
* @category XR
*/
export const XRTARGETRAY_GAZE = 'gaze';
/**
* Screen - indicates that the input source was an interaction with the canvas element associated
* with an inline session's output context, such as a mouse click or touch event.
*
* @type {string}
* @category XR
*/
export const XRTARGETRAY_SCREEN = 'screen';
/**
* Tracked Pointer - indicates that the target ray originates from either a handheld device or
* other hand-tracking mechanism and represents that the user is using their hands or the held
* device for pointing.
*
* @type {string}
* @category XR
*/
export const XRTARGETRAY_POINTER = 'tracked-pointer';
/**
* None - view associated with a monoscopic screen, such as mobile phone screens.
*
* @type {string}
* @category XR
*/
export const XREYE_NONE = 'none';
/**
* Left - view associated with left eye.
*
* @type {string}
* @category XR
*/
export const XREYE_LEFT = 'left';
/**
* Right - view associated with right eye.
*
* @type {string}
* @category XR
*/
export const XREYE_RIGHT = 'right';
/**
* None - input source is not meant to be held in hands.
*
* @type {string}
* @category XR
*/
export const XRHAND_NONE = 'none';
/**
* Left - indicates that input source is meant to be held in left hand.
*
* @type {string}
* @category XR
*/
export const XRHAND_LEFT = 'left';
/**
* Right - indicates that input source is meant to be held in right hand.
*
* @type {string}
* @category XR
*/
export const XRHAND_RIGHT = 'right';
/**
* Point - indicates that the hit test results will be computed based on the feature points
* detected by the underlying Augmented Reality system.
*
* @type {string}
* @category XR
*/
export const XRTRACKABLE_POINT = 'point';
/**
* Plane - indicates that the hit test results will be computed based on the planes detected by the
* underlying Augmented Reality system.
*
* @type {string}
* @category XR
*/
export const XRTRACKABLE_PLANE = 'plane';
/**
* Mesh - indicates that the hit test results will be computed based on the meshes detected by the
* underlying Augmented Reality system.
*
* @type {string}
* @category XR
*/
export const XRTRACKABLE_MESH = 'mesh';
/**
* CPU - indicates that depth sensing preferred usage is CPU. This usage path is guaranteed to be
* supported.
*
* @type {string}
* @category XR
*/
export const XRDEPTHSENSINGUSAGE_CPU = 'cpu-optimized';
/**
* GPU - indicates that depth sensing preferred usage is GPU.
*
* @type {string}
* @category XR
*/
export const XRDEPTHSENSINGUSAGE_GPU = 'gpu-optimized';
/**
* Luminance Alpha - indicates that depth sensing preferred raw data format is Luminance Alpha.
* This format is guaranteed to be supported.
*
* @type {string}
* @category XR
*/
export const XRDEPTHSENSINGFORMAT_L8A8 = 'luminance-alpha';
/**
* Float 32 - indicates that depth sensing preferred raw data format is Float 32.
*
* @type {string}
* @category XR
*/
export const XRDEPTHSENSINGFORMAT_F32 = 'float32';