@terraware/web-components 4.2.22-rc.0 → 4.2.22

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 (104) hide show
  1. package/components/VirtualWalkthrough/Annotation.d.ts.map +1 -1
  2. package/components/VirtualWalkthrough/Annotation.js +10 -0
  3. package/components/VirtualWalkthrough/BoundaryWall.d.ts +11 -0
  4. package/components/VirtualWalkthrough/BoundaryWall.d.ts.map +1 -0
  5. package/components/VirtualWalkthrough/BoundaryWall.js +35 -0
  6. package/components/VirtualWalkthrough/SplatModel.d.ts +1 -8
  7. package/components/VirtualWalkthrough/SplatModel.d.ts.map +1 -1
  8. package/components/VirtualWalkthrough/SplatModel.js +2 -6
  9. package/components/VirtualWalkthrough/TfXrNavigation.d.ts +42 -6
  10. package/components/VirtualWalkthrough/TfXrNavigation.d.ts.map +1 -1
  11. package/components/VirtualWalkthrough/TfXrNavigation.js +109 -9
  12. package/components/VirtualWalkthrough/TfXrNavigation.test.js +110 -0
  13. package/components/VirtualWalkthrough/VirtualWalkthroughViewer.d.ts +1 -3
  14. package/components/VirtualWalkthrough/VirtualWalkthroughViewer.d.ts.map +1 -1
  15. package/components/VirtualWalkthrough/VirtualWalkthroughViewer.js +51 -6
  16. package/components/VirtualWalkthrough/VrAnnotationPanel.d.ts +9 -0
  17. package/components/VirtualWalkthrough/VrAnnotationPanel.d.ts.map +1 -0
  18. package/components/VirtualWalkthrough/VrAnnotationPanel.js +22 -0
  19. package/components/VirtualWalkthrough/XrAnnotationInteraction.d.ts +6 -0
  20. package/components/VirtualWalkthrough/XrAnnotationInteraction.d.ts.map +1 -0
  21. package/components/VirtualWalkthrough/XrAnnotationInteraction.js +15 -0
  22. package/components/VirtualWalkthrough/XrGazeDwell.d.ts +6 -0
  23. package/components/VirtualWalkthrough/XrGazeDwell.d.ts.map +1 -0
  24. package/components/VirtualWalkthrough/XrGazeDwell.js +15 -0
  25. package/components/VirtualWalkthrough/XrPointerRay.d.ts +7 -0
  26. package/components/VirtualWalkthrough/XrPointerRay.d.ts.map +1 -0
  27. package/components/VirtualWalkthrough/XrPointerRay.js +15 -0
  28. package/components/VirtualWalkthrough/boundary-wall.d.ts +86 -0
  29. package/components/VirtualWalkthrough/boundary-wall.d.ts.map +1 -0
  30. package/components/VirtualWalkthrough/boundary-wall.js +331 -0
  31. package/components/VirtualWalkthrough/boundary-wall.test.js +203 -0
  32. package/components/VirtualWalkthrough/vr-annotation-panel-layout.d.ts +6 -0
  33. package/components/VirtualWalkthrough/vr-annotation-panel-layout.d.ts.map +1 -0
  34. package/components/VirtualWalkthrough/vr-annotation-panel-layout.js +22 -0
  35. package/components/VirtualWalkthrough/vr-annotation-panel-layout.test.js +26 -0
  36. package/components/VirtualWalkthrough/vr-annotation-panel.d.ts +40 -0
  37. package/components/VirtualWalkthrough/vr-annotation-panel.d.ts.map +1 -0
  38. package/components/VirtualWalkthrough/vr-annotation-panel.js +312 -0
  39. package/components/VirtualWalkthrough/xr-annotation-candidates.d.ts +18 -0
  40. package/components/VirtualWalkthrough/xr-annotation-candidates.d.ts.map +1 -0
  41. package/components/VirtualWalkthrough/xr-annotation-candidates.js +38 -0
  42. package/components/VirtualWalkthrough/xr-annotation-interaction.d.ts +13 -0
  43. package/components/VirtualWalkthrough/xr-annotation-interaction.d.ts.map +1 -0
  44. package/components/VirtualWalkthrough/xr-annotation-interaction.js +59 -0
  45. package/components/VirtualWalkthrough/xr-annotation-targeting.d.ts +10 -0
  46. package/components/VirtualWalkthrough/xr-annotation-targeting.d.ts.map +1 -0
  47. package/components/VirtualWalkthrough/xr-annotation-targeting.js +36 -0
  48. package/components/VirtualWalkthrough/xr-annotation-targeting.test.js +66 -0
  49. package/components/VirtualWalkthrough/xr-button-arming.d.ts +14 -0
  50. package/components/VirtualWalkthrough/xr-button-arming.d.ts.map +1 -0
  51. package/components/VirtualWalkthrough/xr-button-arming.js +19 -0
  52. package/components/VirtualWalkthrough/xr-button-arming.test.js +35 -0
  53. package/components/VirtualWalkthrough/xr-button-hold.d.ts +20 -0
  54. package/components/VirtualWalkthrough/xr-button-hold.d.ts.map +1 -0
  55. package/components/VirtualWalkthrough/xr-button-hold.js +43 -0
  56. package/components/VirtualWalkthrough/xr-button-hold.test.js +57 -0
  57. package/components/VirtualWalkthrough/xr-exit-button.d.ts +21 -4
  58. package/components/VirtualWalkthrough/xr-exit-button.d.ts.map +1 -1
  59. package/components/VirtualWalkthrough/xr-exit-button.js +98 -37
  60. package/components/VirtualWalkthrough/xr-face-buttons.d.ts +15 -0
  61. package/components/VirtualWalkthrough/xr-face-buttons.d.ts.map +1 -0
  62. package/components/VirtualWalkthrough/xr-face-buttons.js +31 -0
  63. package/components/VirtualWalkthrough/xr-face-buttons.test.js +82 -0
  64. package/components/VirtualWalkthrough/xr-gaze-dwell-state.d.ts +17 -0
  65. package/components/VirtualWalkthrough/xr-gaze-dwell-state.d.ts.map +1 -0
  66. package/components/VirtualWalkthrough/xr-gaze-dwell-state.js +39 -0
  67. package/components/VirtualWalkthrough/xr-gaze-dwell-state.test.js +61 -0
  68. package/components/VirtualWalkthrough/xr-gaze-dwell.d.ts +30 -0
  69. package/components/VirtualWalkthrough/xr-gaze-dwell.d.ts.map +1 -0
  70. package/components/VirtualWalkthrough/xr-gaze-dwell.js +173 -0
  71. package/components/VirtualWalkthrough/xr-interactive-ui.d.ts +13 -0
  72. package/components/VirtualWalkthrough/xr-interactive-ui.d.ts.map +1 -0
  73. package/components/VirtualWalkthrough/xr-interactive-ui.js +25 -0
  74. package/components/VirtualWalkthrough/xr-interactive-ui.test.js +165 -0
  75. package/components/VirtualWalkthrough/xr-pointer-ray.d.ts +10 -0
  76. package/components/VirtualWalkthrough/xr-pointer-ray.d.ts.map +1 -0
  77. package/components/VirtualWalkthrough/xr-pointer-ray.js +24 -0
  78. package/components/VirtualWalkthrough/xr-progress-pie.d.ts +10 -0
  79. package/components/VirtualWalkthrough/xr-progress-pie.d.ts.map +1 -0
  80. package/components/VirtualWalkthrough/xr-progress-pie.js +30 -0
  81. package/components/VirtualWalkthrough/xr-progress-pie.test.js +79 -0
  82. package/components/VirtualWalkthrough/xr-ray-quad.d.ts +13 -0
  83. package/components/VirtualWalkthrough/xr-ray-quad.d.ts.map +1 -0
  84. package/components/VirtualWalkthrough/xr-ray-quad.js +29 -0
  85. package/components/VirtualWalkthrough/xr-ray-quad.test.js +37 -0
  86. package/components/VirtualWalkthrough/xr-scene-bounds.d.ts +17 -0
  87. package/components/VirtualWalkthrough/xr-scene-bounds.d.ts.map +1 -0
  88. package/components/VirtualWalkthrough/xr-scene-bounds.js +41 -0
  89. package/components/VirtualWalkthrough/xr-scene-bounds.test.js +70 -0
  90. package/components/VirtualWalkthrough/xr-teleport-gesture.d.ts +30 -0
  91. package/components/VirtualWalkthrough/xr-teleport-gesture.d.ts.map +1 -0
  92. package/components/VirtualWalkthrough/xr-teleport-gesture.js +45 -0
  93. package/components/VirtualWalkthrough/xr-teleport-gesture.test.js +90 -0
  94. package/hooks/useXr.d.ts +2 -0
  95. package/hooks/useXr.d.ts.map +1 -1
  96. package/hooks/useXr.js +10 -6
  97. package/package.json +1 -1
  98. package/virtualWalkthrough.d.ts +1 -3
  99. package/virtualWalkthrough.d.ts.map +1 -1
  100. package/virtualWalkthrough.js +1 -2
  101. package/components/VirtualWalkthrough/splatFormat.d.ts +0 -17
  102. package/components/VirtualWalkthrough/splatFormat.d.ts.map +0 -1
  103. package/components/VirtualWalkthrough/splatFormat.js +0 -50
  104. package/components/VirtualWalkthrough/splatFormat.test.js +0 -51
