@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.
- package/components/VirtualWalkthrough/Annotation.d.ts.map +1 -1
- package/components/VirtualWalkthrough/Annotation.js +10 -0
- package/components/VirtualWalkthrough/BoundaryWall.d.ts +11 -0
- package/components/VirtualWalkthrough/BoundaryWall.d.ts.map +1 -0
- package/components/VirtualWalkthrough/BoundaryWall.js +35 -0
- package/components/VirtualWalkthrough/SplatModel.d.ts +1 -8
- package/components/VirtualWalkthrough/SplatModel.d.ts.map +1 -1
- package/components/VirtualWalkthrough/SplatModel.js +2 -6
- package/components/VirtualWalkthrough/TfXrNavigation.d.ts +42 -6
- package/components/VirtualWalkthrough/TfXrNavigation.d.ts.map +1 -1
- package/components/VirtualWalkthrough/TfXrNavigation.js +109 -9
- package/components/VirtualWalkthrough/TfXrNavigation.test.js +110 -0
- package/components/VirtualWalkthrough/VirtualWalkthroughViewer.d.ts +1 -3
- package/components/VirtualWalkthrough/VirtualWalkthroughViewer.d.ts.map +1 -1
- package/components/VirtualWalkthrough/VirtualWalkthroughViewer.js +51 -6
- package/components/VirtualWalkthrough/VrAnnotationPanel.d.ts +9 -0
- package/components/VirtualWalkthrough/VrAnnotationPanel.d.ts.map +1 -0
- package/components/VirtualWalkthrough/VrAnnotationPanel.js +22 -0
- package/components/VirtualWalkthrough/XrAnnotationInteraction.d.ts +6 -0
- package/components/VirtualWalkthrough/XrAnnotationInteraction.d.ts.map +1 -0
- package/components/VirtualWalkthrough/XrAnnotationInteraction.js +15 -0
- package/components/VirtualWalkthrough/XrGazeDwell.d.ts +6 -0
- package/components/VirtualWalkthrough/XrGazeDwell.d.ts.map +1 -0
- package/components/VirtualWalkthrough/XrGazeDwell.js +15 -0
- package/components/VirtualWalkthrough/XrPointerRay.d.ts +7 -0
- package/components/VirtualWalkthrough/XrPointerRay.d.ts.map +1 -0
- package/components/VirtualWalkthrough/XrPointerRay.js +15 -0
- package/components/VirtualWalkthrough/boundary-wall.d.ts +86 -0
- package/components/VirtualWalkthrough/boundary-wall.d.ts.map +1 -0
- package/components/VirtualWalkthrough/boundary-wall.js +331 -0
- package/components/VirtualWalkthrough/boundary-wall.test.js +203 -0
- package/components/VirtualWalkthrough/vr-annotation-panel-layout.d.ts +6 -0
- package/components/VirtualWalkthrough/vr-annotation-panel-layout.d.ts.map +1 -0
- package/components/VirtualWalkthrough/vr-annotation-panel-layout.js +22 -0
- package/components/VirtualWalkthrough/vr-annotation-panel-layout.test.js +26 -0
- package/components/VirtualWalkthrough/vr-annotation-panel.d.ts +40 -0
- package/components/VirtualWalkthrough/vr-annotation-panel.d.ts.map +1 -0
- package/components/VirtualWalkthrough/vr-annotation-panel.js +312 -0
- package/components/VirtualWalkthrough/xr-annotation-candidates.d.ts +18 -0
- package/components/VirtualWalkthrough/xr-annotation-candidates.d.ts.map +1 -0
- package/components/VirtualWalkthrough/xr-annotation-candidates.js +38 -0
- package/components/VirtualWalkthrough/xr-annotation-interaction.d.ts +13 -0
- package/components/VirtualWalkthrough/xr-annotation-interaction.d.ts.map +1 -0
- package/components/VirtualWalkthrough/xr-annotation-interaction.js +59 -0
- package/components/VirtualWalkthrough/xr-annotation-targeting.d.ts +10 -0
- package/components/VirtualWalkthrough/xr-annotation-targeting.d.ts.map +1 -0
- package/components/VirtualWalkthrough/xr-annotation-targeting.js +36 -0
- package/components/VirtualWalkthrough/xr-annotation-targeting.test.js +66 -0
- package/components/VirtualWalkthrough/xr-button-arming.d.ts +14 -0
- package/components/VirtualWalkthrough/xr-button-arming.d.ts.map +1 -0
- package/components/VirtualWalkthrough/xr-button-arming.js +19 -0
- package/components/VirtualWalkthrough/xr-button-arming.test.js +35 -0
- package/components/VirtualWalkthrough/xr-button-hold.d.ts +20 -0
- package/components/VirtualWalkthrough/xr-button-hold.d.ts.map +1 -0
- package/components/VirtualWalkthrough/xr-button-hold.js +43 -0
- package/components/VirtualWalkthrough/xr-button-hold.test.js +57 -0
- package/components/VirtualWalkthrough/xr-exit-button.d.ts +21 -4
- package/components/VirtualWalkthrough/xr-exit-button.d.ts.map +1 -1
- package/components/VirtualWalkthrough/xr-exit-button.js +98 -37
- package/components/VirtualWalkthrough/xr-face-buttons.d.ts +15 -0
- package/components/VirtualWalkthrough/xr-face-buttons.d.ts.map +1 -0
- package/components/VirtualWalkthrough/xr-face-buttons.js +31 -0
- package/components/VirtualWalkthrough/xr-face-buttons.test.js +82 -0
- package/components/VirtualWalkthrough/xr-gaze-dwell-state.d.ts +17 -0
- package/components/VirtualWalkthrough/xr-gaze-dwell-state.d.ts.map +1 -0
- package/components/VirtualWalkthrough/xr-gaze-dwell-state.js +39 -0
- package/components/VirtualWalkthrough/xr-gaze-dwell-state.test.js +61 -0
- package/components/VirtualWalkthrough/xr-gaze-dwell.d.ts +30 -0
- package/components/VirtualWalkthrough/xr-gaze-dwell.d.ts.map +1 -0
- package/components/VirtualWalkthrough/xr-gaze-dwell.js +173 -0
- package/components/VirtualWalkthrough/xr-interactive-ui.d.ts +13 -0
- package/components/VirtualWalkthrough/xr-interactive-ui.d.ts.map +1 -0
- package/components/VirtualWalkthrough/xr-interactive-ui.js +25 -0
- package/components/VirtualWalkthrough/xr-interactive-ui.test.js +165 -0
- package/components/VirtualWalkthrough/xr-pointer-ray.d.ts +10 -0
- package/components/VirtualWalkthrough/xr-pointer-ray.d.ts.map +1 -0
- package/components/VirtualWalkthrough/xr-pointer-ray.js +24 -0
- package/components/VirtualWalkthrough/xr-progress-pie.d.ts +10 -0
- package/components/VirtualWalkthrough/xr-progress-pie.d.ts.map +1 -0
- package/components/VirtualWalkthrough/xr-progress-pie.js +30 -0
- package/components/VirtualWalkthrough/xr-progress-pie.test.js +79 -0
- package/components/VirtualWalkthrough/xr-ray-quad.d.ts +13 -0
- package/components/VirtualWalkthrough/xr-ray-quad.d.ts.map +1 -0
- package/components/VirtualWalkthrough/xr-ray-quad.js +29 -0
- package/components/VirtualWalkthrough/xr-ray-quad.test.js +37 -0
- package/components/VirtualWalkthrough/xr-scene-bounds.d.ts +17 -0
- package/components/VirtualWalkthrough/xr-scene-bounds.d.ts.map +1 -0
- package/components/VirtualWalkthrough/xr-scene-bounds.js +41 -0
- package/components/VirtualWalkthrough/xr-scene-bounds.test.js +70 -0
- package/components/VirtualWalkthrough/xr-teleport-gesture.d.ts +30 -0
- package/components/VirtualWalkthrough/xr-teleport-gesture.d.ts.map +1 -0
- package/components/VirtualWalkthrough/xr-teleport-gesture.js +45 -0
- package/components/VirtualWalkthrough/xr-teleport-gesture.test.js +90 -0
- package/hooks/useXr.d.ts +2 -0
- package/hooks/useXr.d.ts.map +1 -1
- package/hooks/useXr.js +10 -6
- package/package.json +1 -1
- package/virtualWalkthrough.d.ts +1 -3
- package/virtualWalkthrough.d.ts.map +1 -1
- package/virtualWalkthrough.js +1 -2
- package/components/VirtualWalkthrough/splatFormat.d.ts +0 -17
- package/components/VirtualWalkthrough/splatFormat.d.ts.map +0 -1
- package/components/VirtualWalkthrough/splatFormat.js +0 -50
- package/components/VirtualWalkthrough/splatFormat.test.js +0 -51
package/virtualWalkthrough.js
CHANGED
|
@@ -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,
|
|
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
|
-
});
|