@terraware/web-components 4.3.3 → 5.0.1-rc.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 (75) hide show
  1. package/components/VirtualWalkthrough/AnnotationEditPane.d.ts +1 -21
  2. package/components/VirtualWalkthrough/AnnotationEditPane.d.ts.map +1 -1
  3. package/components/VirtualWalkthrough/AnnotationEditPane.js +18 -17
  4. package/components/VirtualWalkthrough/BoundaryWall.d.ts +0 -1
  5. package/components/VirtualWalkthrough/BoundaryWall.d.ts.map +1 -1
  6. package/components/VirtualWalkthrough/CameraInfo.d.ts +1 -7
  7. package/components/VirtualWalkthrough/CameraInfo.d.ts.map +1 -1
  8. package/components/VirtualWalkthrough/CameraInfo.js +5 -4
  9. package/components/VirtualWalkthrough/ControlsInfoPane.d.ts +1 -25
  10. package/components/VirtualWalkthrough/ControlsInfoPane.d.ts.map +1 -1
  11. package/components/VirtualWalkthrough/ControlsInfoPane.js +23 -22
  12. package/components/VirtualWalkthrough/SplatControls.d.ts +1 -20
  13. package/components/VirtualWalkthrough/SplatControls.d.ts.map +1 -1
  14. package/components/VirtualWalkthrough/SplatControls.js +15 -16
  15. package/components/VirtualWalkthrough/SplatModel.d.ts +6 -1
  16. package/components/VirtualWalkthrough/SplatModel.d.ts.map +1 -1
  17. package/components/VirtualWalkthrough/SplatModel.js +2 -0
  18. package/components/VirtualWalkthrough/TfAnnotationManager.d.ts +2 -9
  19. package/components/VirtualWalkthrough/TfAnnotationManager.d.ts.map +1 -1
  20. package/components/VirtualWalkthrough/TfAnnotationManager.js +11 -32
  21. package/components/VirtualWalkthrough/VirtualWalkthroughViewer.d.ts +15 -3
  22. package/components/VirtualWalkthrough/VirtualWalkthroughViewer.d.ts.map +1 -1
  23. package/components/VirtualWalkthrough/VirtualWalkthroughViewer.js +51 -29
  24. package/components/VirtualWalkthrough/VrAnnotationPanel.d.ts +1 -2
  25. package/components/VirtualWalkthrough/VrAnnotationPanel.d.ts.map +1 -1
  26. package/components/VirtualWalkthrough/VrAnnotationPanel.js +2 -4
  27. package/components/VirtualWalkthrough/XrStartPose.d.ts +52 -0
  28. package/components/VirtualWalkthrough/XrStartPose.d.ts.map +1 -0
  29. package/components/VirtualWalkthrough/XrStartPose.js +128 -0
  30. package/components/VirtualWalkthrough/boundary-wall.d.ts +0 -2
  31. package/components/VirtualWalkthrough/boundary-wall.d.ts.map +1 -1
  32. package/components/VirtualWalkthrough/boundary-wall.js +0 -2
  33. package/components/VirtualWalkthrough/vr-annotation-panel.d.ts +0 -1
  34. package/components/VirtualWalkthrough/vr-annotation-panel.d.ts.map +1 -1
  35. package/components/VirtualWalkthrough/vr-annotation-panel.js +6 -9
  36. package/components/VirtualWalkthrough/walkthrough-camera.d.ts +0 -1
  37. package/components/VirtualWalkthrough/walkthrough-camera.d.ts.map +1 -1
  38. package/components/VirtualWalkthrough/walkthrough-camera.js +3 -5
  39. package/components/VirtualWalkthrough/xr-start-pose.d.ts +57 -0
  40. package/components/VirtualWalkthrough/xr-start-pose.d.ts.map +1 -0
  41. package/components/VirtualWalkthrough/xr-start-pose.js +80 -0
  42. package/index.d.ts +5 -1
  43. package/index.d.ts.map +1 -1
  44. package/index.js +2 -0
  45. package/license-report.html +1 -1
  46. package/package.json +2 -1
  47. package/strings/csv/en.csv +50 -0
  48. package/strings/csv/es.csv +50 -0
  49. package/strings/csv/fr.csv +50 -0
  50. package/strings/csv/instructions-es.txt +14 -0
  51. package/strings/csv/instructions-fr.txt +14 -0
  52. package/strings/csv/instructions.txt +13 -0
  53. package/strings/export.d.ts +36 -0
  54. package/strings/export.d.ts.map +1 -0
  55. package/strings/export.js +116 -0
  56. package/strings/index.d.ts +22 -0
  57. package/strings/index.d.ts.map +1 -0
  58. package/strings/index.js +62 -0
  59. package/strings/locales.d.ts +38 -0
  60. package/strings/locales.d.ts.map +1 -0
  61. package/strings/locales.js +42 -0
  62. package/strings/strings-en.d.ts +52 -0
  63. package/strings/strings-en.d.ts.map +1 -0
  64. package/strings/strings-en.js +54 -0
  65. package/strings/strings-es.d.ts +52 -0
  66. package/strings/strings-es.d.ts.map +1 -0
  67. package/strings/strings-es.js +54 -0
  68. package/strings/strings-fr.d.ts +52 -0
  69. package/strings/strings-fr.d.ts.map +1 -0
  70. package/strings/strings-fr.js +54 -0
  71. package/strings/strings-gx.d.ts +52 -0
  72. package/strings/strings-gx.d.ts.map +1 -0
  73. package/strings/strings-gx.js +54 -0
  74. package/virtualWalkthrough.d.ts +2 -4
  75. package/virtualWalkthrough.d.ts.map +1 -1