@@ -25,7 +25,6 @@ import { TfXrNavigation } from './components/VirtualWalkthrough/TfXrNavigation';
25
25
  import VirtualWalkthroughViewer from './components/VirtualWalkthrough/VirtualWalkthroughViewer';
26
26
  import { BoundaryRingScript, boundaryRingMesh } from './components/VirtualWalkthrough/boundary-ring';
27
27
  import { computeGroundPlane, yOnPlane } from './components/VirtualWalkthrough/groundPlane';
28
- import { detectSplatFormat, splatLoaderFilename } from './components/VirtualWalkthrough/splatFormat';
29
28
  import { WalkthroughCamera } from './components/VirtualWalkthrough/walkthrough-camera';
30
29
  import { useDevicePerformance } from './hooks/useDevicePerformance';
31
- export { Annotation, AnnotationEditPane, AnnotationPanel, Application, AutoRotator, BlockingSpinner, BoundaryRing, boundaryRingMesh, BoundaryRingScript, CameraInfo, computeGroundPlane, ControlsInfoPane, detectSplatFormat, GradientSky, SplatControls, SplatCrop, SplatFadeCrop, splatLoaderFilename, SplatModel, SplatRevealRain, TfAnnotationManager, TfXrNavigation, useDevicePerformance, VirtualWalkthroughViewer, WalkthroughCamera, yOnPlane };
30
+ export { Annotation, AnnotationEditPane, AnnotationPanel, Application, AutoRotator, BlockingSpinner, BoundaryRing, boundaryRingMesh, BoundaryRingScript, CameraInfo, computeGroundPlane, ControlsInfoPane, GradientSky, SplatControls, SplatCrop, SplatFadeCrop, SplatModel, SplatRevealRain, TfAnnotationManager, TfXrNavigation, useDevicePerformance, VirtualWalkthroughViewer, WalkthroughCamera, yOnPlane };
@@ -1,17 +0,0 @@
1
- declare const LOADER_FILENAMES: {
2
- readonly sog: "model.sog";
3
- readonly sogUnbundled: "meta.json";
4
- readonly sogStreamed: "lod-meta.json";
5
- readonly ply: "model.ply";
6
- };
7
- export type SplatFormat = keyof typeof LOADER_FILENAMES;
8
- /**
9
- * Format assumed when a URL is too opaque to tell us anything. Kept as the bundled `.sog` archive so
10
- * that existing extensionless splat URLs keep loading the way they did before the other formats were
11
- * supported.
12
- */
13
- export declare const DEFAULT_SPLAT_FORMAT: SplatFormat;
14
- export declare const splatLoaderFilename: (format: SplatFormat) => string;
15
- export declare const detectSplatFormat: (splatSrc: string) => SplatFormat;
16
- export {};
17
- //# sourceMappingURL=splatFormat.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"splatFormat.d.ts","sourceRoot":"","sources":["../../../src/components/VirtualWalkthrough/splatFormat.ts"],"names":[],"mappings":"AAoBA,QAAA,MAAM,gBAAgB;;;;;CAKZ,CAAC;AAEX,MAAM,MAAM,WAAW,GAAG,MAAM,OAAO,gBAAgB,CAAC;AAExD;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,EAAE,WAAmB,CAAC;AAEvD,eAAO,MAAM,mBAAmB,GAAI,QAAQ,WAAW,KAAG,MAAkC,CAAC;AAE7F,eAAO,MAAM,iBAAiB,GAAI,UAAU,MAAM,KAAG,WAkBpD,CAAC"}
@@ -1,50 +0,0 @@
1
- /*
2
- * The playcanvas gsplat loader picks its parser from the asset's `filename`, not from the URL it
3
- * actually downloads, because a splat is frequently served from a signed or extensionless URL. Each
4
- * supported format therefore maps to a canonical filename whose extension/basename routes the asset
5
- * to the matching engine parser:
6
- *
7
- * model.sog -> SogBundleParser sog packed into a single zip archive
8
- * meta.json -> SogParser the same sog data left unpacked as separate files
9
- * lod-meta.json -> GSplatOctreeParser sog with LOD levels, streamed in as the camera moves
10
- * model.ply -> PlyParser
11
- *
12
- * `sog` and `sogUnbundled` are two packagings of one format, not two formats: both parsers build a
13
- * GSplatSogData/GSplatSogResource and both await every texture before the resource exists. Only
14
- * `sogStreamed` streams — playcanvas.d.ts on GSplatOctreeResource#numSplats: "Not all of these are
15
- * resident at runtime: the LOD streaming system selects a subset per node based on view distance and
16
- * the configured splat budget."
17
- *
18
- * Only the filename is faked; the textures an unbundled or streamed sog references are still
19
- * resolved relative to the real URL, so no rewriting of splatSrc is needed.
20
- */
21
- const LOADER_FILENAMES = {
22
- sog: 'model.sog',
23
- sogUnbundled: 'meta.json',
24
- sogStreamed: 'lod-meta.json',
25
- ply: 'model.ply'
26
- };
27
- /**
28
- * Format assumed when a URL is too opaque to tell us anything. Kept as the bundled `.sog` archive so
29
- * that existing extensionless splat URLs keep loading the way they did before the other formats were
30
- * supported.
31
- */
32
- export const DEFAULT_SPLAT_FORMAT = 'sog';
33
- export const splatLoaderFilename = format => LOADER_FILENAMES[format];
34
- export const detectSplatFormat = splatSrc => {
35
- const path = splatSrc.split(/[?#]/)[0];
36
- const basename = path.slice(path.lastIndexOf('/') + 1).toLowerCase();
37
- if (basename === 'lod-meta.json') {
38
- return 'sogStreamed';
39
- }
40
- if (basename === 'meta.json') {
41
- return 'sogUnbundled';
42
- }
43
- if (basename.endsWith('.ply')) {
44
- return 'ply';
45
- }
46
- if (basename.endsWith('.sog')) {
47
- return 'sog';
48
- }
49
- return DEFAULT_SPLAT_FORMAT;
50
- };
@@ -1,51 +0,0 @@
1
- import { detectSplatFormat, splatLoaderFilename } from './splatFormat';
2
- describe('detectSplatFormat', () => {
3
- it('detects a bundled .sog archive', () => {
4
- expect(detectSplatFormat('https://example.com/scenes/7154.sog')).toBe('sog');
5
- });
6
- it('detects an unbundled sog meta.json', () => {
7
- expect(detectSplatFormat('https://example.com/scenes/7154/meta.json')).toBe('sogUnbundled');
8
- });
9
- it('detects a streamed LOD sog lod-meta.json', () => {
10
- expect(detectSplatFormat('https://example.com/scenes/7154/lod-meta.json')).toBe('sogStreamed');
11
- });
12
- it('detects a .ply model', () => {
13
- expect(detectSplatFormat('https://example.com/scenes/7154.ply')).toBe('ply');
14
- });
15
- it('ignores query strings on signed urls', () => {
16
- expect(detectSplatFormat('https://example.com/7154/meta.json?rlkey=abc123&raw=1')).toBe('sogUnbundled');
17
- });
18
- it('ignores url fragments', () => {
19
- expect(detectSplatFormat('https://example.com/7154/lod-meta.json#frag')).toBe('sogStreamed');
20
- });
21
- it('is case insensitive', () => {
22
- expect(detectSplatFormat('https://example.com/7154/Meta.JSON')).toBe('sogUnbundled');
23
- expect(detectSplatFormat('https://example.com/7154.SOG')).toBe('sog');
24
- });
25
- it('handles a bare filename with no directory', () => {
26
- expect(detectSplatFormat('meta.json')).toBe('sogUnbundled');
27
- });
28
- it('does not mistake lod-meta.json for the unbundled format', () => {
29
- expect(detectSplatFormat('https://example.com/lod-meta.json')).not.toBe('sogUnbundled');
30
- });
31
- it('does not treat an arbitrary .json file as a sog manifest', () => {
32
- expect(detectSplatFormat('https://example.com/scene.json')).toBe('sog');
33
- });
34
- it('falls back to the bundled sog format for extensionless urls', () => {
35
- expect(detectSplatFormat('https://example.com/assets/abc123?raw=1')).toBe('sog');
36
- });
37
- });
38
- describe('splatLoaderFilename', () => {
39
- it('maps the bundled format to a .sog filename so the loader picks the sog bundle parser', () => {
40
- expect(splatLoaderFilename('sog')).toBe('model.sog');
41
- });
42
- it('maps the unbundled format to meta.json so the loader picks the plain sog parser', () => {
43
- expect(splatLoaderFilename('sogUnbundled')).toBe('meta.json');
44
- });
45
- it('maps the streamed format to the exact basename the octree parser matches on', () => {
46
- expect(splatLoaderFilename('sogStreamed')).toBe('lod-meta.json');
47
- });
48
- it('maps ply to a .ply filename', () => {
49
- expect(splatLoaderFilename('ply')).toBe('model.ply');
50
- });
51
- });