@iwer/devui 0.2.0 → 1.0.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.
Files changed (119) hide show
  1. package/build/iwer-devui.js +5190 -2892
  2. package/build/iwer-devui.min.js +268 -127
  3. package/build/iwer-devui.module.js +5190 -2892
  4. package/build/iwer-devui.module.min.js +268 -127
  5. package/lib/components/analog.d.ts.map +1 -1
  6. package/lib/components/analog.js +11 -13
  7. package/lib/components/analog.js.map +1 -1
  8. package/lib/components/binary.d.ts.map +1 -1
  9. package/lib/components/binary.js +15 -17
  10. package/lib/components/binary.js.map +1 -1
  11. package/lib/components/controls.d.ts +11 -2
  12. package/lib/components/controls.d.ts.map +1 -1
  13. package/lib/components/controls.js +61 -27
  14. package/lib/components/controls.js.map +1 -1
  15. package/lib/components/fov.d.ts.map +1 -1
  16. package/lib/components/fov.js +0 -1
  17. package/lib/components/fov.js.map +1 -1
  18. package/lib/components/header.d.ts +0 -4
  19. package/lib/components/header.d.ts.map +1 -1
  20. package/lib/components/header.js +75 -61
  21. package/lib/components/header.js.map +1 -1
  22. package/lib/components/headset.d.ts +17 -0
  23. package/lib/components/headset.d.ts.map +1 -0
  24. package/lib/components/headset.js +91 -0
  25. package/lib/components/headset.js.map +1 -0
  26. package/lib/components/icons.d.ts +8 -1
  27. package/lib/components/icons.d.ts.map +1 -1
  28. package/lib/components/icons.js +53 -27
  29. package/lib/components/icons.js.map +1 -1
  30. package/lib/components/joystick.d.ts.map +1 -1
  31. package/lib/components/joystick.js +56 -60
  32. package/lib/components/joystick.js.map +1 -1
  33. package/lib/components/mapper.d.ts +7 -3
  34. package/lib/components/mapper.d.ts.map +1 -1
  35. package/lib/components/mapper.js +34 -60
  36. package/lib/components/mapper.js.map +1 -1
  37. package/lib/components/styled.d.ts +48 -6
  38. package/lib/components/styled.d.ts.map +1 -1
  39. package/lib/components/styled.js +215 -36
  40. package/lib/components/styled.js.map +1 -1
  41. package/lib/components/vec3.d.ts +25 -0
  42. package/lib/components/vec3.d.ts.map +1 -0
  43. package/lib/components/vec3.js +90 -0
  44. package/lib/components/vec3.js.map +1 -0
  45. package/lib/index.d.ts +8 -12
  46. package/lib/index.d.ts.map +1 -1
  47. package/lib/index.js +71 -56
  48. package/lib/index.js.map +1 -1
  49. package/lib/package.json +55 -0
  50. package/lib/scene.d.ts +23 -40
  51. package/lib/scene.d.ts.map +1 -1
  52. package/lib/scene.js +160 -192
  53. package/lib/scene.js.map +1 -1
  54. package/lib/src/components/analog.d.ts +17 -0
  55. package/lib/src/components/analog.d.ts.map +1 -0
  56. package/lib/src/components/analog.js +111 -0
  57. package/lib/src/components/analog.js.map +1 -0
  58. package/lib/src/components/binary.d.ts +17 -0
  59. package/lib/src/components/binary.d.ts.map +1 -0
  60. package/lib/src/components/binary.js +77 -0
  61. package/lib/src/components/binary.js.map +1 -0
  62. package/lib/src/components/controls.d.ts +29 -0
  63. package/lib/src/components/controls.d.ts.map +1 -0
  64. package/lib/src/components/controls.js +139 -0
  65. package/lib/src/components/controls.js.map +1 -0
  66. package/lib/src/components/fov.d.ts +16 -0
  67. package/lib/src/components/fov.d.ts.map +1 -0
  68. package/lib/src/components/fov.js +30 -0
  69. package/lib/src/components/fov.js.map +1 -0
  70. package/lib/src/components/header.d.ts +20 -0
  71. package/lib/src/components/header.d.ts.map +1 -0
  72. package/lib/src/components/header.js +47 -0
  73. package/lib/src/components/header.js.map +1 -0
  74. package/lib/src/components/headset.d.ts +17 -0
  75. package/lib/src/components/headset.d.ts.map +1 -0
  76. package/lib/src/components/headset.js +29 -0
  77. package/lib/src/components/headset.js.map +1 -0
  78. package/lib/src/components/icons.d.ts +37 -0
  79. package/lib/src/components/icons.d.ts.map +1 -0
  80. package/lib/src/components/icons.js +265 -0
  81. package/lib/src/components/icons.js.map +1 -0
  82. package/lib/src/components/joystick.d.ts +21 -0
  83. package/lib/src/components/joystick.d.ts.map +1 -0
  84. package/lib/src/components/joystick.js +245 -0
  85. package/lib/src/components/joystick.js.map +1 -0
  86. package/lib/src/components/keys.d.ts +10 -0
  87. package/lib/src/components/keys.d.ts.map +1 -0
  88. package/lib/src/components/keys.js +74 -0
  89. package/lib/src/components/keys.js.map +1 -0
  90. package/lib/src/components/mapper.d.ts +22 -0
  91. package/lib/src/components/mapper.d.ts.map +1 -0
  92. package/lib/src/components/mapper.js +108 -0
  93. package/lib/src/components/mapper.js.map +1 -0
  94. package/lib/src/components/styled.d.ts +70 -0
  95. package/lib/src/components/styled.d.ts.map +1 -0
  96. package/lib/src/components/styled.js +272 -0
  97. package/lib/src/components/styled.js.map +1 -0
  98. package/lib/src/components/vec3.d.ts +22 -0
  99. package/lib/src/components/vec3.d.ts.map +1 -0
  100. package/lib/src/components/vec3.js +123 -0
  101. package/lib/src/components/vec3.js.map +1 -0
  102. package/lib/src/index.d.ts +22 -0
  103. package/lib/src/index.d.ts.map +1 -0
  104. package/lib/src/index.js +92 -0
  105. package/lib/src/index.js.map +1 -0
  106. package/lib/src/scene.d.ts +51 -0
  107. package/lib/src/scene.d.ts.map +1 -0
  108. package/lib/src/scene.js +250 -0
  109. package/lib/src/scene.js.map +1 -0
  110. package/lib/version.d.ts +2 -0
  111. package/lib/version.d.ts.map +1 -0
  112. package/lib/version.js +2 -0
  113. package/lib/version.js.map +1 -0
  114. package/package.json +6 -3
  115. package/build/iwe.min.js +0 -180
  116. package/lib/components/settings.d.ts +0 -50
  117. package/lib/components/settings.d.ts.map +0 -1
  118. package/lib/components/settings.js +0 -103
  119. package/lib/components/settings.js.map +0 -1