@@ -1,33 +1,13 @@
1
1
  import { AnnotationProps } from './Annotation';
2
- export interface AnnotationEditPaneStrings {
3
- editAnnotation: string;
4
- title: string;
5
- titleTooltip: string;
6
- description: string;
7
- descriptionTooltip: string;
8
- label: string;
9
- labelTooltip: string;
10
- images?: {
11
- uploadTitle?: string;
12
- uploadText?: string;
13
- uploadDescription?: string;
14
- chooseFileText?: string;
15
- replaceFileText?: string;
16
- photoSelectedText?: string;
17
- existingImagesLabel?: string;
18
- newImagesLabel?: string;
19
- };
20
- }
21
2
  interface AnnotationEditPaneProps {
22
3
  visible: boolean;
23
4
  annotation: AnnotationProps | null;
24
- strings: AnnotationEditPaneStrings;
25
5
  onUpdate: (updates: Partial<AnnotationProps>) => void;
26
6
  onTextFieldFocus?: (isFocused: boolean) => void;
27
7
  maxImages?: number;
28
8
  /** Fires with the current selection on every add/remove, including an initial empty emission on mount. */
29
9
  onImagesChange?: (files: File[]) => void;
30
10
  }
31
- declare const AnnotationEditPane: ({ visible, annotation, strings, onUpdate, onTextFieldFocus, maxImages, onImagesChange, }: AnnotationEditPaneProps) => import("react/jsx-runtime").JSX.Element | null;
11
+ declare const AnnotationEditPane: ({ visible, annotation, onUpdate, onTextFieldFocus, maxImages, onImagesChange, }: AnnotationEditPaneProps) => import("react/jsx-runtime").JSX.Element | null;
32
12
  export default AnnotationEditPane;
33
13
  //# sourceMappingURL=AnnotationEditPane.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AnnotationEditPane.d.ts","sourceRoot":"","sources":["../../../src/components/VirtualWalkthrough/AnnotationEditPane.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE/C,MAAM,WAAW,yBAAyB;IACxC,cAAc,EAAE,MAAM,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE;QACP,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,iBAAiB,CAAC,EAAE,MAAM,CAAC;QAC3B,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,iBAAiB,CAAC,EAAE,MAAM,CAAC;QAC3B,mBAAmB,CAAC,EAAE,MAAM,CAAC;QAC7B,cAAc,CAAC,EAAE,MAAM,CAAC;KACzB,CAAC;CACH;AAED,UAAU,uBAAuB;IAC/B,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,eAAe,GAAG,IAAI,CAAC;IACnC,OAAO,EAAE,yBAAyB,CAAC;IACnC,QAAQ,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,eAAe,CAAC,KAAK,IAAI,CAAC;IACtD,gBAAgB,CAAC,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;IAChD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0GAA0G;IAC1G,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,IAAI,CAAC;CAC1C;AAED,QAAA,MAAM,kBAAkB,GAAI,0FAQzB,uBAAuB,mDA4LzB,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
