@wemap/viewer 0.0.0-stage → 14.8.0-beta.3

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.
@@ -0,0 +1,139 @@
1
+ import { Coordinates } from '@wemap/geo';
2
+ import { ClickMode } from './graph/PanoramaPointer';
3
+ import { ViewerNode, ViewerOptions, OpenOptions, LocatedPoint, Measurement, VisionGeojsonGraph } from './types';
4
+ /** Events a {@link WemapViewer} emits. Subscribe with `viewer.on(...)`. */
5
+ export interface ViewerEvents {
6
+ /** Fired as soon as a move to a node starts, and again with the node still on screen if its image fails. */
7
+ navigate: ViewerNode;
8
+ /** Fired when the look heading changes (degrees). */
9
+ heading: number;
10
+ /** Fired once, when the first panorama is on screen. */
11
+ ready: void;
12
+ /** Fired with the position under a click, in `locate` click mode. */
13
+ locate: LocatedPoint;
14
+ /** Fired with the distance between two clicks, in `measure` click mode. */
15
+ measure: Measurement;
16
+ }
17
+ /**
18
+ * Framework-agnostic 360° panorama viewer. Renders the Wemap image graph as an
19
+ * equirectangular sphere; moving to another node runs a panorama transition
20
+ * (see `transition/PanoramaTransition`).
21
+ *
22
+ * Requires `@wemap/core` to be initialized (`core.init()`) before use — it reads
23
+ * the VPS endpoint and emmid from `CoreConfig`.
24
+ *
25
+ * ```ts
26
+ * await core.init({ emmid, token });
27
+ * const viewer = new WemapViewer(el, { onNavigate: (id) => ... });
28
+ * await viewer.open(nodeId, { heading: 90 });
29
+ * ```
30
+ */
31
+ export declare class WemapViewer {
32
+ private container;
33
+ private options;
34
+ private scene;
35
+ private camera;
36
+ private renderer;
37
+ private sphereObject;
38
+ private sphere;
39
+ private transition;
40
+ private controls;
41
+ private pointer;
42
+ private measureOverlay;
43
+ /** First point of a measurement in progress (pixel of the shown image). */
44
+ private measureStart;
45
+ /** Bumped on every reset, so a late answer for a cleared measurement is dropped. */
46
+ private measureRun;
47
+ private data;
48
+ private nodes;
49
+ private graph;
50
+ private current;
51
+ /** Settles when the current node's image is on screen (or overtaken). */
52
+ private arrival;
53
+ private geojson;
54
+ private listeners;
55
+ private turn;
56
+ private readyFired;
57
+ private rafId;
58
+ private resizeObserver;
59
+ constructor(container: HTMLElement, options?: ViewerOptions);
60
+ /**
61
+ * Open the viewer on a node: by id, or the nearest node to a position (on its
62
+ * level when it has one). The first call fetches the image graph. Resolves once
63
+ * that node's image is on screen, or once a later move overtakes it; rejects if
64
+ * the node is unknown or the graph or the image fails to load.
65
+ *
66
+ * `heading` / `pitch` (degrees) set where to look: instantly on the first open,
67
+ * as an animated turn after that. Without them the look direction is kept.
68
+ */
69
+ open(target: number | Coordinates, options?: OpenOptions): Promise<void>;
70
+ /**
71
+ * Fetch the image graph without opening a photo, e.g. to find the nearest
72
+ * node or draw the graph before showing anything. Fetched once and shared
73
+ * with `open()`; a failed fetch is retried by the next call.
74
+ */
75
+ loadGraph(): Promise<ViewerNode[]>;
76
+ /** Look at a heading: instantly before anything is on screen, animated after. */
77
+ private face;
78
+ /** The nodes of the image graph (empty until `loadGraph()` or the first `open()` has fetched it). */
79
+ getNodes(): ViewerNode[];
80
+ get currentNode(): ViewerNode | null;
81
+ /**
82
+ * The graph as GeoJSON (LineString edges + Point nodes), for drawing on a map.
83
+ * Fetched and cached on first call. Used by the `@wemap/viewer-map` bridge.
84
+ */
85
+ getGraphGeojson(): Promise<VisionGeojsonGraph>;
86
+ /**
87
+ * Subscribe to a viewer event. Returns an unsubscribe function. Unlike the
88
+ * `onXxx` constructor options (single callback each), any number of listeners
89
+ * can subscribe here — this is what the map bridges use.
90
+ */
91
+ on<K extends keyof ViewerEvents>(event: K, callback: (payload: ViewerEvents[K]) => void): () => void;
92
+ private emit;
93
+ /**
94
+ * Move to another node by id; no-op if unknown or already current. `navigate`
95
+ * fires right away. If the node's image then fails to load, the viewer goes
96
+ * back to the node still on screen (`navigate` again) and reports `onError`.
97
+ */
98
+ navigateTo(nodeId: number): void;
99
+ /**
100
+ * Make `node` current and bring its image on screen. The camera (lon/lat) is
101
+ * left untouched: the look direction is a real-world compass heading, so the
102
+ * user keeps facing the same way. On failure, falls back to the
103
+ * node still on screen.
104
+ */
105
+ private moveTo;
106
+ private fireReady;
107
+ private setCurrent;
108
+ /**
109
+ * Node closest to a geo position, on `level` when given. Null when the graph
110
+ * is not loaded yet (see `loadGraph()`) or has no node on that level.
111
+ */
112
+ nearestNode(to: Coordinates, level?: number): ViewerNode | null;
113
+ private closestNode;
114
+ /** Turn to a compass heading and pitch (degrees), animated the short way round. */
115
+ lookAt(heading: number, pitch?: number): void;
116
+ resize(): void;
117
+ /** Tear down the renderer, controls, observers and DOM. */
118
+ destroy(): void;
119
+ /** What a click on the panorama does: walk (`navigate`, the default), `locate` or `measure`. */
120
+ get clickMode(): ClickMode;
121
+ /**
122
+ * Switch what a click on the panorama does, instead of walking:
123
+ * - `locate`: a click reports the geo position under it (`locate` / `onLocate`).
124
+ * - `measure`: two clicks report the distance between the two points
125
+ * (`measure` / `onMeasure`), drawn as two dots and a line; a third click
126
+ * clears them.
127
+ */
128
+ setClickMode(mode: ClickMode): void;
129
+ /** One click of a measurement: first point, second point (then measure), or clear. */
130
+ private measureAt;
131
+ private clearMeasurement;
132
+ /** Locate what is under a click, from the shown node's image and the VPS depth. */
133
+ private locateAt;
134
+ /** Current look heading in degrees (0 = north, clockwise). */
135
+ getHeading(): number;
136
+ private emitHeading;
137
+ private animate;
138
+ }
139
+ //# sourceMappingURL=WemapViewer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WemapViewer.d.ts","sourceRoot":"","sources":["../../src/WemapViewer.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE9C,OAAO,EAAmB,KAAK,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAM1E,OAAO,KAAK,EACV,UAAU,EAAE,aAAa,EAAE,WAAW,EAAE,YAAY,EAAE,WAAW,EAAE,kBAAkB,EACtF,MAAM,SAAS,CAAC;AAKjB,2EAA2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AC,OAAO,CAQb;CACH"}
@@ -0,0 +1,63 @@
1
+ import { EventDispatcher, Object3D, PerspectiveCamera } from 'three';
2
+ export interface SphereControlsConfig {
3
+ zoomEnable?: boolean;
4
+ minFov?: number;
5
+ maxFov?: number;
6
+ }
7
+ type Events = {
8
+ change: object;
9
+ start: object;
10
+ end: object;
11
+ };
12
+ /**
13
+ * Drag / wheel / keyboard orbit controller for looking around an equirectangular
14
+ * sphere, with inertia; its animations run on the viewer's shared tween group.
15
+ */
16
+ declare class SphereControls extends EventDispatcher<Events> {
17
+ config: SphereControlsConfig;
18
+ minFov: number;
19
+ maxFov: number;
20
+ defaultFov: number;
21
+ _autoRotate: boolean;
22
+ autoRotateSpeed: number;
23
+ sensibility: number;
24
+ camera: PerspectiveCamera;
25
+ sphere: Object3D;
26
+ _lat: number;
27
+ _lon: number;
28
+ isUserInteracting: boolean;
29
+ onMouseDownMouseX: number;
30
+ onMouseDownMouseY: number;
31
+ onMouseDownLon: number;
32
+ onMouseDownLat: number;
33
+ autoRotateTimestamp: number;
34
+ private isArrowKeyPressed;
35
+ private currentTween;
36
+ private velocityLon;
37
+ private velocityLat;
38
+ private lastMouseX;
39
+ private lastMouseY;
40
+ private lastUpdateTime;
41
+ private animationFrameId;
42
+ private element;
43
+ constructor(element: HTMLElement, camera: PerspectiveCamera, sphere: Object3D, config?: SphereControlsConfig);
44
+ /** Detach every listener. Call from the viewer's `destroy()`. */
45
+ dispose(): void;
46
+ get lat(): number;
47
+ set lat(lat: number);
48
+ get lon(): number;
49
+ set lon(lon: number);
50
+ get autoRotate(): boolean;
51
+ set autoRotate(autoRotate: boolean);
52
+ updateFov(fov: number): void;
53
+ retrieveLatLonFromCamera(): void;
54
+ onPointerStart: (event: TouchEvent | MouseEvent) => void;
55
+ onPointerMove: (event: TouchEvent | MouseEvent) => void;
56
+ onPointerUp: (event: TouchEvent | MouseEvent) => void;
57
+ onDocumentMouseWheel: (event: WheelEvent) => void;
58
+ private onKeyDown;
59
+ update(): void;
60
+ private updateVelocity;
61
+ }
62
+ export default SphereControls;
63
+ //# sourceMappingURL=SphereControls.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SphereControls.d.ts","sourceRoot":"","sources":["../../../src/controls/SphereControls.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,eAAe,EAEf,KAAK,QAAQ,EACb,KAAK,iBAAiB,EAEvB,MAAM,OAAO,CAAC;AAef,MAAM,WAAW,oBAAoB;IACnC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,KAAK,MAAM,GAAG;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC;AAE7D;;;GAGG;AACH,cAAM,cAAe,SAAQ,eAAe,CAAC,MAAM,CAAC;IAClD,MAAM,EAAE,oBAAoB,CAAC;IAE7B,MAAM,SAAM;IACZ,MAAM,SAAO;IACb,UAAU,SAAM;IAEhB,WAAW,UAAS;IACpB,eAAe,SAAQ;IAEvB,WAAW,SAAO;IAElB,MAAM,EAAE,iBAAiB,CAAC;IAC1B,MAAM,EAAE,QAAQ,CAAC;IAEjB,IAAI,SAAK;IACT,IAAI,SAAK;IAET,iBAAiB,UAAS;IAC1B,iBAAiB,SAAK;IACtB,iBAAiB,SAAK;IACtB,cAAc,SAAK;IACnB,cAAc,SAAK;IACnB,mBAAmB,SAAK;IAExB,OAAO,CAAC,iBAAiB,CAAS;IAClC,OAAO,CAAC,YAAY,CAAqC;IAGzD,OAAO,CAAC,WAAW,CAAK;IACxB,OAAO,CAAC,WAAW,CAAK;IACxB,OAAO,CAAC,UAAU,CAAK;IACvB,OAAO,CAAC,UAAU,CAAK;IACvB,OAAO,CAAC,cAAc,CAAK;IAC3B,OAAO,CAAC,gBAAgB,CAAuB;IAE/C,OAAO,CAAC,OAAO,CAAc;gBAG3B,OAAO,EAAE,WAAW,EACpB,MAAM,EAAE,iBAAiB,EACzB,MAAM,EAAE,QAAQ,EAChB,MAAM,GAAE,oBAAyB;IAwCnC,iEAAiE;IACjE,OAAO;IAgBP,IAAI,GAAG,WAEN;IAED,IAAI,GAAG,CAAC,GAAG,QAAA,EAGV;IAED,IAAI,GAAG,WAEN;IAED,IAAI,GAAG,CAAC,GAAG,QAAA,EAGV;IAED,IAAI,UAAU,YAEb;IAED,IAAI,UAAU,CAAC,UAAU,SAAA,EAQxB;IAED,SAAS,CAAC,GAAG,EAAE,MAAM;IAoBrB,wBAAwB;IAUxB,cAAc,GAAI,OAAO,UAAU,GAAG,UAAU,UA0B9C;IAEF,aAAa,GAAI,OAAO,UAAU,GAAG,UAAU,UA4B7C;IAEF,WAAW,GAAI,OAAO,UAAU,GAAG,UAAU,UAS3C;IAEF,oBAAoB,GAAI,OAAO,UAAU,UAMvC;IAEF,OAAO,CAAC,SAAS,CA0Bf;IAEF,MAAM;IA+CN,OAAO,CAAC,cAAc,CAqBpB;CACH;AAED,eAAe,cAAc,CAAC"}
@@ -0,0 +1,31 @@
1
+ import { Coordinates } from '@wemap/geo';
2
+ import { VisionGraph, VisionGeojsonGraph, ViewerNode } from '../types';
3
+ /**
4
+ * Map a raw {@link VisionGraph} to renderable {@link ViewerNode}s. Pure — no
5
+ * network, no config — so it is unit-testable.
6
+ */
7
+ export declare function graphToNodes(graph: VisionGraph, imageUrl: (filename: string) => string): ViewerNode[];
8
+ /**
9
+ * Fetches the 360° image graph and resolves image URLs from the Wemap VPS
10
+ * endpoint. The endpoint comes from `@wemap/core` (`CoreConfig.getViewerOptions`)
11
+ * unless one is passed explicitly (e.g. for tests or staging).
12
+ */
13
+ export declare class ViewerDataClient {
14
+ private endpoint;
15
+ constructor(endpoint?: string);
16
+ imageUrl(filename: string): string;
17
+ getGraph(): Promise<VisionGraph>;
18
+ getGraphGeojson(): Promise<VisionGeojsonGraph>;
19
+ getNodes(): Promise<ViewerNode[]>;
20
+ /**
21
+ * Geo position of what is under pixel (x, y) of a node's image, from the
22
+ * VPS depth estimate. Takes the node's level when the answer has none.
23
+ */
24
+ locate(node: ViewerNode, x: number, y: number): Promise<Coordinates>;
25
+ /**
26
+ * Distance in metres between what is under two pixels of a node's image,
27
+ * from the VPS depth estimate.
28
+ */
29
+ measure(node: ViewerNode, from: [number, number], to: [number, number]): Promise<number>;
30
+ }
31
+ //# sourceMappingURL=ViewerDataClient.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ViewerDataClient.d.ts","sourceRoot":"","sources":["../../../src/data/ViewerDataClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzC,OAAO,KAAK,EAAE,WAAW,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAU5E;;;GAGG;AACH,wBAAgB,YAAY,CAC1B,KAAK,EAAE,WAAW,EAClB,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,MAAM,GACrC,UAAU,EAAE,CAad;AAED;;;;GAIG;AACH,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,QAAQ,CAAS;gBAEb,QAAQ,CAAC,EAAE,MAAM;IAW7B,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM;IAIlC,QAAQ,IAAI,OAAO,CAAC,WAAW,CAAC;IAIhC,eAAe,IAAI,OAAO,CAAC,kBAAkB,CAAC;IAIxC,QAAQ,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC;IAKvC;;;OAGG;IACG,MAAM,CAAC,IAAI,EAAE,UAAU,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IAQ1E;;;OAGG;IACG,OAAO,CAAC,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,EAAE,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC;CAgB/F"}
@@ -0,0 +1,29 @@
1
+ import { Quaternion, Vector3 } from 'three';
2
+ import { Coordinates } from '@wemap/geo';
3
+ import { ViewerNode } from '../types';
4
+ /** Image `u` offset (turns) that aligns a node's image to north, given its capture heading. */
5
+ export declare function northOffset(captureHeading: number): number;
6
+ /**
7
+ * Image coordinates (u, v in 0..1) seen in `direction` for a node with this
8
+ * capture heading. TypeScript twin of the panorama shader's `equirect()`.
9
+ */
10
+ export declare function imageUv(direction: Vector3, captureHeading: number): [number, number];
11
+ /**
12
+ * Pixel (x right, y down from the top-left) of a node's equirectangular image
13
+ * seen in `direction`, for an image of `width` × `height` pixels.
14
+ */
15
+ export declare function imagePixel(direction: Vector3, captureHeading: number, width: number, height: number): [number, number];
16
+ /** Camera rotation that looks at a compass heading and pitch (degrees). */
17
+ export declare function lookRotation(heading: number, pitch?: number, out?: Quaternion): Quaternion;
18
+ /** Compass heading (degrees, 0..360) a camera rotation looks at. */
19
+ export declare function headingOf(rotation: Quaternion): number;
20
+ /** Position of `target` in the frame of a node at `origin`, at camera height (y = 0). */
21
+ export declare function toLocal(origin: Coordinates, target: Coordinates, out?: Vector3): Vector3;
22
+ /** Geo position of a point in the frame of a node at `origin` (height ignored). */
23
+ export declare function toGeo(origin: Coordinates, point: Vector3): Coordinates;
24
+ /**
25
+ * How far the camera travels when going from one node to the next, in the
26
+ * frame of `from`. Zero (just cross-fade) across levels or beyond 8 m.
27
+ */
28
+ export declare function hop(from: ViewerNode | null, to: ViewerNode): Vector3;
29
+ //# sourceMappingURL=SceneFrame.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SceneFrame.d.ts","sourceRoot":"","sources":["../../../src/frame/SceneFrame.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EAAa,UAAU,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACvD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAY3C,+FAA+F;AAC/F,wBAAgB,WAAW,CAAC,cAAc,EAAE,MAAM,GAAG,MAAM,CAE1D;AAED;;;GAGG;AACH,wBAAgB,OAAO,CAAC,SAAS,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAMpF;AAED;;;GAGG;AACH,wBAAgB,UAAU,CACxB,SAAS,EAAE,OAAO,EAClB,cAAc,EAAE,MAAM,EACtB,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,GACb,CAAC,MAAM,EAAE,MAAM,CAAC,CAGlB;AAED,2EAA2E;AAC3E,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,SAAI,EAAE,GAAG,aAAmB,GAAG,UAAU,CAI3F;AAED,oEAAoE;AACpE,wBAAgB,SAAS,CAAC,QAAQ,EAAE,UAAU,GAAG,MAAM,CAGtD;AAED,yFAAyF;AACzF,wBAAgB,OAAO,CAAC,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,WAAW,EAAE,GAAG,UAAgB,GAAG,OAAO,CAI9F;AAED,mFAAmF;AACnF,wBAAgB,KAAK,CAAC,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,OAAO,GAAG,WAAW,CAItE;AAED;;;GAGG;AACH,wBAAgB,GAAG,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI,EAAE,EAAE,EAAE,UAAU,GAAG,OAAO,CAMpE"}
@@ -0,0 +1,19 @@
1
+ import { Scene, Vector3 } from 'three';
2
+ /**
3
+ * The measurement drawn over the panorama: a red dot (white
4
+ * ring) on each clicked point and a red dashed line once there are two.
5
+ * Positions are view directions in the scene frame.
6
+ */
7
+ export declare class MeasureOverlay {
8
+ private readonly scene;
9
+ private readonly group;
10
+ constructor(scene: Scene);
11
+ /** Number of points placed (0, 1 or 2). */
12
+ get count(): number;
13
+ /** Place a point in `direction`; the second one also draws the line. */
14
+ add(direction: Vector3): void;
15
+ /** Remove every point and the line. */
16
+ clear(): void;
17
+ dispose(): void;
18
+ }
19
+ //# sourceMappingURL=MeasureOverlay.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MeasureOverlay.d.ts","sourceRoot":"","sources":["../../../src/graph/MeasureOverlay.ts"],"names":[],"mappings":"AAAA,OAAO,EAUL,KAAK,KAAK,EACV,KAAK,OAAO,EACb,MAAM,OAAO,CAAC;AAef;;;;GAIG;AACH,qBAAa,cAAc;IACzB,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAQ;IAC9B,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAe;gBAEzB,KAAK,EAAE,KAAK;IAKxB,2CAA2C;IAC3C,IAAI,KAAK,IAAI,MAAM,CAElB;IAED,wEAAwE;IACxE,GAAG,CAAC,SAAS,EAAE,OAAO,GAAG,IAAI;IA+B7B,uCAAuC;IACvC,KAAK,IAAI,IAAI;IAYb,OAAO,IAAI,IAAI;CAIhB"}
@@ -0,0 +1,57 @@
1
+ import { Vector3, PerspectiveCamera, Scene } from 'three';
2
+ import { Coordinates } from '@wemap/geo';
3
+ import { ViewerNode } from '../types';
4
+ /** What a click on the panorama does. */
5
+ export type ClickMode = 'navigate' | 'locate' | 'measure';
6
+ export interface PanoramaPointerCallbacks {
7
+ /** The node on screen, or null while none is (loading, mid-transition). */
8
+ current: () => ViewerNode | null;
9
+ /** Nearest other node on the same level as `to`, or null. */
10
+ nearest: (to: Coordinates) => ViewerNode | null;
11
+ /** `navigate` mode: the user clicked/tapped the floor near a node. */
12
+ select: (node: ViewerNode) => void;
13
+ /** `locate` / `measure` modes: the user clicked/tapped the panorama in this view direction. */
14
+ pick: (direction: Vector3) => void;
15
+ }
16
+ /**
17
+ * Pointer interaction on the panorama. A drag that looks around is never a click.
18
+ *
19
+ * - `navigate` (walking): hovering the floor shows a disc under the
20
+ * pointer and a cross on the nearest node; clicking walks there. Off when
21
+ * `walk` is false.
22
+ * - `locate` / `measure`: a crosshair cursor; clicking reports the view
23
+ * direction, to locate or measure what is under it.
24
+ *
25
+ * Positions are in the scene frame (see `frame/SceneFrame`), with the floor
26
+ * GROUND_OFFSET below the camera.
27
+ */
28
+ export declare class PanoramaPointer {
29
+ /** What a click does. */
30
+ mode: ClickMode;
31
+ private readonly scene;
32
+ private readonly camera;
33
+ private readonly element;
34
+ private readonly callbacks;
35
+ private readonly walk;
36
+ private readonly raycaster;
37
+ private readonly floor;
38
+ private readonly pointer;
39
+ private readonly hit;
40
+ private readonly disc;
41
+ private readonly cross;
42
+ private pressedAt;
43
+ private target;
44
+ constructor(scene: Scene, camera: PerspectiveCamera, element: HTMLElement, callbacks: PanoramaPointerCallbacks, walk?: boolean);
45
+ /** Hide both markers (e.g. right after navigating, or when the mode changes). */
46
+ hide(): void;
47
+ dispose(): void;
48
+ private readonly onPointerMove;
49
+ private readonly onPointerDown;
50
+ private readonly onPointerUp;
51
+ private readonly onPointerLeave;
52
+ /** Point the raycaster from the camera through the pointer. */
53
+ private aim;
54
+ /** Refresh the hover feedback: floor disc, cross and target, or the locate cursor. */
55
+ private update;
56
+ }
57
+ //# sourceMappingURL=PanoramaPointer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PanoramaPointer.d.ts","sourceRoot":"","sources":["../../../src/graph/PanoramaPointer.ts"],"names":[],"mappings":"AAAA,OAAO,EAWL,OAAO,EACP,KAAK,iBAAiB,EACtB,KAAK,KAAK,EACX,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AA8B3C,yCAAyC;AACzC,MAAM,MAAM,SAAS,GAAG,UAAU,GAAG,QAAQ,GAAG,SAAS,CAAC;AAE1D,MAAM,WAAW,wBAAwB;IACvC,2EAA2E;IAC3E,OAAO,EAAE,MAAM,UAAU,GAAG,IAAI,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C,QAAQ,CAAC,cAAc,CAE7B;IAEF,+DAA+D;IAC/D,OAAO,CAAC,GAAG;IASX,sFAAsF;IACtF,OAAO,CAAC,MAAM;CAoCf"}
@@ -0,0 +1,50 @@
1
+ import { ShaderMaterial, Vector3, Texture } from 'three';
2
+ import { ViewerNode } from '../types';
3
+ /** Loads a node's panorama image as a texture. */
4
+ export type ImageLoader = (url: string) => Promise<Texture>;
5
+ /**
6
+ * Moves the panorama from the node on screen to another: waits for the new
7
+ * image, then fades it in while the camera travels between the two capture
8
+ * points (a plain fade across levels or long hops, a fade from black for the
9
+ * first image). Owns the panorama material and every texture it shows.
10
+ *
11
+ * Driven by the render loop: call {@link update} every frame with the current
12
+ * time and place the camera at the offset it returns.
13
+ */
14
+ export declare class PanoramaTransition {
15
+ /** The panorama material, for the viewer's inside-out sphere. */
16
+ readonly material: ShaderMaterial;
17
+ private shownNode;
18
+ private pending;
19
+ private fade;
20
+ private disposed;
21
+ private readonly cameraOffset;
22
+ private readonly loadImage;
23
+ constructor(loadImage?: ImageLoader);
24
+ /** The node whose image is fully on screen: where the next transition starts from. */
25
+ get shown(): ViewerNode | null;
26
+ /** Pixel size of the shown node's image, or null before the first one is on screen. */
27
+ get shownImageSize(): {
28
+ width: number;
29
+ height: number;
30
+ } | null;
31
+ /** True while a requested node is loading or fading in. */
32
+ get busy(): boolean;
33
+ /**
34
+ * Go to a node. Resolves true once its image has loaded and the transition has
35
+ * started; false if a later {@link show} (or {@link dispose}) overtook it.
36
+ * Rejects if the image fails to load; the shown node then stays on screen.
37
+ * A transition still running when the new image arrives jumps to its end.
38
+ */
39
+ show(node: ViewerNode): Promise<boolean>;
40
+ /**
41
+ * Advance to `now` (ms, any monotonic clock). Returns where the camera sits,
42
+ * in the frame of the shown node: zero at rest.
43
+ */
44
+ update(now: number): Vector3;
45
+ /** Free the material and every texture, including images still loading. */
46
+ dispose(): void;
47
+ /** End the running fade: the incoming image becomes the shown one. */
48
+ private settle;
49
+ }
50
+ //# sourceMappingURL=PanoramaTransition.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PanoramaTransition.d.ts","sourceRoot":"","sources":["../../../src/transition/PanoramaTransition.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,cAAc,EAEd,OAAO,EACP,KAAK,OAAO,EACb,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAQ3C,kDAAkD;AAClD,MAAM,MAAM,WAAW,GAAG,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;AA8E5D;;;;;;;;GAQG;AACH,qBAAa,kBAAkB;IAC7B,iEAAiE;IACjE,QAAQ,CAAC,QAAQ,iBAAoB;IAErC,OAAO,CAAC,SAAS,CAA2B;IAC5C,OAAO,CAAC,OAAO,CAA2B;IAC1C,OAAO,CAAC,IAAI,CAAqB;IACjC,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAiB;IAC9C,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAc;gBAE5B,SAAS,GAAE,WAA2B;IAIlD,sFAAsF;IACtF,IAAI,KAAK,IAAI,UAAU,GAAG,IAAI,CAE7B;IAED,uFAAuF;IACvF,IAAI,cAAc,IAAI;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAK7D;IAED,2DAA2D;IAC3D,IAAI,IAAI,IAAI,OAAO,CAElB;IAED;;;;;OAKG;IACG,IAAI,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,OAAO,CAAC;IA2C9C;;;OAGG;IACH,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAgB5B,2EAA2E;IAC3E,OAAO,IAAI,IAAI;IAYf,sEAAsE;IACtE,OAAO,CAAC,MAAM;CAef"}
@@ -0,0 +1,11 @@
1
+ import { Group } from '@tweenjs/tween.js';
2
+ /**
3
+ * Shared tween group for the viewer: a tween.js Group that the render loop
4
+ * ticks each frame via {@link WemapViewer}.
5
+ *
6
+ * `SphereControls` and `WemapViewer.lookAt` add their tweens here; whoever
7
+ * added them removes them on complete. (The panorama transition runs on the
8
+ * render loop's clock instead.)
9
+ */
10
+ export declare const tweenGroup: Group;
11
+ //# sourceMappingURL=tweens.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tweens.d.ts","sourceRoot":"","sources":["../../src/tweens.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE1C;;;;;;;GAOG;AACH,eAAO,MAAM,UAAU,OAAc,CAAC"}
@@ -0,0 +1,116 @@
1
+ import { Coordinates } from '@wemap/geo';
2
+ /**
3
+ * A single node in the 360° image graph: one panorama image at a geo position,
4
+ * with the edges (transitions) to neighbouring nodes.
5
+ */
6
+ export interface ViewerNode {
7
+ /** Keyframe id — unique within the graph. */
8
+ id: number;
9
+ /** Geo position of the capture point. */
10
+ coordinates: Coordinates;
11
+ /** Indoor level (0 = ground). */
12
+ level: number;
13
+ /** Absolute URL of the equirectangular image. */
14
+ image: string;
15
+ /** Capture heading in degrees, used to align the panorama to north. */
16
+ heading: number;
17
+ }
18
+ /**
19
+ * Behaviour options for a {@link WemapViewer}. Identity (emmid), auth and the
20
+ * VPS endpoint are NOT here — they come from `@wemap/core` (`core.init()`).
21
+ */
22
+ export interface ViewerOptions {
23
+ /** Enable mouse-wheel zoom. Defaults to true. */
24
+ zoom?: boolean;
25
+ /**
26
+ * In-panorama navigation: hovering the floor shows a disc and a
27
+ * cross on the nearest node; clicking walks there. Defaults to true.
28
+ */
29
+ navigation?: boolean;
30
+ /**
31
+ * Fired as soon as a move to a node starts (programmatically or by click), and
32
+ * again with the node still on screen if the new image fails to load.
33
+ */
34
+ onNavigate?: (nodeId: number) => void;
35
+ /** Fired when look heading changes (degrees), e.g. to sync a compass. */
36
+ onHeadingChange?: (heading: number) => void;
37
+ /** Fired once, when the first image is on screen. */
38
+ onReady?: () => void;
39
+ /** Fired with the position under a click, in `locate` click mode. */
40
+ onLocate?: (point: LocatedPoint) => void;
41
+ /** Fired with the distance between two clicks, in `measure` click mode. */
42
+ onMeasure?: (measurement: Measurement) => void;
43
+ /** Fired when the graph, an image, a located point or a measurement fails to load. */
44
+ onError?: (error: Error) => void;
45
+ }
46
+ /** The distance between two clicked points in `measure` mode, from the VPS depth estimate. */
47
+ export interface Measurement {
48
+ /** Distance in metres. */
49
+ distance: number;
50
+ /** The node whose image was clicked. */
51
+ node: ViewerNode;
52
+ }
53
+ /** What is under a click in `locate` mode, from the VPS depth estimate. */
54
+ export interface LocatedPoint {
55
+ /** Geo position, with altitude and level (the node's when the VPS gives none). */
56
+ coordinates: Coordinates;
57
+ /** The node whose image was clicked. */
58
+ node: ViewerNode;
59
+ }
60
+ /** Where {@link WemapViewer.open} makes the user look, in degrees. */
61
+ export interface OpenOptions {
62
+ /** Look heading, 0 = north, 90 = east. Omit to keep the current look direction. */
63
+ heading?: number;
64
+ /** Look pitch, positive up. Defaults to 0 when `heading` is given. */
65
+ pitch?: number;
66
+ }
67
+ export interface VisionGraph {
68
+ images: Array<{
69
+ filename: string;
70
+ id: number;
71
+ coords: {
72
+ lat: number;
73
+ lng: number;
74
+ level: number;
75
+ alt?: number | null;
76
+ };
77
+ heading: number;
78
+ }>;
79
+ edges: Array<{
80
+ keyframeId1: number;
81
+ keyframeId2: number;
82
+ weight: number;
83
+ level: number | number[];
84
+ }>;
85
+ }
86
+ export interface GraphPoint {
87
+ type: 'Feature';
88
+ id: number;
89
+ properties: {
90
+ id: number;
91
+ level: number;
92
+ heading: number;
93
+ };
94
+ geometry: {
95
+ type: 'Point';
96
+ coordinates: [number, number];
97
+ };
98
+ }
99
+ export interface GraphLine {
100
+ type: 'Feature';
101
+ properties: {
102
+ keyframeId1: number;
103
+ keyframeId2: number;
104
+ weight: number;
105
+ level: number | [number, number];
106
+ };
107
+ geometry: {
108
+ type: 'LineString';
109
+ coordinates: [[number, number], [number, number]];
110
+ };
111
+ }
112
+ export interface VisionGeojsonGraph {
113
+ type: 'FeatureCollection';
114
+ features: Array<GraphLine | GraphPoint>;
115
+ }
116
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE9C;;;GAGG;AACH,MAAM,WAAW,UAAU;IACzB,6CAA6C;IAC7C,EAAE,EAAE,MAAM,CAAC;IACX,yCAAyC;IACzC,WAAW,EAAE,WAAW,CAAC;IACzB,iCAAiC;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,iDAAiD;IACjD,KAAK,EAAE,MAAM,CAAC;IACd,uEAAuE;IACvE,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC5B,iDAAiD;IACjD,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;OAGG;IACH,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,yEAAyE;IACzE,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C,qDAAqD;IACrD,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,qEAAqE;IACrE,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,IAAI,CAAC;IACzC,2EAA2E;IAC3E,SAAS,CAAC,EAAE,CAAC,WAAW,EAAE,WAAW,KAAK,IAAI,CAAC;IAC/C,sFAAsF;IACtF,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;CAClC;AAED,8FAA8F;AAC9F,MAAM,WAAW,WAAW;IAC1B,0BAA0B;IAC1B,QA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AAI,EAAE,SAAS,CAAC;IAChB,UAAU,EAAE;QACV,WAAW,EAAE,MAAM,CAAC;QACpB,WAAW,EAAE,MAAM,CAAC;QACpB,MAAM,EAAE,MAAM,CAAC;QACf,KAAK,EAAE,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;KAClC,CAAC;IACF,QAAQ,EAAE;QAAE,IAAI,EAAE,YAAY,CAAC;QAAC,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;KAAE,CAAC;CACrF;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,mBAAmB,CAAC;IAC1B,QAAQ,EAAE,KAAK,CAAC,SAAS,GAAG,UAAU,CAAC,CAAC;CACzC"}
package/dist/style.css ADDED
@@ -0,0 +1,2 @@
1
+ .wemap-viewer__canvas{touch-action:none;-webkit-user-select:none;user-select:none;cursor:grab;width:100%;height:100%;display:block}.wemap-viewer__canvas:active{cursor:grabbing}.wemap-viewer__canvas:focus:not(:focus-visible){outline:none}
2
+ /*$vite$:1*/
package/package.json CHANGED
@@ -1,6 +1,53 @@
1
1
  {
2
2
  "name": "@wemap/viewer",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "14.8.0-beta.3",
4
+ "description": "Framework-agnostic 360° panorama viewer for Wemap livemaps, with image-graph navigation.",
5
+ "license": "UNLICENSED",
6
+ "author": "Wemap SAS",
7
+ "homepage": "https://github.com/wemap/wemap-sdk-js#readme",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/wemap/wemap-sdk-js.git",
11
+ "directory": "packages/viewer"
12
+ },
13
+ "bugs": {
14
+ "url": "https://github.com/wemap/wemap-sdk-js/issues"
15
+ },
16
+ "keywords": [
17
+ "wemap",
18
+ "sdk",
19
+ "viewer",
20
+ "360",
21
+ "panorama",
22
+ "three"
23
+ ],
24
+ "type": "module",
25
+ "private": false,
26
+ "publishConfig": {
27
+ "access": "public"
28
+ },
29
+ "main": "./dist/index.js",
30
+ "types": "./dist/index.d.ts",
31
+ "exports": {
32
+ ".": {
33
+ "import": "./dist/index.js",
34
+ "types": "./dist/index.d.ts"
35
+ },
36
+ "./style.css": "./dist/style.css"
37
+ },
38
+ "sideEffects": [
39
+ "**/*.css"
40
+ ],
41
+ "files": [
42
+ "dist"
43
+ ],
44
+ "dependencies": {
45
+ "@tweenjs/tween.js": "^18.6.4",
46
+ "@wemap/core": "14.8.0-beta.3",
47
+ "@wemap/geo": "14.8.0-beta.3",
48
+ "three": "^0.159.0"
49
+ },
50
+ "devDependencies": {
51
+ "@types/three": "^0.159.0"
52
+ }
53
+ }