@@ -6,69 +6,159 @@
6
6
  */
7
7
  import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
8
8
  import { styled } from 'styled-components';
9
+ export const Colors = {
10
+ textWhite: 'rgba(223, 223, 223, 1)',
11
+ textGrey: 'rgba(156, 156, 156, 1)',
12
+ dangerRed: 'rgba(243, 151, 143, 1)',
13
+ dangerRedPressed: 'rgba(240, 97, 84,1)',
14
+ panelBackground: 'rgba(38, 38, 38, 0.7)',
15
+ panelBorder: 'rgba(61, 61, 63, 0.7)',
16
+ buttonBackground: 'rgba(61, 61, 63, 0.6)',
17
+ buttonHovered: 'rgba(61, 61, 63, 0.8)',
18
+ buttonPressed: 'rgba(61, 61, 63, 1)',
19
+ gradientGrey: 'linear-gradient(to bottom, #343434, #393939)',
20
+ gradientGreyTranslucent: 'linear-gradient(to bottom, rgba(52, 52, 52, 0.75), rgba(57, 57, 57, 0.75))',
21
+ gradientLightGreyTranslucent: 'linear-gradient(to bottom, rgba(75, 75, 75, 0.75), rgba(80, 80, 80, 0.75))',
22
+ };
23
+ export const ControlButtonStyles = {
24
+ height: '30px',
25
+ minWidth: '30px',
26
+ fontSize: '14px',
27
+ radiusMiddle: '3px',
28
+ radiusSolo: '10px',
29
+ radiusFirst: '10px 3px 3px 10px',
30
+ radiusLast: '3px 10px 10px 3px',
31
+ widthLong: '70px',
32
+ widthShort: '30px',
33
+ gap: '3px',
34
+ };
9
35
  export const Button = styled.button `
10
- background-color: rgba(255, 255, 255, 0.3);
36
+ background: ${Colors.gradientGreyTranslucent};
11
37
  border: none;
12
38
  display: flex;
13
39
  align-items: center;
14
40
  justify-content: center;
15
41
  cursor: pointer;
16
- color: white;
17
- border-radius: 2px;
18
- font-size: 14px;
42
+ color: ${Colors.textWhite};
43
+ border: 1px solid transparent;
44
+ border-radius: ${ControlButtonStyles.radiusMiddle};
45
+ font-size: ${ControlButtonStyles.fontSize};
46
+ height: ${ControlButtonStyles.height};
47
+ min-width: ${ControlButtonStyles.minWidth};
48
+ transition: all 0.2s ease-in-out;
49
+ text-transform: none;
50
+ box-shadow: none;
51
+ font-family: Arial, sans-serif;
52
+
53
+ &:first-child {
54
+ border-radius: ${({ $reverse }) => $reverse
55
+ ? ControlButtonStyles.radiusLast
56
+ : ControlButtonStyles.radiusFirst};
57
+ }
58
+
59
+ &:last-child {
60
+ border-radius: ${({ $reverse }) => $reverse
61
+ ? ControlButtonStyles.radiusFirst
62
+ : ControlButtonStyles.radiusLast};
63
+ }
64
+
65
+ &:first-child:last-child {
66
+ border-radius: ${ControlButtonStyles.radiusSolo};
67
+ }
68
+ `;
69
+ Button.defaultProps = { $reverse: false };
70
+ export const HeaderButtonsContainer = styled.div `
71
+ padding: 2px;
72
+ display: flex;
73
+ background-color: ${Colors.panelBackground};
74
+ border: 1px solid ${Colors.panelBorder};
75
+ backdrop-filter: blur(40px);
76
+ -webkit-backdrop-filter: blur(40px);
77
+ justify-content: center;
78
+ pointer-events: all;
79
+ border-radius: 14px;
80
+ align-items: center;
81
+ height: 24px;
82
+ `;
83
+ export const HeaderButton = styled.button `
84
+ background-color: transparent;
85
+ border: none;
86
+ display: flex;
87
+ align-items: center;
88
+ justify-content: center;
89
+ cursor: pointer;
90
+ color: ${Colors.textWhite};
91
+ border-radius: 4px;
92
+ font-size: 16px;
19
93
  height: 24px;
20
94
  min-width: 24px;
21
95
  transition: all 0.2s ease-in-out;
22
- margin: 0 1px;
23
96
  text-transform: none;
24
97
  box-shadow: none;
98
+ padding: 1px 5px;
25
99
  font-family: Arial, sans-serif;
26
100
 
27
101
  &:hover {
28
- background-color: rgba(255, 255, 255, 0.5);
102
+ background-color: ${Colors.buttonPressed};
29
103
  }
30
104
 
31
105
  &:active {
32
- background-color: rgba(255, 255, 255, 0.6);
106
+ background-color: ${Colors.buttonPressed};
107
+ }
108
+
109
+ &:focus {
110
+ outline: none;
33
111
  }
34
112
 
35
113
  &:first-child {
36
- border-radius: ${({ $reverse }) => $reverse ? '2px 8px 8px 2px' : '8px 2px 2px 8px'};
114
+ border-radius: 12px 4px 4px 12px;
37
115
  }
38
116
 
39
117
  &:last-child {
40
- border-radius: ${({ $reverse }) => $reverse ? '8px 2px 2px 8px' : '2px 8px 8px 2px'};
118
+ border-radius: 4px 12px 12px 4px;
119
+ }
120
+
121
+ &:first-child:last-child {
122
+ border-radius: 12px;
41
123
  }
42
124
  `;