1
+ {"version":3,"file":"AnnotationEditPane.d.ts","sourceRoot":"","sources":["../../../src/components/VirtualWalkthrough/AnnotationEditPane.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE/C,UAAU,uBAAuB;IAC/B,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,eAAe,GAAG,IAAI,CAAC;IACnC,QAAQ,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,eAAe,CAAC,KAAK,IAAI,CAAC;IACtD,gBAAgB,CAAC,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;IAChD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0GAA0G;IAC1G,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,IAAI,CAAC;CAC1C;AAED,QAAA,MAAM,kBAAkB,GAAI,iFAOzB,uBAAuB,mDA2LzB,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import { useMemo, useCallback } from 'react';
2
2
  import { useTheme, Box, Fade, Typography, Tooltip, ThemeProvider } from '@mui/material';
3
+ import { useStrings } from '../../strings/index.js';
3
4
  import PhotoChooser from '../PhotoChooser/index.js';
4
5
  import TextField from '../Textfield/Textfield.js';
5
6
  import { jsx, jsxs } from 'react/jsx-runtime';
@@ -7,13 +8,13 @@ import { jsx, jsxs } from 'react/jsx-runtime';
7
8
  const AnnotationEditPane = ({
8
9
  visible,
9
10
  annotation,
10
- strings,
11
11
  onUpdate,
12
12
  onTextFieldFocus,
13
13
  maxImages,
14
14
  onImagesChange
15
15
  }) => {
16
16
  const theme = useTheme();
17
+ const strings = useStrings();
17
18
  const showImageUpload = !!onImagesChange && !!maxImages && maxImages > 0;
18
19
  const remainingImageSlots = Math.max(0, (maxImages ?? 0) - (annotation?.imageUrls?.length ?? 0));
19
20
 
@@ -106,14 +107,14 @@ const AnnotationEditPane = ({
106
107
  sx: {
107
108
  fontWeight: 600
108
109
  },
109
- children: strings.editAnnotation
110
+ children: strings.EDIT_ANNOTATION
110
111
  }), /*#__PURE__*/jsx(Tooltip, {
111
- title: strings.titleTooltip,
112
+ title: strings.ANNOTATION_TITLE_TOOLTIP,
112
113
  placement: "top",
113
114
  disableFocusListener: true,
114
115
  children: /*#__PURE__*/jsx(TextField, {
115
116
  id: "annotation-title",
116
- label: strings.title,
117
+ label: strings.TITLE,
117
118
  type: "text",
118
119
  value: annotation.title,
119
120
  onChange: handleTitleChange,
@@ -123,12 +124,12 @@ const AnnotationEditPane = ({
123
124
  required: true
124
125
  })
125
126
  }), /*#__PURE__*/jsx(Tooltip, {
126
- title: strings.descriptionTooltip,
127
+ title: strings.ANNOTATION_DESCRIPTION_TOOLTIP,
127
128
  placement: "top",
128
129
  disableFocusListener: true,
129
130
  children: /*#__PURE__*/jsx(TextField, {
130
131
  id: "annotation-body",
131
- label: strings.description,
132
+ label: strings.DESCRIPTION,
132
133
  type: "text",
133
134
  value: annotation.bodyText ?? '',
134
135
  onChange: handleBodyTextChange,
@@ -137,12 +138,12 @@ const AnnotationEditPane = ({
137
138
  sx: textFieldSx
138
139
  })
139
140
  }), /*#__PURE__*/jsx(Tooltip, {
140
- title: strings.labelTooltip,
141
+ title: strings.ANNOTATION_LABEL_TOOLTIP,
141
142
  placement: "top",
142
143
  disableFocusListener: true,
143
144
  children: /*#__PURE__*/jsx(TextField, {
144
145
  id: "annotation-label",
145
- label: strings.label,
146
+ label: strings.LABEL,
146
147
  type: "text",
147
148
  value: annotation.label ?? '',
148
149
  onChange: handleLabelChange,
@@ -151,7 +152,7 @@ const AnnotationEditPane = ({
151
152
  sx: textFieldSx
152
153
  })
153
154
  }), showImageUpload && /*#__PURE__*/jsxs(Box, {
154
- children: [strings.images?.uploadTitle && /*#__PURE__*/jsx(Typography, {
155
+ children: [/*#__PURE__*/jsx(Typography, {
155
156
  sx: {
156
157
  fontFamily: 'Inter',
157
158
  fontSize: '14px',
@@ -160,22 +161,22 @@ const AnnotationEditPane = ({
160
161
  color: theme.palette.grey[400],
161
162
  marginBottom: 0.5
162
163
  },
163
- children: strings.images.uploadTitle
164
+ children: strings.IMAGES
164
165
  }), /*#__PURE__*/jsx(ThemeProvider, {
165
166
  theme: photoChooserTheme,
166
167
  children: /*#__PURE__*/jsx(PhotoChooser, {
167
- uploadText: strings.images?.uploadText,
168
- uploadDescription: strings.images?.uploadDescription,
169
- chooseFileText: strings.images?.chooseFileText,
170
- replaceFileText: strings.images?.replaceFileText,
171
- photoSelectedText: strings.images?.photoSelectedText,
168
+ uploadText: strings.UPLOAD_FILES,
169
+ uploadDescription: strings.UPLOAD_FILES_DESCRIPTION,
170
+ chooseFileText: strings.CHOOSE_FILE,
171
+ replaceFileText: strings.REPLACE_FILE,
172
+ photoSelectedText: strings.FILE_SELECTED,
172
173
  multipleSelection: (maxImages ?? 0) > 1,
173
174
  maxPhotos: remainingImageSlots,
174
175
  onPhotosChanged: files => onImagesChange?.(files),
175
176
  existingPhotos: annotation.imageUrls,
176
177
  onExistingPhotoRemoved: handleRemoveExistingImage,
177
- existingImagesLabel: strings.images?.existingImagesLabel,
178
- newImagesLabel: strings.images?.newImagesLabel
178
+ existingImagesLabel: strings.EXISTING,
179
+ newImagesLabel: strings.NEW
179
180
  })
180
181
  })]
181
182
  })]
@@ -1,6 +1,5 @@
1
1
  import { Vec3 } from 'playcanvas';
2
2
  export type BoundaryWallProps = {
3
- /** World-space, i.e. already multiplied by the scene scaleFactor. */
4
3
  center: Vec3;
5
4
  radius: number;
6
5
  groundPlane: Vec3[];
@@ -1 +1 @@
1
- {"version":3,"file":"BoundaryWall.d.ts","sourceRoot":"","sources":["../../../src/components/VirtualWalkthrough/BoundaryWall.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAIlC,MAAM,MAAM,iBAAiB,GAAG;IAC9B,qEAAqE;IACrE,MAAM,EAAE,IAAI,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,IAAI,EAAE,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,QAAA,MAAM,YAAY,GAAI,wCAAwC,iBAAiB,4CAuB9E,CAAC;AAEF,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"BoundaryWall.d.ts","sourceRoot":"","sources":["../../../src/components/VirtualWalkthrough/BoundaryWall.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAIlC,MAAM,MAAM,iBAAiB,GAAG;IAC9B,MAAM,EAAE,IAAI,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,IAAI,EAAE,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,QAAA,MAAM,YAAY,GAAI,wCAAwC,iBAAiB,4CAuB9E,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -1,16 +1,10 @@
1
- export interface CameraInfoStrings {
2
- cameraInfo: string;
3
- cameraPosition: string;
4
- cameraFocusPoint: string;
5
- }
6
1
  export interface CameraState {
7
2
  position: [number, number, number];
8
3
  focus: [number, number, number];
9
4
  }
10
5
  interface CameraInfoProps {
11
- strings: CameraInfoStrings;
12
6
  getCameraState: () => CameraState | null;
13
7
  }
14
- declare const CameraInfo: ({ strings, getCameraState }: CameraInfoProps) => import("react/jsx-runtime").JSX.Element | null;
8
+ declare const CameraInfo: ({ getCameraState }: CameraInfoProps) => import("react/jsx-runtime").JSX.Element | null;
15
9
  export default CameraInfo;
16
10
  //# sourceMappingURL=CameraInfo.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CameraInfo.d.ts","sourceRoot":"","sources":["../../../src/components/VirtualWalkthrough/CameraInfo.tsx"],"names":[],"mappings":"AAWA,MAAM,WAAW,iBAAiB;IAChC,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IACvB,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IACnC,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;CACjC;AAyBD,UAAU,eAAe;IACvB,OAAO,EAAE,iBAAiB,CAAC;IAC3B,cAAc,EAAE,MAAM,WAAW,GAAG,IAAI,CAAC;CAC1C;AAED,QAAA,MAAM,UAAU,GAAI,6BAA6B,eAAe,mDA8C/D,CAAC;AAEF,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"CameraInfo.d.ts","sourceRoot":"","sources":["../../../src/components/VirtualWalkthrough/CameraInfo.tsx"],"names":[],"mappings":"AAYA,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IACnC,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;CACjC;AAyBD,UAAU,eAAe;IACvB,cAAc,EAAE,MAAM,WAAW,GAAG,IAAI,CAAC;CAC1C;AAED,QAAA,MAAM,UAAU,GAAI,oBAAoB,eAAe,mDA+CtD,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import { useState, useEffect } from 'react';
2
2
  import { useTheme, Box, Typography } from '@mui/material';
3
+ import { useStrings } from '../../strings/index.js';
3
4
  import { getRgbaFromHex } from '../../utils/color.js';
4
5
  import { jsxs, jsx } from 'react/jsx-runtime';
5
6
 
@@ -29,10 +30,10 @@ const CoordinateDisplay = ({
29
30
  }, COORDINATE_LABELS[index]))]
30
31
  });
31
32
  const CameraInfo = ({
32
- strings,
33
33
  getCameraState
34
34
  }) => {
35
35
  const theme = useTheme();
36
+ const strings = useStrings();
36
37
  const [cameraState, setCameraState] = useState(null);
37
38
  useEffect(() => {
38
39
  const updateCameraState = () => {
@@ -67,7 +68,7 @@ const CameraInfo = ({
67
68
  fontWeight: 'bold',
68
69
  marginBottom: 1
69
70
  },
70
- children: strings.cameraInfo
71
+ children: strings.CAMERA_INFO
71
72
  }), /*#__PURE__*/jsxs(Box, {
72
73
  sx: {
73
74
  display: 'flex',
@@ -75,11 +76,11 @@ const CameraInfo = ({
75
76
  gap: 1
76
77
  },
77
78
  children: [/*#__PURE__*/jsx(CoordinateDisplay, {
78
- label: strings.cameraPosition,
79
+ label: strings.CAMERA_POSITION,
79
80
  coordinates: cameraState.position,
80
81
  textColor: textColor
81
82
  }), /*#__PURE__*/jsx(CoordinateDisplay, {
82
- label: strings.cameraFocusPoint,
83
+ label: strings.CAMERA_FOCUS_POINT,
83
84
  coordinates: cameraState.focus,
84
85
  textColor: textColor
85
86
  })]
@@ -1,37 +1,13 @@
1
1
  import React from 'react';
2
- export interface ControlsInfoPaneStrings {
3
- controls: string;
4
- annotations: string;
5
- autoRotate: string;
6
- orbit: string;
7
- leftMouse: string;
8
- touchDrag: string;
9
- pan: string;
10
- middleMouse: string;
11
- swipe: string;
12
- look: string;
13
- rightMouse: string;
14
- zoom: string;
15
- mouseWheel: string;
16
- pinch: string;
17
- fly: string;
18
- arrowKeys: string;
19
- flyFaster: string;
20
- shift: string;
21
- flySlower: string;
22
- ctrl: string;
23
- resetCamera: string;
24
- }
25
2
  interface ControlsInfoPaneProps {
26
3
  visible: boolean;
27
4
  paneRef: React.RefObject<HTMLDivElement | null>;
28
- strings: ControlsInfoPaneStrings;
29
5
  showAnnotations?: boolean;
30
6
  onToggleAnnotations?: (show: boolean) => void;
31
7
  autoRotate?: boolean;
32
8
  onToggleAutoRotate?: (enabled: boolean) => void;
33
9
  isFullScreen?: boolean;
34
10
  }
35
- declare const ControlsInfoPane: ({ visible, paneRef, strings, showAnnotations, onToggleAnnotations, autoRotate, onToggleAutoRotate, isFullScreen, }: ControlsInfoPaneProps) => import("react/jsx-runtime").JSX.Element;
11
+ declare const ControlsInfoPane: ({ visible, paneRef, showAnnotations, onToggleAnnotations, autoRotate, onToggleAutoRotate, isFullScreen, }: ControlsInfoPaneProps) => import("react/jsx-runtime").JSX.Element;
36
12
  export default ControlsInfoPane;
37
13
  //# sourceMappingURL=ControlsInfoPane.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ControlsInfoPane.d.ts","sourceRoot":"","sources":["../../../src/components/VirtualWalkthrough/ControlsInfoPane.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsB,MAAM,OAAO,CAAC;AAI3C,MAAM,WAAW,uBAAuB;IACtC,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,UAAU,qBAAqB;IAC7B,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IAChD,OAAO,EAAE,uBAAuB,CAAC;IACjC,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,mBAAmB,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAC9C,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,kBAAkB,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAChD,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,QAAA,MAAM,gBAAgB,GAAI,oHASvB,qBAAqB,4CA8JvB,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"ControlsInfoPane.d.ts","sourceRoot":"","sources":["../../../src/components/VirtualWalkthrough/ControlsInfoPane.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsB,MAAM,OAAO,CAAC;AAM3C,UAAU,qBAAqB;IAC7B,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IAChD,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,mBAAmB,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAC9C,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,kBAAkB,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAChD,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,QAAA,MAAM,gBAAgB,GAAI,2GAQvB,qBAAqB,4CA+JvB,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
@@ -1,11 +1,11 @@
1
1
  import { useCallback } from 'react';
2
2
  import { useTheme, Box, Fade, Typography, Checkbox, Divider } from '@mui/material';
3
+ import { useStrings } from '../../strings/index.js';
3
4
  import { jsx, jsxs } from 'react/jsx-runtime';
4
5
 
5
6
  const ControlsInfoPane = ({
6
7
  visible,
7
8
  paneRef,
8
- strings,
9
9
  showAnnotations,
10
10
  onToggleAnnotations,
11
11
  autoRotate,
@@ -13,6 +13,7 @@ const ControlsInfoPane = ({
13
13
  isFullScreen = false
14
14
  }) => {
15
15
  const theme = useTheme();
16
+ const strings = useStrings();
16
17
  const handleAnnotationsChange = useCallback(e => {
17
18
  onToggleAnnotations?.(e.target.checked);
18
19
  }, [onToggleAnnotations]);
@@ -69,11 +70,11 @@ const ControlsInfoPane = ({
69
70
  sx: {
70
71
  fontWeight: 600
71
72
  },
72
- children: strings.controls
73
+ children: strings.CONTROLS
73
74
  }), /*#__PURE__*/jsxs(Box, {
74
75
  sx: controlRowSx,
75
76
  children: [/*#__PURE__*/jsx(Typography, {
76
- children: strings.annotations
77
+ children: strings.ANNOTATIONS
77
78
  }), /*#__PURE__*/jsx(Checkbox, {
78
79
  checked: showAnnotations ?? true,
79
80
  onChange: handleAnnotationsChange,
@@ -86,7 +87,7 @@ const ControlsInfoPane = ({
86
87
  }), /*#__PURE__*/jsxs(Box, {
87
88
  sx: controlRowSx,
88
89
  children: [/*#__PURE__*/jsx(Typography, {
89
- children: strings.autoRotate
90
+ children: strings.AUTO_ROTATE
90
91
  }), /*#__PURE__*/jsx(Checkbox, {
91
92
  checked: autoRotate ?? true,
92
93
  onChange: handleAutoRotateChange,
@@ -99,13 +100,13 @@ const ControlsInfoPane = ({
99
100
  }), /*#__PURE__*/jsxs(Box, {
100
101
  sx: controlRowSx,
101
102
  children: [/*#__PURE__*/jsx(Typography, {
102
- children: strings.orbit
103
+ children: strings.ORBIT
103
104
  }), /*#__PURE__*/jsxs(Box, {
104
105
  sx: rightAlignedTextSx,
105
106
  children: [/*#__PURE__*/jsx(Typography, {
106
- children: strings.leftMouse
107
+ children: strings.LEFT_MOUSE
107
108
  }), /*#__PURE__*/jsx(Typography, {
108
- children: strings.touchDrag
109
+ children: strings.TOUCH_DRAG
109
110
  })]
110
111
  })]
111
112
  }), /*#__PURE__*/jsx(Divider, {
@@ -113,13 +114,13 @@ const ControlsInfoPane = ({
113
114
  }), /*#__PURE__*/jsxs(Box, {
114
115
  sx: controlRowSx,
115
116
  children: [/*#__PURE__*/jsx(Typography, {
116
- children: strings.pan
117
+ children: strings.PAN
117
118
  }), /*#__PURE__*/jsxs(Box, {
118
119
  sx: rightAlignedTextSx,
119
120
  children: [/*#__PURE__*/jsx(Typography, {
120
- children: strings.middleMouse
121
+ children: strings.MIDDLE_MOUSE
121
122
  }), /*#__PURE__*/jsx(Typography, {
122
- children: strings.swipe
123
+ children: strings.SWIPE
123
124
  })]
124
125
  })]
125
126
  }), /*#__PURE__*/jsx(Divider, {
@@ -127,22 +128,22 @@ const ControlsInfoPane = ({
127
128
  }), /*#__PURE__*/jsxs(Box, {
128
129
  sx: controlRowSx,
129
130
  children: [/*#__PURE__*/jsx(Typography, {
130
- children: strings.look
131
+ children: strings.LOOK
131
132
  }), /*#__PURE__*/jsx(Typography, {
132
- children: strings.rightMouse
133
+ children: strings.RIGHT_MOUSE
133
134
  })]
134
135
  }), /*#__PURE__*/jsx(Divider, {
135
136
  sx: dividerSx
136
137
  }), /*#__PURE__*/jsxs(Box, {
137
138
  sx: controlRowSx,
138
139
  children: [/*#__PURE__*/jsx(Typography, {
139
- children: strings.zoom
140
+ children: strings.ZOOM
140
141
  }), /*#__PURE__*/jsxs(Box, {
141
142
  sx: rightAlignedTextSx,
142
143
  children: [/*#__PURE__*/jsx(Typography, {
143
- children: strings.mouseWheel
144
+ children: strings.MOUSE_WHEEL
144
145
  }), /*#__PURE__*/jsx(Typography, {
145
- children: strings.pinch
146
+ children: strings.PINCH
146
147
  })]
147
148
  })]
148
149
  }), /*#__PURE__*/jsx(Divider, {
@@ -150,13 +151,13 @@ const ControlsInfoPane = ({
150
151
  }), /*#__PURE__*/jsxs(Box, {
151
152
  sx: controlRowSx,
152
153
  children: [/*#__PURE__*/jsx(Typography, {
153
- children: strings.fly
154
+ children: strings.FLY
154
155
  }), /*#__PURE__*/jsxs(Box, {
155
156
  sx: rightAlignedTextSx,
156
157
  children: [/*#__PURE__*/jsx(Typography, {
157
158
  children: "WASD"
158
159
  }), /*#__PURE__*/jsx(Typography, {
159
- children: strings.arrowKeys
160
+ children: strings.ARROW_KEYS
160
161
  })]
161
162
  })]
162
163
  }), /*#__PURE__*/jsx(Divider, {
@@ -164,25 +165,25 @@ const ControlsInfoPane = ({
164
165
  }), /*#__PURE__*/jsxs(Box, {
165
166
  sx: controlRowSx,
166
167
  children: [/*#__PURE__*/jsx(Typography, {
167
- children: strings.flyFaster
168
+ children: strings.FLY_FASTER
168
169
  }), /*#__PURE__*/jsx(Typography, {
169
- children: strings.shift
170
+ children: strings.SHIFT
170
171
  })]
171
172
  }), /*#__PURE__*/jsx(Divider, {
172
173
  sx: dividerSx
173
174
  }), /*#__PURE__*/jsxs(Box, {
174
175
  sx: controlRowSx,
175
176
  children: [/*#__PURE__*/jsx(Typography, {
176
- children: strings.flySlower
177
+ children: strings.FLY_SLOWER
177
178
  }), /*#__PURE__*/jsx(Typography, {
178
- children: strings.ctrl
179
+ children: strings.CTRL
179
180
  })]
180
181
  }), /*#__PURE__*/jsx(Divider, {
181
182
  sx: dividerSx
182
183
  }), /*#__PURE__*/jsxs(Box, {
183
184
  sx: controlRowSx,
184
185
  children: [/*#__PURE__*/jsx(Typography, {
185
- children: strings.resetCamera
186
+ children: strings.RESET_CAMERA
186
187
  }), /*#__PURE__*/jsx(Typography, {
187
188
  children: "R"
188
189
  })]
@@ -1,24 +1,5 @@
1
1
  import { AnnotationProps } from './Annotation';
2
- import { AnnotationEditPaneStrings } from './AnnotationEditPane';
3
- import { CameraInfoStrings } from './CameraInfo';
4
- import { ControlsInfoPaneStrings } from './ControlsInfoPane';
5
- export interface SplatControlsStrings {
6
- addAnnotation: string;
7
- deselectAnnotation: string;
8
- deleteAnnotation: string;
9
- ar: string;
10
- vr: string;
11
- edit: string;
12
- freeFly: string;
13
- boundedFly: string;
14
- cancel: string;
15
- save: string;
16
- controlsInfoPane: ControlsInfoPaneStrings;
17
- cameraInfo: CameraInfoStrings;
18
- annotationEditPane: AnnotationEditPaneStrings;
19
- }
20
2
  export interface SplatControlsProps {
21
- strings: SplatControlsStrings;
22
3
  defaultCameraPosition?: [number, number, number];
23
4
  defaultCameraFocus?: [number, number, number];
24
5
  showAnnotations?: boolean;
@@ -48,6 +29,6 @@ export interface SplatControlsProps {
48
29
  showFreeFly?: boolean;
49
30
  onError?: (error: Error) => void;
50
31
  }
51
- declare const SplatControls: ({ strings, defaultCameraPosition, defaultCameraFocus, showAnnotations, onToggleAnnotations, autoRotate, onToggleAutoRotate, editable, isEdit, onToggleEdit, onSave, onCancel, onAddAnnotation, onDeleteAnnotation, onDeselectAnnotation, hasSelectedAnnotation, selectedAnnotation, selectedAnnotationIndex, onAnnotationUpdate, onTextFieldFocus, maxImagesPerAnnotation, onImagesChange, canSave, isFullScreen, onToggleFullScreen, isFreeFly, onToggleFreeFly, showFreeFly, onError, }: SplatControlsProps) => import("react/jsx-runtime").JSX.Element;
32
+ declare const SplatControls: ({ defaultCameraPosition, defaultCameraFocus, showAnnotations, onToggleAnnotations, autoRotate, onToggleAutoRotate, editable, isEdit, onToggleEdit, onSave, onCancel, onAddAnnotation, onDeleteAnnotation, onDeselectAnnotation, hasSelectedAnnotation, selectedAnnotation, selectedAnnotationIndex, onAnnotationUpdate, onTextFieldFocus, maxImagesPerAnnotation, onImagesChange, canSave, isFullScreen, onToggleFullScreen, isFreeFly, onToggleFreeFly, showFreeFly, onError, }: SplatControlsProps) => import("react/jsx-runtime").JSX.Element;
52
33
  export default SplatControls;
53
34
  //# sourceMappingURL=SplatControls.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SplatControls.d.ts","sourceRoot":"","sources":["../../../src/components/VirtualWalkthrough/SplatControls.tsx"],"names":[],"mappings":"AAYA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAA2B,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AACrF,OAAmB,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAC7D,OAAyB,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAE/E,MAAM,WAAW,oBAAoB;IACnC,aAAa,EAAE,MAAM,CAAC;IACtB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,gBAAgB,EAAE,MAAM,CAAC;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,gBAAgB,EAAE,uBAAuB,CAAC;IAC1C,UAAU,EAAE,iBAAiB,CAAC;IAC9B,kBAAkB,EAAE,yBAAyB,CAAC;CAC/C;AAED,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,oBAAoB,CAAC;IAC9B,qBAAqB,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IACjD,kBAAkB,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9C,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,mBAAmB,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAC9C,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,kBAAkB,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAChD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IACzC,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,IAAI,CAAC;IAC7B,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAC;IAChC,oBAAoB,CAAC,EAAE,MAAM,IAAI,CAAC;IAClC,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,kBAAkB,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;IAC5C,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,kBAAkB,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,eAAe,CAAC,KAAK,IAAI,CAAC;IAChE,gBAAgB,CAAC,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;IAChD,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,IAAI,CAAC;IACzC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAC;IAChC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,IAAI,CAAC;IAC7B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;CAClC;AAED,QAAA,MAAM,aAAa,GAAI,2dA8BpB,kBAAkB,4CAwKpB,CAAC;AAEF,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"SplatControls.d.ts","sourceRoot":"","sources":["../../../src/components/VirtualWalkthrough/SplatControls.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAK/C,MAAM,WAAW,kBAAkB;IACjC,qBAAqB,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IACjD,kBAAkB,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9C,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,mBAAmB,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAC9C,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,kBAAkB,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAChD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IACzC,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,IAAI,CAAC;IAC7B,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAC;IAChC,oBAAoB,CAAC,EAAE,MAAM,IAAI,CAAC;IAClC,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,kBAAkB,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;IAC5C,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,kBAAkB,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,eAAe,CAAC,KAAK,IAAI,CAAC;IAChE,gBAAgB,CAAC,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;IAChD,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,IAAI,CAAC;IACzC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAC;IAChC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,IAAI,CAAC;IAC7B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;CAClC;AAED,QAAA,MAAM,aAAa,GAAI,kdA6BpB,kBAAkB,4CAuKpB,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -4,6 +4,7 @@ import { useTheme, Box, IconButton } from '@mui/material';
4
4
  import useBoolean from '../../hooks/useBoolean.js';
5
5
  import { useCameraPosition } from '../../hooks/useCameraPosition.js';
6
6
  import useXr from '../../hooks/useXr.js';
7
+ import { useStrings } from '../../strings/index.js';
7
8
  import { getRgbaFromHex } from '../../utils/color.js';
8
9
  import useDeviceInfo from '../../utils/useDeviceInfo.js';
9
10
  import Button from '../Button/Button.js';
@@ -14,7 +15,6 @@ import ControlsInfoPane from './ControlsInfoPane.js';
14
15
  import { jsxs, jsx } from 'react/jsx-runtime';
15
16
 
16
17
  const SplatControls = ({
17
- strings,
18
18
  defaultCameraPosition,
19
19
  defaultCameraFocus,
20
20
  showAnnotations,
@@ -45,8 +45,10 @@ const SplatControls = ({
45
45
  onError
46
46
  }) => {
47
47
  const theme = useTheme();
48
+ const strings = useStrings();
48
49
  const {
49
- isDesktop
50
+ isDesktop,
51
+ isMobile
50
52
  } = useDeviceInfo();
51
53
  const {
52
54
  setCamera,
@@ -120,13 +122,13 @@ const SplatControls = ({
120
122
  pointerEvents: 'auto'
121
123
  },
122
124
  children: [!hasSelectedAnnotation && onAddAnnotation && /*#__PURE__*/jsx(Button, {
123
- label: strings.addAnnotation,
125
+ label: strings.ADD_ANNOTATION,
124
126
  onClick: onAddAnnotation
125
127
  }), hasSelectedAnnotation && onDeselectAnnotation && /*#__PURE__*/jsx(Button, {
126
- label: strings.deselectAnnotation,
128
+ label: strings.DESELECT_ANNOTATION,
127
129
  onClick: onDeselectAnnotation
128
130
  }), hasSelectedAnnotation && onDeleteAnnotation && /*#__PURE__*/jsx(Button, {
129
- label: strings.deleteAnnotation,
131
+ label: strings.DELETE_ANNOTATION,
130
132
  onClick: onDeleteAnnotation
131
133
  })]
132
134
  }), /*#__PURE__*/jsxs(Box, {
@@ -139,23 +141,23 @@ const SplatControls = ({
139
141
  gap: 1,
140
142
  pointerEvents: 'auto'
141
143
  },
142
- children: [isXrAvailable('AR') && !isEdit && /*#__PURE__*/jsx(Button, {
143
- label: strings.ar,
144
+ children: [isMobile && isXrAvailable('AR') && !isEdit && /*#__PURE__*/jsx(Button, {
145
+ label: strings.AR,
144
146
  onClick: () => startXr('AR')
145
- }), isXrAvailable('VR') && !isEdit && /*#__PURE__*/jsx(Button, {
146
- label: strings.vr,
147
+ }), !isMobile && isXrAvailable('VR') && !isEdit && /*#__PURE__*/jsx(Button, {
148
+ label: strings.VR,
147
149
  onClick: () => startXr('VR')
148
150
  }), isDesktop && editable && !isEdit && onToggleEdit && /*#__PURE__*/jsx(Button, {
149
- label: strings.edit,
151
+ label: strings.EDIT,
150
152
  onClick: handleEdit
151
153
  }), isDesktop && showFreeFly && !isEdit && onToggleFreeFly && /*#__PURE__*/jsx(Button, {
152
- label: isFreeFly ? strings.boundedFly : strings.freeFly,
154
+ label: isFreeFly ? strings.BOUNDED_FLY : strings.FREE_FLY,
153
155
  onClick: onToggleFreeFly
154
156
  }), isEdit && onCancel && /*#__PURE__*/jsx(Button, {
155
- label: strings.cancel,
157
+ label: strings.CANCEL,
156
158
  onClick: onCancel
157
159
  }), isEdit && onSave && /*#__PURE__*/jsx(Button, {
158
- label: strings.save,
160
+ label: strings.SAVE,
159
161
  onClick: onSave,
160
162
  disabled: !canSave
161
163
  })]
@@ -202,7 +204,6 @@ const SplatControls = ({
202
204
  }), /*#__PURE__*/jsx(ControlsInfoPane, {
203
205
  visible: isInfoVisible,
204
206
  paneRef: paneRef,
205
- strings: strings.controlsInfoPane,
206
207
  showAnnotations: showAnnotations,
207
208
  onToggleAnnotations: onToggleAnnotations,
208
209
  autoRotate: autoRotate,
@@ -211,13 +212,11 @@ const SplatControls = ({
211
212
  }), /*#__PURE__*/jsx(AnnotationEditPane, {
212
213
  visible: isEdit === true && hasSelectedAnnotation === true,
213
214
  annotation: selectedAnnotation ?? null,
214
- strings: strings.annotationEditPane,
215
215
  onUpdate: onAnnotationUpdate,
216
216
  onTextFieldFocus: onTextFieldFocus,
217
217
  maxImages: maxImagesPerAnnotation,
218
218
  onImagesChange: onImagesChange
219
219
  }, selectedAnnotationIndex), isEdit && /*#__PURE__*/jsx(CameraInfo, {
220
- strings: strings.cameraInfo,
221
220
  getCameraState: getCameraState
222
221
  })]
223
222
  });
@@ -9,6 +9,11 @@ export interface SplatModelProps {
9
9
  */
10
10
  splatFormat?: SplatFormat;
11
11
  rotation?: [number, number, number];
12
+ /**
13
+ * Scale applied to the splat entity. Splat models come out of reconstruction in their own
14
+ * arbitrary units, so this is what converts them world units.
15
+ */
16
+ scaleFactor?: number;
12
17
  cropAabbMin?: [number, number, number];
13
18
  cropAabbMax?: [number, number, number];
14
19
  cropEdgeScaleFactor?: number;
@@ -17,6 +22,6 @@ export interface SplatModelProps {
17
22
  revealRain?: boolean;
18
23
  onError?: (error: Error) => void;
19
24
  }
20
- declare const _default: React.MemoExoticComponent<({ splatSrc, splatFormat, rotation, cropAabbMin, cropAabbMax, cropEdgeScaleFactor, cropFade, cropFadeDistance, revealRain, onError, }: SplatModelProps) => import("react/jsx-runtime").JSX.Element | null>;
25
+ declare const _default: React.MemoExoticComponent<({ splatSrc, splatFormat, rotation, scaleFactor, cropAabbMin, cropAabbMax, cropEdgeScaleFactor, cropFade, cropFadeDistance, revealRain, onError, }: SplatModelProps) => import("react/jsx-runtime").JSX.Element | null>;
21
26
  export default _default;
22
27
  //# sourceMappingURL=SplatModel.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SplatModel.d.ts","sourceRoot":"","sources":["../../../src/components/VirtualWalkthrough/SplatModel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA0B,MAAM,OAAO,CAAC;AAU/C,OAAO,EAAE,WAAW,EAA0C,MAAM,eAAe,CAAC;AAEpF,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IACvC,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IACvC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;CAClC;yLAaE,eAAe;AAkClB,wBAAgC"}
1
+ {"version":3,"file":"SplatModel.d.ts","sourceRoot":"","sources":["../../../src/components/VirtualWalkthrough/SplatModel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA0B,MAAM,OAAO,CAAC;AAU/C,OAAO,EAAE,WAAW,EAA0C,MAAM,eAAe,CAAC;AAEpF,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IACvC,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IACvC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;CAClC;sMAcE,eAAe;AAkClB,wBAAgC"}
@@ -13,6 +13,7 @@ const SplatModel = ({
13
13
  splatSrc,
14
14
  splatFormat,
15
15
  rotation,
16
+ scaleFactor = 1,
16
17
  cropAabbMin,
17
18
  cropAabbMax,
18
19
  cropEdgeScaleFactor,
@@ -47,6 +48,7 @@ const SplatModel = ({
47
48
  return /*#__PURE__*/jsxs(Entity, {
48
49
  name: "splat",
49
50
  rotation: rotation,
51
+ scale: [scaleFactor, scaleFactor, scaleFactor],
50
52
  children: [/*#__PURE__*/jsx(GSplat, {
51
53
  asset: asset,
52
54
  unified: true
@@ -8,7 +8,6 @@ import { AnnotationIconType } from './Annotation';
8
8
  export declare class TfAnnotationManager extends PcAnnotationManager {
9
9
  static scriptName: string;
10
10
  private _maxWorldSize;
11
- private _scratchScale;
12
11
  private _customParentDom;
13
12
  private _clickHandlersAttached;
14
13
  private _hotspotBackgroundColor;
@@ -98,8 +97,8 @@ export declare class TfAnnotationManager extends PcAnnotationManager {
98
97
  _updateAnnotationPositions(annotation: any, resources: any, screenPos: any): void;
99
98
  /**
100
99
  * Override to also disable the hotspot mesh (not just the DOM) when the annotation is behind the
101
- * camera. The base implementation leaves the mesh enabled, so a not-yet-scaled plane under a
102
- * scaled content-root would stay huge in view until the camera moves the anchor in front.
100
+ * camera. The base implementation leaves the mesh enabled, so a not-yet-scaled plane would stay
101
+ * in view at its full unit size until the camera moves the anchor in front.
103
102
  * @private
104
103
  */
105
104
  _hideAnnotationElements(annotation: any, resources: any): void;
@@ -109,12 +108,6 @@ export declare class TfAnnotationManager extends PcAnnotationManager {
109
108
  * @private
110
109
  */
111
110
  _updateAnnotationRotationAndScale(annotation: any): void;
112
- /**
113
- * World-space uniform scale of the annotation entity's parent (e.g. a scaled
114
- * content-root). Returns 1 when there is no parent or it has no scale.
115
- * @private
116
- */
117
- _getParentWorldScale(entity: any): number;
118
111
  /**
119
112
  * Override to create hotspot texture with custom background color.
120
113
  * @private