@ericchen1990/pano-view 3.7.0 → 3.9.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.
- package/README.md +675 -71
- package/README.zh-CN.md +558 -42
- package/dist/data.cjs +239 -7
- package/dist/data.cjs.map +1 -1
- package/dist/data.d.mts +120 -2
- package/dist/data.d.ts +120 -2
- package/dist/data.mjs +239 -7
- package/dist/data.mjs.map +1 -1
- package/dist/index.cjs +2385 -310
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +335 -2
- package/dist/index.d.ts +335 -2
- package/dist/index.mjs +2393 -306
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +399 -1
- package/dist/ui.cjs +1 -1
- package/dist/ui.cjs.map +1 -1
- package/dist/ui.mjs +1 -1
- package/dist/ui.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1118,7 +1118,7 @@ declare function Scenes({ maxTextureMemoryMb, maxConcurrentTileLoads, activeScen
|
|
|
1118
1118
|
|
|
1119
1119
|
type AssetUrlContext = {
|
|
1120
1120
|
defaultUrl: string;
|
|
1121
|
-
kind: "tile" | "preview" | "hotspot";
|
|
1121
|
+
kind: "tile" | "preview" | "hotspot" | "map";
|
|
1122
1122
|
sceneId: string;
|
|
1123
1123
|
hotspotId?: string;
|
|
1124
1124
|
};
|
|
@@ -1415,6 +1415,122 @@ type ProjectHotspotDefinition = HotspotDefinition & {
|
|
|
1415
1415
|
};
|
|
1416
1416
|
declare function resolveHotspotAssets(hotspot: ProjectHotspotDefinition, baseUrl: string, sceneId: string, resolver?: AssetUrlResolver): ProjectHotspotDefinition;
|
|
1417
1417
|
|
|
1418
|
+
/**
|
|
1419
|
+
* Shared drag inertia and edge bounce for map pan and scene-menu scrolling.
|
|
1420
|
+
* Axis motion is pure; hosts own pointer capture and rAF loops.
|
|
1421
|
+
*/
|
|
1422
|
+
type PanoDragMotion = {
|
|
1423
|
+
/** Continue sliding after release from pointer velocity. Defaults to true. */
|
|
1424
|
+
inertia?: boolean;
|
|
1425
|
+
/** Rubber-band past edges while dragging; spring back on release. Defaults to true. */
|
|
1426
|
+
bounce?: boolean;
|
|
1427
|
+
};
|
|
1428
|
+
|
|
1429
|
+
type PanoMapCorner = "top-left" | "top-right" | "bottom-left" | "bottom-right";
|
|
1430
|
+
type PanoMapGradientStop = {
|
|
1431
|
+
offset: number;
|
|
1432
|
+
color: string;
|
|
1433
|
+
opacity?: number;
|
|
1434
|
+
};
|
|
1435
|
+
type PanoMapSectorGradient = {
|
|
1436
|
+
type: "radial" | "linear";
|
|
1437
|
+
stops: PanoMapGradientStop[];
|
|
1438
|
+
};
|
|
1439
|
+
type PanoMapSectorDefinition = {
|
|
1440
|
+
/** Sector opening angle in degrees. */
|
|
1441
|
+
angle: number;
|
|
1442
|
+
/** Sector radius in CSS pixels; does not scale with the floor image. */
|
|
1443
|
+
radius: number;
|
|
1444
|
+
/** When true, sector angle follows the current horizontal FOV. */
|
|
1445
|
+
followFov?: boolean;
|
|
1446
|
+
/** Solid fill color when `gradient` is omitted. */
|
|
1447
|
+
color?: string;
|
|
1448
|
+
/**
|
|
1449
|
+
* Overall fill opacity in [0, 1].
|
|
1450
|
+
* Applies in both solid and gradient modes; gradient stop opacities only
|
|
1451
|
+
* describe the relative fade shape and are normalized against this value.
|
|
1452
|
+
*/
|
|
1453
|
+
opacity?: number;
|
|
1454
|
+
/** Optional sector outline color. */
|
|
1455
|
+
strokeColor?: string;
|
|
1456
|
+
/** Outline width in CSS pixels. */
|
|
1457
|
+
strokeWidth?: number;
|
|
1458
|
+
/** Outline opacity in [0, 1]. Defaults to 1 when stroke is set. */
|
|
1459
|
+
strokeOpacity?: number;
|
|
1460
|
+
/**
|
|
1461
|
+
* Optional fill gradient. When omitted, the sector uses a solid `color`.
|
|
1462
|
+
* Stop colors are independent of `color` unless the author keeps them in sync.
|
|
1463
|
+
*/
|
|
1464
|
+
gradient?: PanoMapSectorGradient;
|
|
1465
|
+
};
|
|
1466
|
+
type PanoMapSpotDefinition = {
|
|
1467
|
+
id: string;
|
|
1468
|
+
sceneId: string;
|
|
1469
|
+
/** Normalized image X in [0, 1], origin at the top-left. */
|
|
1470
|
+
x: number;
|
|
1471
|
+
/** Normalized image Y in [0, 1], origin at the top-left. */
|
|
1472
|
+
y: number;
|
|
1473
|
+
/**
|
|
1474
|
+
* Clockwise degrees from image up when viewer yaw is 0.
|
|
1475
|
+
* Runtime sector rotation is `heading + yaw`.
|
|
1476
|
+
*/
|
|
1477
|
+
heading: number;
|
|
1478
|
+
icon?: string;
|
|
1479
|
+
};
|
|
1480
|
+
type PanoMapControlsDefinition = {
|
|
1481
|
+
/** Show expand/collapse on a docked panel. */
|
|
1482
|
+
collapse?: boolean;
|
|
1483
|
+
/** Show zoom-in and zoom-out buttons. */
|
|
1484
|
+
zoom?: boolean;
|
|
1485
|
+
};
|
|
1486
|
+
type PanoMapDockedPresentation = {
|
|
1487
|
+
mode: "docked";
|
|
1488
|
+
corner?: PanoMapCorner;
|
|
1489
|
+
width?: number;
|
|
1490
|
+
height?: number;
|
|
1491
|
+
offsetX?: number;
|
|
1492
|
+
offsetY?: number;
|
|
1493
|
+
};
|
|
1494
|
+
type PanoMapDialogPresentation = {
|
|
1495
|
+
mode: "dialog";
|
|
1496
|
+
corner?: PanoMapCorner;
|
|
1497
|
+
offsetX?: number;
|
|
1498
|
+
offsetY?: number;
|
|
1499
|
+
width?: number;
|
|
1500
|
+
height?: number;
|
|
1501
|
+
};
|
|
1502
|
+
type PanoMapPresentation = PanoMapDockedPresentation | PanoMapDialogPresentation;
|
|
1503
|
+
type PanoMapDefinition = {
|
|
1504
|
+
image: string;
|
|
1505
|
+
/**
|
|
1506
|
+
* Pointer interaction with the floor image.
|
|
1507
|
+
* - `fixed`: fit-only; no wheel/pan zoom (zoom buttons are also suppressed).
|
|
1508
|
+
* - `zoom`: wheel/pan zoom and optional zoom buttons.
|
|
1509
|
+
*/
|
|
1510
|
+
interaction?: "fixed" | "zoom";
|
|
1511
|
+
presentation?: PanoMapPresentation;
|
|
1512
|
+
controls?: PanoMapControlsDefinition;
|
|
1513
|
+
/** Spot icon edge length in CSS pixels. */
|
|
1514
|
+
iconSize?: number;
|
|
1515
|
+
/**
|
|
1516
|
+
* Maximum zoom multiplier relative to the contain-fit scale.
|
|
1517
|
+
* Only applies when `interaction` is `"zoom"`. Defaults to 8.
|
|
1518
|
+
*/
|
|
1519
|
+
maxScale?: number;
|
|
1520
|
+
/**
|
|
1521
|
+
* Pan inertia and edge bounce when `interaction` is `"zoom"`.
|
|
1522
|
+
* Omit for both on; set `false` or flag fields to disable.
|
|
1523
|
+
*/
|
|
1524
|
+
dragMotion?: PanoDragMotion | false;
|
|
1525
|
+
spots: PanoMapSpotDefinition[];
|
|
1526
|
+
sector?: PanoMapSectorDefinition;
|
|
1527
|
+
};
|
|
1528
|
+
/** Parse an optional project floor plan. Scene IDs must already be collected. */
|
|
1529
|
+
declare function parsePanoMap(value: unknown, sceneIds: Set<string>, options?: {
|
|
1530
|
+
draft?: boolean;
|
|
1531
|
+
}): PanoMapDefinition | undefined;
|
|
1532
|
+
declare function resolvePanoMapAssets(map: PanoMapDefinition, baseUrl: string, resolveAssetUrl?: AssetUrlResolver): PanoMapDefinition;
|
|
1533
|
+
|
|
1418
1534
|
type PanoProjectSceneDefinition = {
|
|
1419
1535
|
id: string;
|
|
1420
1536
|
title?: string;
|
|
@@ -1437,6 +1553,7 @@ type PanoProjectDefinition = {
|
|
|
1437
1553
|
initialSceneId?: string;
|
|
1438
1554
|
scenes: PanoProjectSceneDefinition[];
|
|
1439
1555
|
popups?: ProjectPopupDefinition[];
|
|
1556
|
+
map?: PanoMapDefinition;
|
|
1440
1557
|
};
|
|
1441
1558
|
type LoadedProjectScene = {
|
|
1442
1559
|
scene: TileScene | SphereTileScene;
|
|
@@ -1449,6 +1566,7 @@ type LoadedPanoProject = {
|
|
|
1449
1566
|
initialSceneId: string;
|
|
1450
1567
|
scenes: LoadedProjectScene[];
|
|
1451
1568
|
popups?: ProjectPopupDefinition[];
|
|
1569
|
+
map?: PanoMapDefinition;
|
|
1452
1570
|
};
|
|
1453
1571
|
type LoadPanoProjectOptions = JsonRequestOptions & {
|
|
1454
1572
|
/** Directory used for project-relative references. Required for object input. */
|
|
@@ -1691,6 +1809,93 @@ declare const WEBVR_PROFILES: Record<WebVRProfileId, WebVRProfile>;
|
|
|
1691
1809
|
|
|
1692
1810
|
declare const DEFAULT_WEBVR_CURSOR_DWELL_MS = 1500;
|
|
1693
1811
|
|
|
1812
|
+
type PanoSceneMenuItem = {
|
|
1813
|
+
id: string;
|
|
1814
|
+
thumbnailUrl: string;
|
|
1815
|
+
title?: string;
|
|
1816
|
+
};
|
|
1817
|
+
type PanoSceneMenuPlacement = "top" | "bottom" | "left" | "right";
|
|
1818
|
+
/** Cross-axis alignment along the dock edge. Defaults to `"center"`. */
|
|
1819
|
+
type PanoSceneMenuAlign = "start" | "center" | "end";
|
|
1820
|
+
type PanoSceneMenuInset = number | string | {
|
|
1821
|
+
top?: number | string;
|
|
1822
|
+
right?: number | string;
|
|
1823
|
+
bottom?: number | string;
|
|
1824
|
+
left?: number | string;
|
|
1825
|
+
};
|
|
1826
|
+
type PanoSceneMenuLabelAlign = "start" | "center" | "end";
|
|
1827
|
+
type PanoSceneMenuAppearance = {
|
|
1828
|
+
background?: string;
|
|
1829
|
+
padding?: number | string;
|
|
1830
|
+
itemWidth?: number;
|
|
1831
|
+
itemHeight?: number;
|
|
1832
|
+
gap?: number | string;
|
|
1833
|
+
borderRadius?: number | string;
|
|
1834
|
+
selectionColor?: string;
|
|
1835
|
+
selectionWidth?: number;
|
|
1836
|
+
labelBackground?: string;
|
|
1837
|
+
labelColor?: string;
|
|
1838
|
+
/** Scene title alignment on the thumbnail. Defaults to `"start"`. */
|
|
1839
|
+
labelAlign?: PanoSceneMenuLabelAlign;
|
|
1840
|
+
fontSize?: number | string;
|
|
1841
|
+
controlColor?: string;
|
|
1842
|
+
controlBackground?: string;
|
|
1843
|
+
};
|
|
1844
|
+
type PanoSceneMenuProps = {
|
|
1845
|
+
items: readonly PanoSceneMenuItem[];
|
|
1846
|
+
activeId?: string | null;
|
|
1847
|
+
onSelect?: (id: string) => void;
|
|
1848
|
+
/** Dock edge inside the viewer overlay. Defaults to `"bottom"`. */
|
|
1849
|
+
placement?: PanoSceneMenuPlacement;
|
|
1850
|
+
/**
|
|
1851
|
+
* Align the menu along the dock edge when its main-axis size is smaller than
|
|
1852
|
+
* the available space. Also aligns short lists inside the strip. Defaults to
|
|
1853
|
+
* `"center"`.
|
|
1854
|
+
*/
|
|
1855
|
+
align?: PanoSceneMenuAlign;
|
|
1856
|
+
/**
|
|
1857
|
+
* Gap from the viewer edges. A single value applies to every side;
|
|
1858
|
+
* an object sets each side. Numbers are pixels. Defaults to `12`.
|
|
1859
|
+
*/
|
|
1860
|
+
inset?: PanoSceneMenuInset;
|
|
1861
|
+
/** Menu width. Numbers are pixels; strings may be `%`, `rem`, etc. */
|
|
1862
|
+
width?: number | string;
|
|
1863
|
+
/** Menu height. Numbers are pixels; strings may be `%`, `rem`, etc. */
|
|
1864
|
+
height?: number | string;
|
|
1865
|
+
/**
|
|
1866
|
+
* When `false` (default), the menu stays expanded.
|
|
1867
|
+
* When `true`, a toggle shows or hides the scene list.
|
|
1868
|
+
*/
|
|
1869
|
+
collapsible?: boolean;
|
|
1870
|
+
/** Uncontrolled expanded state when `collapsible` is true. Defaults to `true`. */
|
|
1871
|
+
defaultExpanded?: boolean;
|
|
1872
|
+
/** Controlled expanded state when `collapsible` is true. */
|
|
1873
|
+
expanded?: boolean;
|
|
1874
|
+
onExpandedChange?: (expanded: boolean) => void;
|
|
1875
|
+
/** Show previous/next controls at both ends of the list. Defaults to `false`. */
|
|
1876
|
+
showArrows?: boolean;
|
|
1877
|
+
/**
|
|
1878
|
+
* When `true`, previous/next arrows and arrow keys wrap from the last item
|
|
1879
|
+
* to the first and vice versa. Defaults to `false` (stop at the ends).
|
|
1880
|
+
*/
|
|
1881
|
+
loop?: boolean;
|
|
1882
|
+
/**
|
|
1883
|
+
* Scroll drag inertia and edge bounce.
|
|
1884
|
+
* Omit for both on (custom pointer scrolling). Set `false` for native overflow scroll.
|
|
1885
|
+
*/
|
|
1886
|
+
dragMotion?: PanoDragMotion | false;
|
|
1887
|
+
appearance?: PanoSceneMenuAppearance;
|
|
1888
|
+
className?: string;
|
|
1889
|
+
style?: CSSProperties;
|
|
1890
|
+
label?: string;
|
|
1891
|
+
previousLabel?: string;
|
|
1892
|
+
nextLabel?: string;
|
|
1893
|
+
expandLabel?: string;
|
|
1894
|
+
collapseLabel?: string;
|
|
1895
|
+
};
|
|
1896
|
+
declare const DEFAULT_PANO_SCENE_MENU_APPEARANCE: Required<PanoSceneMenuAppearance>;
|
|
1897
|
+
declare function PanoSceneMenu({ items, activeId, onSelect, placement, align, inset, width, height, collapsible, defaultExpanded, expanded: expandedProp, onExpandedChange, showArrows, loop, dragMotion: dragMotionProp, appearance, className, style, label, previousLabel, nextLabel, expandLabel, collapseLabel, }: PanoSceneMenuProps): react.JSX.Element;
|
|
1898
|
+
|
|
1694
1899
|
type ViewInteractionSource = "mouse" | "touch" | "keyboard";
|
|
1695
1900
|
type PanoWheelEvent = {
|
|
1696
1901
|
/** Signed wheel delta (same sign convention as WheelEvent.deltaY). */
|
|
@@ -2037,4 +2242,132 @@ declare function vector3ToPanoPosition(vector: Pick<Vector3, "x" | "y" | "z">):
|
|
|
2037
2242
|
declare const DEFAULT_HOTSPOT_TOOLTIP_OFFSET = 12;
|
|
2038
2243
|
declare const DEFAULT_HOTSPOT_TOOLTIP_APPEARANCE: Required<HotspotTooltipAppearance>;
|
|
2039
2244
|
|
|
2040
|
-
|
|
2245
|
+
type PanoMapEditChange = {
|
|
2246
|
+
spots?: PanoMapSpotDefinition[];
|
|
2247
|
+
selectedSpotId?: string | null;
|
|
2248
|
+
};
|
|
2249
|
+
type PanoMapProps = {
|
|
2250
|
+
map: PanoMapDefinition;
|
|
2251
|
+
activeSceneId?: string | null;
|
|
2252
|
+
onSelectScene?: (sceneId: string, spot: PanoMapSpotDefinition) => void;
|
|
2253
|
+
/** Controlled viewer state. When omitted, subscribe to the viewer event bus. */
|
|
2254
|
+
view?: PanoViewerState;
|
|
2255
|
+
mode?: "view" | "edit";
|
|
2256
|
+
selectedSpotId?: string | null;
|
|
2257
|
+
onSelectedSpotIdChange?: (spotId: string | null) => void;
|
|
2258
|
+
onEditChange?: (change: PanoMapEditChange) => void;
|
|
2259
|
+
/** Scene chosen before clicking the map to place a new spot. */
|
|
2260
|
+
placementSceneId?: string | null;
|
|
2261
|
+
className?: string;
|
|
2262
|
+
style?: CSSProperties;
|
|
2263
|
+
/** Override control visibility from the map document. */
|
|
2264
|
+
showZoomControls?: boolean;
|
|
2265
|
+
showCollapseControl?: boolean;
|
|
2266
|
+
collapsed?: boolean;
|
|
2267
|
+
onCollapsedChange?: (collapsed: boolean) => void;
|
|
2268
|
+
/** Extra chrome rendered above the map surface. */
|
|
2269
|
+
renderChrome?: (controls: ReactNode) => ReactNode;
|
|
2270
|
+
/**
|
|
2271
|
+
* Opening zoom relative to the contain-fit scale.
|
|
2272
|
+
* Clamped to `[1, maxScale]`. Applies after the image is measured and recenters.
|
|
2273
|
+
* Resets only when this value or interaction mode changes.
|
|
2274
|
+
*/
|
|
2275
|
+
initialScale?: number;
|
|
2276
|
+
};
|
|
2277
|
+
/**
|
|
2278
|
+
* Floor-plan map surface. Fills its parent; hosts decide docked vs dialog chrome.
|
|
2279
|
+
* Icons and sectors keep CSS-pixel size while the background image zooms.
|
|
2280
|
+
*/
|
|
2281
|
+
declare function PanoMap({ map, activeSceneId, onSelectScene, view: controlledView, mode, selectedSpotId, onSelectedSpotIdChange, onEditChange, placementSceneId, className, style, showZoomControls, showCollapseControl, collapsed: controlledCollapsed, onCollapsedChange, renderChrome, initialScale, }: PanoMapProps): react.JSX.Element;
|
|
2282
|
+
|
|
2283
|
+
type PanoMapOverlayProps = {
|
|
2284
|
+
map: PanoMapDefinition;
|
|
2285
|
+
activeSceneId?: string | null;
|
|
2286
|
+
onSelectScene?: (sceneId: string, spot: PanoMapSpotDefinition) => void;
|
|
2287
|
+
view?: PanoViewerState;
|
|
2288
|
+
mode?: PanoMapProps["mode"];
|
|
2289
|
+
selectedSpotId?: string | null;
|
|
2290
|
+
onSelectedSpotIdChange?: (spotId: string | null) => void;
|
|
2291
|
+
onEditChange?: (change: PanoMapEditChange) => void;
|
|
2292
|
+
placementSceneId?: string | null;
|
|
2293
|
+
/** Force presentation while authoring, ignoring document presentation temporarily. */
|
|
2294
|
+
presentationOverride?: PanoMapDefinition["presentation"];
|
|
2295
|
+
/** Override presentation mode for this mount. */
|
|
2296
|
+
presentation?: "docked" | "dialog";
|
|
2297
|
+
/** Override docked corner (or dialog launcher corner). */
|
|
2298
|
+
corner?: PanoMapCorner;
|
|
2299
|
+
/** Override docked panel or dialog-launcher width in CSS pixels. */
|
|
2300
|
+
width?: number;
|
|
2301
|
+
/** Override docked panel or dialog-launcher height in CSS pixels. */
|
|
2302
|
+
height?: number;
|
|
2303
|
+
/** Horizontal inset from the chosen corner in CSS pixels. */
|
|
2304
|
+
offsetX?: number;
|
|
2305
|
+
/** Vertical inset from the chosen corner in CSS pixels. */
|
|
2306
|
+
offsetY?: number;
|
|
2307
|
+
/** Preferred dialog body width in CSS pixels; clamped to the viewer. */
|
|
2308
|
+
dialogWidth?: number;
|
|
2309
|
+
/** Preferred dialog body height in CSS pixels; clamped to the viewer. */
|
|
2310
|
+
dialogHeight?: number;
|
|
2311
|
+
/** Override map interaction for this mount. */
|
|
2312
|
+
interaction?: PanoMapDefinition["interaction"];
|
|
2313
|
+
/**
|
|
2314
|
+
* Maximum zoom multiplier relative to the contain-fit scale.
|
|
2315
|
+
* Values below 1 are treated as 1.
|
|
2316
|
+
*/
|
|
2317
|
+
maxScale?: number;
|
|
2318
|
+
/**
|
|
2319
|
+
* Opening zoom relative to the contain-fit scale.
|
|
2320
|
+
* Clamped to `[1, maxScale]`. View state only; not written to the map document.
|
|
2321
|
+
*/
|
|
2322
|
+
initialScale?: number;
|
|
2323
|
+
showZoomControls?: boolean;
|
|
2324
|
+
showCollapseControl?: boolean;
|
|
2325
|
+
/** Override spot icon edge length in CSS pixels. */
|
|
2326
|
+
iconSize?: number;
|
|
2327
|
+
openLabel?: string;
|
|
2328
|
+
closeLabel?: string;
|
|
2329
|
+
title?: string;
|
|
2330
|
+
className?: string;
|
|
2331
|
+
style?: CSSProperties;
|
|
2332
|
+
/** When true, fill a large authoring surface instead of visitor presentation. */
|
|
2333
|
+
editorSurface?: boolean;
|
|
2334
|
+
};
|
|
2335
|
+
/**
|
|
2336
|
+
* Visitor-facing map chrome for `PanoViewer.renderOverlay`.
|
|
2337
|
+
* Docked panels stay in a corner; dialog mode opens the same map in a modal.
|
|
2338
|
+
*/
|
|
2339
|
+
declare function PanoMapOverlay({ map, activeSceneId, onSelectScene, view, mode, selectedSpotId, onSelectedSpotIdChange, onEditChange, placementSceneId, presentationOverride, presentation: presentationModeProp, corner: cornerProp, width: widthProp, height: heightProp, offsetX: offsetXProp, offsetY: offsetYProp, dialogWidth, dialogHeight, interaction, maxScale, initialScale, showZoomControls, showCollapseControl, iconSize, openLabel, closeLabel, title, className, style, editorSurface, }: PanoMapOverlayProps): react.JSX.Element;
|
|
2340
|
+
|
|
2341
|
+
type MapRect = {
|
|
2342
|
+
left: number;
|
|
2343
|
+
top: number;
|
|
2344
|
+
width: number;
|
|
2345
|
+
height: number;
|
|
2346
|
+
};
|
|
2347
|
+
type MapPoint = {
|
|
2348
|
+
x: number;
|
|
2349
|
+
y: number;
|
|
2350
|
+
};
|
|
2351
|
+
type MapViewport = {
|
|
2352
|
+
/** Image pixel size after contain fitting, before user zoom. */
|
|
2353
|
+
fit: MapRect;
|
|
2354
|
+
/** User zoom relative to fit (1 = fitted). */
|
|
2355
|
+
scale: number;
|
|
2356
|
+
/** Pan in container pixels applied after scale around the fit origin. */
|
|
2357
|
+
panX: number;
|
|
2358
|
+
panY: number;
|
|
2359
|
+
};
|
|
2360
|
+
/** Clockwise degrees from image up for a sector when viewer yaw is `yaw`. */
|
|
2361
|
+
declare function sectorRotation(heading: number, yaw: number): number;
|
|
2362
|
+
/** Approximate horizontal FOV from vertical FOV and container aspect ratio. */
|
|
2363
|
+
declare function horizontalFov(verticalFov: number, aspect: number): number;
|
|
2364
|
+
/** Fit an image into a container with object-fit: contain semantics. */
|
|
2365
|
+
declare function containRect(containerWidth: number, containerHeight: number, imageWidth: number, imageHeight: number): MapRect;
|
|
2366
|
+
/** Project a normalized image point into container CSS pixels. */
|
|
2367
|
+
declare function imagePointToContainer(point: MapPoint, viewport: MapViewport): MapPoint;
|
|
2368
|
+
/** Convert a container pointer into a normalized image point. */
|
|
2369
|
+
declare function containerPointToImage(point: MapPoint, viewport: MapViewport): MapPoint | null;
|
|
2370
|
+
/** Clockwise degrees from image up for a vector in container space. */
|
|
2371
|
+
declare function headingFromVector(dx: number, dy: number): number;
|
|
2372
|
+
|
|
2373
|
+
export { type ArrowGraphic, type AssetUrlContext, type AssetUrlResolver, AudioHotspot, type AudioHotspotDefinition, type AudioHotspotErrorEvent, type AudioHotspotProps, type AudioPlaybackState, AutoRotate, type AutoRotateProps, BackgroundAudio, type BackgroundAudioController, type BackgroundAudioErrorEvent, type BackgroundAudioProps, type BackgroundAudioSnapshot, type BackgroundAudioSource, type CircleGraphic, type CubeFaceCode, type CubemapViewerConfig, DEFAULT_HOTSPOT_TOOLTIP_APPEARANCE, DEFAULT_HOTSPOT_TOOLTIP_OFFSET, DEFAULT_PANO_CURSORS, DEFAULT_PANO_SCENE_MENU_APPEARANCE, DEFAULT_PANO_VIDEO_CAPTION_APPEARANCE, DEFAULT_PANO_VIDEO_CONTROLS_APPEARANCE, DEFAULT_PANO_VIDEO_PLAYBACK_RATES, DEFAULT_WEBVR_CHROME_APPEARANCE, DEFAULT_WEBVR_CURSOR_DWELL_MS, type DiamondGraphic, type GraphicDefinition, GraphicHotspot, type GraphicHotspotDefinition, type GraphicHotspotProps, Gyro, type GyroHandle, type GyroProps, type GyroTouchMode, type HotspotCommonProps, type HotspotDefinition, type HotspotDefinitionBase, type HotspotDragEvent, type HotspotInputSource, type HotspotInteractionEvent, type HotspotMode, type HotspotPointerEvents, type HotspotPosition, type HotspotScaleMode, type HotspotTooltipAppearance, type HotspotTooltipContent, type HotspotTooltipPlacement, type HotspotTooltipTrigger, IframeHotspot, type IframeHotspotDefinition, type IframeHotspotProps, type IframePointerPolicy, ImageHotspot, type ImageHotspotDefinition, type ImageHotspotProps, type JsonObject, type JsonRequestOptions, type JsonValue, type KeyboardControlAction, type KeyboardControlKeys, KeyboardControls, type KeyboardControlsProps, type LoadPanoProjectOptions, type LoadSceneFromJsonOptions, type LoadedPanoProject, type LoadedProjectScene, MAX_HOTSPOT_PITCH, MIN_PANO_CONTEXT_MENU_BACKGROUND_OPACITY, type MouseControlButton, MouseControls, type MouseControlsOptions, type MouseControlsProps, PANO_FILTER_PRESETS, type PanoColorMatrix, PanoContextMenu, type PanoContextMenuActionItem, type PanoContextMenuAppearance, type PanoContextMenuEntry, type PanoContextMenuItem, type PanoContextMenuPresetActions, type PanoContextMenuPresetId, type PanoContextMenuPresetRef, type PanoContextMenuPresets, type PanoContextMenuProps, type PanoContextMenuRenderProps, type PanoContextMenuSelectContext, type PanoContextMenuSeparatorItem, type PanoCursor, type PanoCursors, PanoDataError, type PanoDataErrorCode, type PanoDragMotion, type PanoEventBus, type PanoEventListener, type PanoEventMap, type PanoEventType, PanoEvents, type PanoEventsProps, PanoFilter, type PanoFilterPreset, type PanoFilterProps, PanoMap, type PanoMapControlsDefinition, type PanoMapCorner, type PanoMapDefinition, type PanoMapDialogPresentation, type PanoMapDockedPresentation, type PanoMapEditChange, type PanoMapGradientStop, PanoMapOverlay, type PanoMapOverlayProps, type PanoMapPresentation, type PanoMapProps, type PanoMapSectorDefinition, type PanoMapSectorGradient, type PanoMapSpotDefinition, type PanoMediaActivationControls, type PanoMediaActivationOptions, PanoOverlayPortalProvider, type PanoOverlayRenderContext, type PanoProjectDefinition, type PanoProjectSceneDefinition, type PanoResizeEvent, PanoSceneMenu, type PanoSceneMenuAlign, type PanoSceneMenuAppearance, type PanoSceneMenuInset, type PanoSceneMenuItem, type PanoSceneMenuLabelAlign, type PanoSceneMenuPlacement, type PanoSceneMenuProps, PanoVideo, type PanoVideoCaptionAppearance, type PanoVideoController, PanoVideoControls, type PanoVideoControlsAppearance, type PanoVideoControlsProps, type PanoVideoErrorEvent, type PanoVideoErrorSource, type PanoVideoPlaybackSnapshot, type PanoVideoProps, type PanoVideoSource, type PanoVideoTrack, type PanoVideoTrackKind, type PanoVideoVariant, type PanoViewEasing, type PanoViewLimits, type PanoViewLookToOptions, type PanoViewNavigationOptions, type PanoViewNavigationResult, PanoViewer, type PanoViewerHandle, type PanoViewerProps, type PanoViewerState, type PanoWheelEvent, type PanoramaControlsOptions, type PanoramaPointerEvent, type PointHotspotDefinition, type PointHotspotDefinitionBase, PolygonHotspot, type PolygonHotspotDefinition, type PolygonHotspotProps, type PolygonValidationCode, type PolygonValidationIssue, type PolygonVerticesChangeEvent, PolylineHotspot, type PolylineHotspotDefinition, type PolylineHotspotProps, type PolylineValidationIssue, type PolylineVerticesChangeEvent, type PopupAssetUrlContext, type PopupAssetUrlResolver, type ProjectCustomActionEvent, type ProjectCustomHotspotAction, type ProjectHotspotAction, type ProjectHotspotClickEvent, type ProjectHotspotDefinition, type ProjectHotspotErrorEvent, type ProjectHotspotEvent, type ProjectHotspotRenderContext, type ProjectHotspotTrigger, type ProjectPopupBlock, type ProjectPopupDefinition, type ProjectPopupRequestEvent, ProjectScenes, type ProjectScenesProps, type RectangleGraphic, type RingGraphic, type Scene, type SceneFromViewerConfigOptions, type SceneTransition, type SceneTransitionEndEvent, type SceneTransitionErrorEvent, type SceneTransitionPreset, Scenes, type ScenesController, type ScenesProps, type SequenceFrameDirection, type SequenceFrameEvent, SequenceHotspot, type SequenceHotspotDefinition, type SequenceHotspotErrorEvent, type SequenceHotspotProps, type SequenceLoadProgress, type SequencePlaybackState, type SetPanoViewerOptions, Sphere, type SphereProps, type SphereScene, SphereTile, type SphereTileAddress, type SphereTileLevel, type SphereTileLoadError, type SphereTileMultiresConfig, type SphereTileProps, type SphereTileScene, type SphereViewerConfig, type StarGraphic, type SvgGraphic, type SvgPathGraphic, TextHotspot, type TextHotspotAlign, type TextHotspotDefinition, type TextHotspotFontStyle, type TextHotspotProps, type TextHotspotStyle, type TextHotspotVerticalAlign, type TextHotspotWhiteSpace, Tile, type TileAddress, type TileLoadError, type TileLoadProgress, type TileMultiresConfig, type TileProps, type TileScene, TouchControls, type TouchControlsOptions, type TouchControlsProps, type TriangleGraphic, type UsePanoViewerResult, VideoHotspot, type VideoHotspotDefinition, type VideoHotspotErrorEvent, type VideoHotspotProps, type VideoPlaybackState, type ViewInteractionEvent, type ViewInteractionSource, type ViewerConfig, type ViewerDocument, WEBVR_PROFILES, WEBVR_PROFILE_IDS, WebVR, type WebVRChrome, type WebVRChromeAppearance, type WebVRHandle, type WebVRMode, type WebVRProfile, type WebVRProfileId, type WebVRProps, type WebVRSettings, clampPanoPitch, composePanoContextMenuItems, containRect, containerPointToImage, createDefaultPanoContextMenuItems, createPanoContextMenuPresets, cycleSceneId, headingFromVector, horizontalFov, hotspotAction, imagePointToContainer, loadPanoProject, loadSceneFromJson, normalizePanoPosition, normalizePanoYaw, panoPositionToVector3, parsePanoMap, parsePanoProject, projectHotspotTriggers, resolvePanoContextMenuEntries, resolvePanoMapAssets, resolveHotspotAssets as resolveProjectHotspotAssets, resolveProjectPopupAssets, sceneFromViewerConfig, sectorRotation, setHotspotAction, unwrapPolygonVertices, usePanoEvents, usePanoModal, usePanoOverlay, usePanoViewer, validatePolygonVertices, validatePolylineVertices, vector3ToPanoPosition };
|