43
125
  export const MappedKeyBlock = styled.div `
44
- background-color: ${({ $pressed }) => $pressed ? 'rgba(255, 255, 255, 0.6)' : 'rgba(255, 255, 255, 0.3)'};
126
+ background-color: ${({ $pressed }) => $pressed ? Colors.buttonPressed : Colors.buttonBackground};
45
127
  border: none;
46
128
  display: flex;
47
129
  align-items: center;
48
130
  justify-content: center;
49
- color: white;
50
- border-radius: 5px;
131
+ color: ${Colors.textWhite};
132
+ border-radius: 8px;
51
133
  font-size: 14px;
52
134
  font-family: Arial, sans-serif;
53
- height: 20px;
54
- width: 20px;
135
+ height: 30px;
136
+ width: 30px;
55
137
  transition: all 0.2s ease-in-out;
56
138
  `;
57
139
  export const ButtonContainer = styled.div `
58
140
  display: flex;
59
141
  align-items: center;
60
- height: 24px;
61
- margin-bottom: 2px;
142
+ height: 30px;
143
+ margin-bottom: 3px;
62
144
  justify-content: flex-start;
63
145
  flex-direction: ${({ $reverse }) => ($reverse ? 'row-reverse' : 'row')};
146
+
147
+ &:last-child {
148
+ margin-bottom: 0;
149
+ }
64
150
  `;
