@splnlss/3d-story-viewer 0.5.4 → 0.5.6
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/README.md
CHANGED
|
@@ -36,8 +36,8 @@ yarn build
|
|
|
36
36
|
|
|
37
37
|
Build output is written to `build/`. The package entry points are configured in `package.json`:
|
|
38
38
|
|
|
39
|
-
- `@
|
|
40
|
-
- `@
|
|
39
|
+
- `@splnlss/3d-story-viewer` -> `build/viewer.js`
|
|
40
|
+
- `@splnlss/3d-story-viewer/computeElevation` -> `build/computeElevation.js`
|
|
41
41
|
|
|
42
42
|
## Preview Build
|
|
43
43
|
|
|
@@ -48,7 +48,7 @@ yarn preview
|
|
|
48
48
|
## Basic Usage
|
|
49
49
|
|
|
50
50
|
```js
|
|
51
|
-
import { Viewer } from '@
|
|
51
|
+
import { Viewer } from '@splnlss/3d-story-viewer';
|
|
52
52
|
|
|
53
53
|
const container = document.getElementById('app');
|
|
54
54
|
const viewer = new Viewer(container, {
|
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
export type Vector3Tuple = [number, number, number];
|
|
2
|
+
export type ViewerOptions = {
|
|
3
|
+
cesiumToken?: string;
|
|
4
|
+
googleMapsToken?: string;
|
|
5
|
+
/**
|
|
6
|
+
* Defaults to true.
|
|
7
|
+
*/
|
|
8
|
+
transparentBackground?: boolean;
|
|
9
|
+
};
|
|
2
10
|
export type GaussianSplatLayerDefinition = {
|
|
3
11
|
id: string;
|
|
4
12
|
name: string;
|
|
@@ -6,7 +14,7 @@ export type GaussianSplatLayerDefinition = {
|
|
|
6
14
|
labels: string[];
|
|
7
15
|
data: {
|
|
8
16
|
url: string;
|
|
9
|
-
format: "ply" | "sog";
|
|
17
|
+
format: "ply" | "sog" | "spz";
|
|
10
18
|
};
|
|
11
19
|
options: {
|
|
12
20
|
renderOrder?: 0;
|
|
@@ -4,8 +4,14 @@ export class TransitionControls extends EventDispatcher {
|
|
|
4
4
|
lookAt: any;
|
|
5
5
|
cameraTween: any;
|
|
6
6
|
lookAtTween: any;
|
|
7
|
+
activeTransition: {
|
|
8
|
+
resolve: (value: any) => void;
|
|
9
|
+
toPosition: any;
|
|
10
|
+
toQuaternion: any;
|
|
11
|
+
};
|
|
7
12
|
is2D: boolean;
|
|
8
13
|
animateTo(position: any, quaternion: any, duration?: number): Promise<any>;
|
|
14
|
+
complete(transition: any): void;
|
|
9
15
|
update(time: any): void;
|
|
10
16
|
cancel(): void;
|
|
11
17
|
cameraUpTween: any;
|
|
@@ -16,11 +16,16 @@ export type ViewerCoords = {
|
|
|
16
16
|
* @property {number} [roll]
|
|
17
17
|
*/
|
|
18
18
|
declare class Viewer extends EventDispatcher {
|
|
19
|
-
|
|
19
|
+
/**
|
|
20
|
+
* @param {HTMLElement | null} container
|
|
21
|
+
* @param {import('../main.js').ViewerOptions} [options]
|
|
22
|
+
*/
|
|
23
|
+
constructor(container: HTMLElement | null, options?: import("../main.js").ViewerOptions);
|
|
20
24
|
isViewer: boolean;
|
|
21
25
|
type: string;
|
|
22
26
|
disposed: boolean;
|
|
23
27
|
sparkRenderer: SparkRenderer;
|
|
28
|
+
transparentBackground: boolean;
|
|
24
29
|
state: StateDispatcher;
|
|
25
30
|
renderer: any;
|
|
26
31
|
css2DRenderer: any;
|
|
@@ -102,7 +107,7 @@ declare class Viewer extends EventDispatcher {
|
|
|
102
107
|
alignCamera(lon: any, lat: any, alt: any, pitch?: number, yaw?: number, roll?: number, duration?: number): Promise<void>;
|
|
103
108
|
focusCamera(lon: any, lat: any, alt: any, distance?: number, pitch?: number, duration?: number): Promise<void>;
|
|
104
109
|
angleCamera(pitch?: number, yaw?: number, duration?: number): Promise<void>;
|
|
105
|
-
setViewMode(mode?: string): void
|
|
110
|
+
setViewMode(mode?: string): Promise<void>;
|
|
106
111
|
exportScene(): void;
|
|
107
112
|
saveScreenshot(name?: string): void;
|
|
108
113
|
dispose(): void;
|