151
+ ButtonContainer.defaultProps = { $reverse: false };
65
152
  export const ButtonGroup = styled.div `
66
153
  display: flex;
67
154
  flex-direction: ${({ $reverse }) => ($reverse ? 'row-reverse' : 'row')};
68
155
  height: 100%;
69
156
  justify-content: space-between;
70
157
  align-items: center;
158
+ margin: ${({ $reverse }) => ($reverse ? '0 5px 0 0' : '0 0 0 5px')};
159
+ gap: 3px;
71
160
  `;
161
+ ButtonGroup.defaultProps = { $reverse: false };
72
162
  export const JoystickButton = styled.button `
73
163
  background-color: rgba(255, 255, 255, 0.3);
74
164
  border: none;
@@ -87,7 +177,7 @@ export const JoystickButton = styled.button `
87
177
  `;
88
178
  export const JoystickInner = styled.div `
89
179
  position: absolute;
90
- background-color: white;
180
+ background-color: ${Colors.textWhite};
91
181
  border-radius: 50%;
92
182
  width: 36px;
93
183
  height: 36px;
@@ -97,38 +187,41 @@ export const JoystickInner = styled.div `
97
187
  export const RangeSelector = styled.input.attrs({ type: 'range' }) `
98
188
  -webkit-appearance: none;
99
189
  appearance: none;
100
- background-color: rgba(255, 255, 255, 0.3);
190
+ background: ${Colors.gradientGreyTranslucent};
101
191
  border: none;
102
192
  height: 100%;
103
- width: 49px;
193
+ width: ${ControlButtonStyles.widthLong};
104
194
  cursor: pointer;
105
- margin: 0 1px;
195
+ margin: 0;
106
196
  transition: all 0.2s ease-in-out;
107
- border-radius: ${({ $reverse }) => $reverse ? '8px 2px 2px 8px' : '2px 8px 8px 2px'};
197
+ border-radius: ${({ $reverse }) => $reverse
198
+ ? ControlButtonStyles.radiusFirst
199
+ : ControlButtonStyles.radiusLast};
108
200
 
109
201
  &::-webkit-slider-thumb {
110
202
  -webkit-appearance: none;
111
203
  appearance: none;
112
204
  width: 8px;
113
- height: 24px;
114
- background-color: white;
115
- border-radius: 3px;
205
+ height: 30px;
206
+ background-color: ${Colors.textWhite};
207
+ border-radius: ${ControlButtonStyles.radiusMiddle};
116
208
  }
117
209
 
118
210
  &::-moz-range-thumb {
119
- width: 8px;
120
- height: 24px;
121
- background-color: white;
122
- border-radius: 3px;
211
+ width: 10px;
212
+ height: 30px;
213
+ background-color: ${Colors.textWhite};
214
+ border-radius: ${ControlButtonStyles.radiusMiddle};
123
215
  }
124
216
 
125
217
  &::-ms-thumb {
126
218
  width: 8px;
127
219
  height: 24px;
128
- background-color: white;
129
- border-radius: 3px;
220
+ background-color: ${Colors.textWhite};
221
+ border-radius: ${ControlButtonStyles.radiusMiddle};
130
222
  }
131
223
  `;
224
+ RangeSelector.defaultProps = { $reverse: false };
132
225
  export const KeyBlockContainer = styled.div `
133
226
  display: flex;
134
227
  flex-direction: column;
@@ -149,11 +242,97 @@ export const ButtonGroupColumn = styled.div `
149
242
  justify-content: space-between;
150
243
  `;
151
244
  export const FAIcon = styled(FontAwesomeIcon) `
152
- height: 14px;
153
- min-height: 14px;
154
- max-height: 14px;
155
- width: 14px;
156
- min-width: 14px;
157
- max-width: 14px;
245
+ height: ${({ $size }) => `${$size}px`};
246
+ min-height: ${({ $size }) => `${$size}px`};
247
+ max-height: ${({ $size }) => `${$size}px`};
248
+ width: ${({ $size }) => `${$size}px`};
249
+ min-width: ${({ $size }) => `${$size}px`};
250
+ max-width: ${({ $size }) => `${$size}px`};
251
+ `;
252
+ FAIcon.defaultProps = { $size: 14 };
253
+ export const ControlPanel = styled.div `
254
+ position: fixed;
255
+ padding: 5px;
256
+ font-family: Arial, sans-serif;
257
+ color: ${Colors.textWhite};
258
+ pointer-events: all;
259
+ background-color: ${Colors.panelBackground};
260
+ border: 1px solid ${Colors.panelBorder};
261
+ backdrop-filter: blur(40px);
262
+ -webkit-backdrop-filter: blur(40px);
263
+ border-radius: 12px;
264
+ box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3);
265
+ overflow: hidden;
266
+ display: flex;
267
+ flex-direction: column;
268
+ `;
269
+ export const SectionBreak = styled.hr `
270
+ width: ${({ $horizontal }) => ($horizontal ? 'unset' : '1px')};
271
+ height: ${({ $horizontal }) => ($horizontal ? '1px' : 'unset')};
272
+ background-color: ${Colors.panelBorder};
273
+ margin: 5px 3px;
274
+ border: none;
275
+ `;
276
+ SectionBreak.defaultProps = { $horizontal: true };
277
+ export const PanelHeaderButton = styled.button `
278
+ background-color: transparent;
279
+ border: none;
280
+ display: flex;
281
+ align-items: center;
282
+ justify-content: center;
283
+ cursor: pointer;
284
+ color: ${({ $isRed }) => ($isRed ? Colors.dangerRed : Colors.textWhite)};
285
+ font-size: 12px;
286
+ padding: 3px;
287
+ text-transform: none;
288
+ box-shadow: none;
289
+
290
+ &:hover {
291
+ color: ${({ $isRed }) => ($isRed ? Colors.dangerRedPressed : '#ffffff')};
292
+ }
293
+
294
+ &:active {
295
+ color: ${({ $isRed }) => ($isRed ? Colors.dangerRedPressed : '#ffffff')};
296
+ }
297
+
298
+ &:focus {
299
+ outline: none;
300
+ }
301
+ `;
302
+ PanelHeaderButton.defaultProps = { $isRed: false };
303
+ export const ValuesContainer = styled.div `
304
+ display: flex;
305
+ flex-direction: row;
306
+ gap: ${ControlButtonStyles.gap};
307
+ height: 25px;
308
+ `;
309
+ export const ValueInput = styled.input.attrs({ type: 'text' }) `
310
+ width: 50px;
311
+ outline: none;
312
+ background: ${Colors.gradientGrey};
313
+ border: 1px solid transparent;
314
+ border-radius: 5px;
315
+ height: 25px;
316
+ color: ${Colors.textWhite};
317
+ padding: 0 10px 0 5px;
318
+ box-sizing: border-box;
319
+ font-size: 10px;
320
+
321
+ &:read-only {
322
+ background: ${Colors.gradientGreyTranslucent};
323
+ }
324
+
325
+ &:invalid {
326
+ background-color: ${Colors.dangerRed};
327
+ }
328
+ `;
329
+ export const InputSuffix = styled.span `
330
+ position: absolute;
331
+ right: 5px;
332
+ top: 50%;
333
+ transform: translateY(-50%);
334
+ pointer-events: none;
335
+ color: var(--panel-light-grey);
336
+ font-size: 10px;
158
337
  `;
159
338
  //# sourceMappingURL=styled.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"styled.js","sourceRoot":"","sources":["../../src/components/styled.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C,MAAM,CAAC,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;mBA2BvC,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,CACjC,QAAQ,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,iBAAiB;;;;mBAIhC,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,CACjC,QAAQ,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,iBAAiB;;CAElD,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC,GAAG,CAAuB;qBAC1C,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,CACpC,QAAQ,CAAC,CAAC,CAAC,0BAA0B,CAAC,CAAC,CAAC,0BAA0B;;;;;;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BAAmB,CAAC,GAAG;;CAE9B,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAG,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAA;;;eAG/C,MAAM,CAAC,YAAY;;;;UAIxB,MAAM,CAAC,SAAS;;;;;;gBAMV,MAAM,CAAC,uBAAuB;;;;sBAIxB,MAAM,CAAC,SAAS;;CAErC,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG,MAAM,CAAC,IAAI,CAAA;;;;;;;;CAQrC,CAAC"}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+ import { IconDefinition } from '@fortawesome/fontawesome-svg-core';
8
+ export declare function round(number: number, decimalPlaces: number): number;
9
+ type Vector3Like = {
10
+ x: number;
11
+ y: number;
12
+ z: number;
13
+ };
14
+ interface Vector3InputProps {
15
+ vector: Vector3Like;
16
+ label?: string;
17
+ icon?: IconDefinition;
18
+ multiplier?: number;
19
+ precision?: number;
20
+ onValidInput?: () => void;
21
+ marginBottom?: string;
22
+ }
23
+ export declare const Vector3Input: ({ vector, label, icon, multiplier, precision, onValidInput, marginBottom, }: Vector3InputProps) => import("react/jsx-runtime").JSX.Element;
24
+ export {};
25
+ //# sourceMappingURL=vec3.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vec3.d.ts","sourceRoot":"","sources":["../../src/components/vec3.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAGnE,wBAAgB,KAAK,CAAC,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,UAG1D;AAID,KAAK,WAAW,GAAG;IAClB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACV,CAAC;AAEF,UAAU,iBAAiB;IAC1B,MAAM,EAAE,WAAW,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAC;CACtB;AAYD,eAAO,MAAM,YAAY,gFAQtB,iBAAiB,4CAyGnB,CAAC"}
@@ -0,0 +1,90 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /**
3
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
4
+ *
5
+ * This source code is licensed under the MIT license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+ import { FAIcon, InputSuffix, ValueInput, ValuesContainer } from './styled.js';
9
+ import { useEffect, useRef, useState } from 'react';
10
+ import { styled } from 'styled-components';
11
+ export function round(number, decimalPlaces) {
12
+ const factor = Math.pow(10, decimalPlaces);
13
+ return Math.round(number * factor) / factor;
14
+ }
15
+ const Vector3Container = styled.div `
16
+ width: 100%;
17
+ display: flex;
18
+ flex-direction: row;
19
+ justify-content: space-between;
20
+ align-items: center;
21
+ margin: 0;
22
+ font-size: 12px;
23
+ `;
24
+ export const Vector3Input = ({ vector, label = '', icon, multiplier = 1, precision = 2, onValidInput = () => { }, marginBottom = '0', }) => {
25
+ const [displayValues, setDisplayValues] = useState({
26
+ x: (vector.x / multiplier).toFixed(precision),
27
+ y: (vector.y / multiplier).toFixed(precision),
28
+ z: (vector.z / multiplier).toFixed(precision),
29
+ });
30
+ const actualValuesRef = useRef({
31
+ x: round(vector.x / multiplier, precision),
32
+ y: round(vector.y / multiplier, precision),
33
+ z: round(vector.z / multiplier, precision),
34
+ });
35
+ const animationFrameId = useRef(null);
36
+ // Sync display values with actual values (optimized)
37
+ const syncValues = () => {
38
+ const currentActualValues = {
39
+ x: round(vector.x / multiplier, precision),
40
+ y: round(vector.y / multiplier, precision),
41
+ z: round(vector.z / multiplier, precision),
42
+ };
43
+ const { x, y, z } = actualValuesRef.current;
44
+ // Only update state if actual values have changed
45
+ if (currentActualValues.x !== x ||
46
+ currentActualValues.y !== y ||
47
+ currentActualValues.z !== z) {
48
+ actualValuesRef.current = currentActualValues;
49
+ setDisplayValues({
50
+ x: currentActualValues.x.toFixed(precision),
51
+ y: currentActualValues.y.toFixed(precision),
52
+ z: currentActualValues.z.toFixed(precision),
53
+ });
54
+ }
55
+ // Schedule the next frame
56
+ animationFrameId.current = requestAnimationFrame(syncValues);
57
+ };
58
+ useEffect(() => {
59
+ // Start the synchronization loop
60
+ animationFrameId.current = requestAnimationFrame(syncValues);
61
+ return () => {
62
+ // Cleanup the animation frame on unmount
63
+ if (animationFrameId.current) {
64
+ cancelAnimationFrame(animationFrameId.current);
65
+ }
66
+ };
67
+ }, [vector, multiplier, precision]);
68
+ // Handle user input changes
69
+ const handleInputChange = (axis) => (event) => {
70
+ const newValue = event.target.value;
71
+ const parsedValue = parseFloat(newValue);
72
+ // Update display values immediately
73
+ setDisplayValues((prev) => ({ ...prev, [axis]: newValue }));
74
+ // If valid, update the actual values and the vector
75
+ if (!isNaN(parsedValue)) {
76
+ actualValuesRef.current[axis] = parsedValue;
77
+ vector[axis] = parsedValue * multiplier;
78
+ onValidInput();
79
+ }
80
+ };
81
+ return (_jsxs(Vector3Container, { style: { marginBottom }, children: [icon ? (_jsx(FAIcon, { icon: icon, style: { marginRight: '5px' } })) : (_jsx("span", { style: { marginRight: '5px' }, children: label })), _jsx(ValuesContainer, { children: ['x', 'y', 'z'].map((axis) => (_jsxs("div", { style: {
82
+ position: 'relative',
83
+ display: 'inline-block',
84
+ height: '25px',
85
+ }, children: [_jsx(ValueInput, { value: displayValues[axis], onChange: handleInputChange(axis), className: parseFloat(displayValues[axis]) !==
86
+ actualValuesRef.current[axis]
87
+ ? 'invalid'
88
+ : undefined }), _jsx(InputSuffix, { children: axis.toUpperCase() })] }, `${label}-${axis}`))) })] }));
89
+ };
90
+ //# sourceMappingURL=vec3.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vec3.js","sourceRoot":"","sources":["../../src/components/vec3.tsx"],"names":[],"mappings":";AAAA;;;;;GAKG;AAEH,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC/E,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAGpD,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C,MAAM,UAAU,KAAK,CAAC,MAAc,EAAE,aAAqB;IAC1D,MAAM,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,aAAa,CAAC,CAAC;IAC3C,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,GAAG,MAAM,CAAC;AAC7C,CAAC;AAoBD,MAAM,gBAAgB,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;CAQlC,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,EAC5B,MAAM,EACN,KAAK,GAAG,EAAE,EACV,IAAI,EACJ,UAAU,GAAG,CAAC,EACd,SAAS,GAAG,CAAC,EACb,YAAY,GAAG,GAAG,EAAE,GAAE,CAAC,EACvB,YAAY,GAAG,GAAG,GACC,EAAE,EAAE;IACvB,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,QAAQ,CAAC;QAClD,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;QAC7C,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;QAC7C,CAAC,EAAE,CAAC,MAAM,CAAC,CA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M,IAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,WAAW,EAAE,KAAK,EAAE,GAAI,CACrD,CAAC,CAAC,CAAC,CACH,eAAM,KAAK,EAAE,EAAE,WAAW,EAAE,KAAK,EAAE,YAAG,KAAK,GAAQ,CACnD,EACD,KAAC,eAAe,cACd,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAC9B,eAEC,KAAK,EAAE;wBACN,QAAQ,EAAE,UAAU;wBACpB,OAAO,EAAE,cAAc;wBACvB,MAAM,EAAE,MAAM;qBACd,aAED,KAAC,UAAU,IACV,KAAK,EAAE,aAAa,CAAC,IAAY,CAAC,EAClC,QAAQ,EAAE,iBAAiB,CAAC,IAAY,CAAC,EACzC,SAAS,EACR,UAAU,CAAC,aAAa,CAAC,IAAY,CAAC,CAAC;gCACvC,eAAe,CAAC,OAAO,CAAC,IAAY,CAAC;gCACpC,CAAC,CAAC,SAAS;gCACX,CAAC,CAAC,SAAS,GAEZ,EACF,KAAC,WAAW,cAAE,IAAI,CAAC,WAAW,EAAE,GAAe,KAjB1C,GAAG,KAAK,IAAI,IAAI,EAAE,CAkBlB,CACN,CAAC,GACe,IACA,CACnB,CAAC;AACH,CAAC,CAAC"}
package/lib/index.d.ts CHANGED
@@ -4,19 +4,15 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
- import { InputLayer } from './scene.js';
7
+ import { VERSION } from './version.js';
8
8
  import { XRDevice } from 'iwer';
9
- declare const PRIVATE: unique symbol;
10
- type DevUIConfig = {
11
- buttonPressDuration: number;
12
- };
13
- export declare const useDevUIConfig: () => DevUIConfig;
14
9
  export declare class DevUI {
15
- [PRIVATE]: {
16
- xrDevice: XRDevice;
17
- inputLayer: InputLayer;
18
- };
19
- constructor(xrDevice: XRDevice, options?: Partial<DevUIConfig>);
10
+ private inputLayer;
11
+ devUIContainer: HTMLDivElement;
12
+ readonly version = "1.0.0";
13
+ constructor(xrDevice: XRDevice);
14
+ render(time: number): void;
15
+ get devUICanvas(): HTMLCanvasElement;
20
16
  }
21
- export {};
17
+ export { VERSION };
22
18
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAQH,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AAGhC,QAAA,MAAM,OAAO,eAA+B,CAAC;AAE7C,KAAK,WAAW,GAAG;IAClB,mBAAmB,EAAE,MAAM,CAAC;CAC5B,CAAC;AAQF,eAAO,MAAM,cAAc,mBAE1B,CAAC;AAEF,qBAAa,KAAK;IACjB,CAAC,OAAO,CAAC,EAAE;QACV,QAAQ,EAAE,QAAQ,CAAC;QACnB,UAAU,EAAE,UAAU,CAAC;KACvB,CAAC;gBAEU,QAAQ,EAAE,QAAQ,EAAE,OAAO,GAAE,OAAO,CAAC,WAAW,CAAM;CAkClE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAUH,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AAGhC,qBAAa,KAAK;IACjB,OAAO,CAAC,UAAU,CAAa;IACxB,cAAc,EAAE,cAAc,CAAC;IACtC,SAAgB,OAAO,WAAW;gBAEtB,QAAQ,EAAE,QAAQ;IA4B9B,MAAM,CAAC,IAAI,EAAE,MAAM;IAInB,IAAI,WAAW,sBAEd;CACD;AAgID,OAAO,EAAE,OAAO,EAAE,CAAC"}