@baidumap/mapv-three 1.3.0 → 1.3.2

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 (44) hide show
  1. package/dist/assets/wasm/lanelet.js +4263 -0
  2. package/dist/assets/wasm/lanelet.wasm +0 -0
  3. package/dist/assets/workers/BaiduVectorParser.worker-d550338e.js +7168 -0
  4. package/dist/assets/workers/CesiumTerrainParser.worker-20119751.js +5860 -0
  5. package/dist/assets/workers/MVTParser.worker-7dc8b0e4.js +10759 -0
  6. package/dist/mapvthree.module.js +54640 -45670
  7. package/dist/mapvthree.umd.js +6 -11
  8. package/dist/types/assets/wasm/lanelet.d.ts +2 -0
  9. package/dist/types/index.d.ts +2 -0
  10. package/dist/types/threejs/loaders/gltf/GLTFCesiumRTCExtension.d.ts +4 -0
  11. package/dist/types/threejs/objects/element/OctahedralImpostor.d.ts +3 -0
  12. package/dist/types/threejs/objects/polygon/Polygon.d.ts +1 -0
  13. package/dist/types/threemap/3dtiles/elements/TileInstancedElementManager.d.ts +18 -4
  14. package/dist/types/threemap/Engine.d.ts +5 -0
  15. package/dist/types/threemap/animations/PathTracker.d.ts +106 -112
  16. package/dist/types/threemap/animations/PathTracker_deprecated.d.ts +136 -0
  17. package/dist/types/threemap/animations/TrackerAbstract.d.ts +89 -0
  18. package/dist/types/threemap/controls/editors/CircleEditor.d.ts +0 -7
  19. package/dist/types/threemap/controls/editors/Editor.d.ts +100 -21
  20. package/dist/types/threemap/controls/editors/PointEditor.d.ts +0 -9
  21. package/dist/types/threemap/controls/editors/PolygonEditor.d.ts +0 -9
  22. package/dist/types/threemap/controls/editors/RectEditor.d.ts +0 -9
  23. package/dist/types/threemap/controls/editors/SplineEditor.d.ts +0 -5
  24. package/dist/types/threemap/engine/Rendering.d.ts +12 -6
  25. package/dist/types/threemap/engine/map/earth/EllipsoidCamera.d.ts +3 -0
  26. package/dist/types/threemap/engine/rendering/MainNew.d.ts +1 -0
  27. package/dist/types/threemap/engine/rendering/MicroTaskScheduler.d.ts +1 -0
  28. package/dist/types/threemap/engine/rendering/Picking.d.ts +0 -1
  29. package/dist/types/threemap/engine/rendering/RenderState.d.ts +15 -0
  30. package/dist/types/threemap/engine/rendering/features/Features.d.ts +1 -0
  31. package/dist/types/threemap/engine/rendering/postprocessing/Postprocessings.d.ts +1 -0
  32. package/dist/types/threemap/engine/rendering/postprocessing/VolumetricCloudsPass.d.ts +1 -0
  33. package/dist/types/threemap/engine/rendering/scene/SceneRendering.d.ts +1 -0
  34. package/dist/types/threemap/mapView/constants.d.ts +5 -0
  35. package/dist/types/threemap/mapView/grid/BaiduLaneVectorGrid.d.ts +33 -0
  36. package/dist/types/threemap/mapView/grid/BaiduVectorOnlineGrid.d.ts +128 -2
  37. package/dist/types/threemap/mapView/map/MapView.d.ts +6 -0
  38. package/dist/types/threemap/mapView/surface/MapSurface.d.ts +19 -1
  39. package/dist/types/threemap/mapView/tileProvider/vector/BaiduLaneVectorTileProvider.d.ts +152 -0
  40. package/dist/types/threemap/mapView/tileProvider/worker/BaiduLaneVectorParser.worker.d.ts +1 -0
  41. package/dist/types/threemap/video/VideoConfig.d.ts +16 -0
  42. package/dist/types/util/math.d.ts +5 -0
  43. package/dist/types/util/request.d.ts +1 -1
  44. package/package.json +1 -2
@@ -0,0 +1,152 @@
1
+ /**
2
+ * 百度矢量瓦片提供者,用于加载和渲染百度地图的矢量瓦片数据。
3
+ * 支持在线和离线两种模式,可以处理多种投影方式。
4
+ *
5
+ * 主要功能:
6
+ * - 支持百度地图在线矢量瓦片加载
7
+ * - 支持离线矢量瓦片加载
8
+ * - 支持多种投影方式(Web墨卡托、百度墨卡托、地理坐标)
9
+ * - 支持矢量数据的样式配置
10
+ * - 支持POI标签的显示
11
+ *
12
+ * 需要使用百度地图的AK,请在{@link BaiduMapConfig}中设置。
13
+ * @category MapView
14
+ * @example
15
+ * ```javascript
16
+ * // 创建在线矢量瓦片提供者
17
+ * const provider = new BaiduLaneVectorTileProvider({
18
+ * ak: 'your_ak_here',
19
+ * displayOptions: {
20
+ * // 显示配置
21
+ * }
22
+ * });
23
+ *
24
+ * // 创建DuGIS离线矢量瓦片提供者
25
+ * const offlineProvider = new BaiduLaneVectorTileProvider({
26
+ * isOffline: true,
27
+ * url: 'http://dugis-offline-server',
28
+ * });
29
+ * ```
30
+ */
31
+ export class BaiduLaneVectorTileProvider extends VectorTileProvider {
32
+ /**
33
+ * @param {object} options 配置选项
34
+ * @param {string} [options.ak] 百度地图AK,在线模式必填
35
+ * @param {string} [options.styleId] 百度地图个性化地图,设置样式StyleId
36
+ * @param {string} [options.styleJson] 百度地图个性化地图,设置样式StyleJson
37
+ * @param {boolean} [options.isOffline=false] 是否为离线dugis模式
38
+ * @param {string} [options.url] 离线模式下的瓦片dugis服务器地址
39
+ * @param {string} [options.staticUrl] 离线模式下的静态资源服务器地址
40
+ * @param {string} [options.projection] 离线模式下的投影方式,默认为'mapvthree.PROJECTION_WEB_MERCATOR'
41
+ * @param {object} [options.displayOptions] 显示配置选项
42
+ * @param {boolean} [options.displayOptions.base=true] 是否显示基础面
43
+ * @param {boolean} [options.displayOptions.link=true] 是否显示道路
44
+ * @param {boolean} [options.displayOptions.building=true] 是否显示3D建筑物
45
+ * @param {boolean} [options.displayOptions.poi=true] 是否显示POI
46
+ * @param {boolean} [options.displayOptions.flat=true] 是否显示成压平模式
47
+ */
48
+ constructor(options?: {
49
+ ak?: string | undefined;
50
+ styleId?: string | undefined;
51
+ styleJson?: string | undefined;
52
+ isOffline?: boolean | undefined;
53
+ url?: string | undefined;
54
+ staticUrl?: string | undefined;
55
+ projection?: string | undefined;
56
+ displayOptions?: {
57
+ base?: boolean | undefined;
58
+ link?: boolean | undefined;
59
+ building?: boolean | undefined;
60
+ poi?: boolean | undefined;
61
+ flat?: boolean | undefined;
62
+ } | undefined;
63
+ });
64
+ /**
65
+ * 瓦片提供者名称
66
+ * @readonly
67
+ */
68
+ readonly name: "BaiduLaneVectorTileProvider";
69
+ /**
70
+ * 是否为百度地图提供者
71
+ * @readonly
72
+ */
73
+ readonly isBaiduProvider: true;
74
+ /** @private */ private _shouldRenderPlaceholder;
75
+ /** @private */ private _defaultStartLevel;
76
+ /** @private */ private _defaultMaxLevel;
77
+ /** @private */ private _labels;
78
+ /** @private */ private _ak;
79
+ _displayOptions: {
80
+ base?: boolean | undefined;
81
+ link?: boolean | undefined;
82
+ building?: boolean | undefined;
83
+ poi?: boolean | undefined;
84
+ flat?: boolean | undefined;
85
+ } | undefined;
86
+ _url: string;
87
+ _styleUrl: any;
88
+ _defaultMinLevel: number;
89
+ /**
90
+ * 设置地图样式,通过 https://lbsyun.baidu.com/index.php?title=open/custom 获取个性化样式配置
91
+ * @param {Object} config 样式配置
92
+ * @param {string} config.styleId 样式ID
93
+ * @param {string} config.styleJson 样式JSON
94
+ */
95
+ setMapStyle(config: {
96
+ styleId: string;
97
+ styleJson: string;
98
+ }): Promise<void>;
99
+ /**
100
+ * 异步初始化方法
101
+ * @protected
102
+ */
103
+ protected _asyncInit(): Promise<void>;
104
+ _dataLoader: AsyncDataTileLoader | undefined;
105
+ _loadStyle: () => Promise<void>;
106
+ _getIconStyleFile: (style: any) => Promise<void>;
107
+ _getMapStyleFiles(style: any): string[];
108
+ _vctMapStyleDomain: string | undefined;
109
+ getTileURL(z: any, x: any, y: any, tile: any): string;
110
+ /**
111
+ * 获取WebWorker选项
112
+ * @internal
113
+ * @returns {object} 工作者选项
114
+ */
115
+ getWorkerOptions(): object;
116
+ /**
117
+ * 获取请求选项
118
+ * @internal
119
+ * @param {object} tile 瓦片对象
120
+ * @returns {object} 请求选项
121
+ */
122
+ getFetchOptions(tile: object): object;
123
+ /**
124
+ * 请求瓦片数据
125
+ * @internal
126
+ * @param {object} tile 瓦片对象
127
+ * @returns {Promise<Group>} 包含瓦片数据的Group对象
128
+ */
129
+ doRequestVectorTileData(tile: object): Promise<Group>;
130
+ _calculateTolerance(surfaceTile: any, engine: any, label: any): number;
131
+ /**
132
+ * 添加POI标签
133
+ * @param {object} surfaceTile 表面瓦片对象
134
+ * @param {Engine} engine 引擎实例
135
+ * @private
136
+ */
137
+ private _addTilePOI;
138
+ _removeTilePOI(surfaceTile: any, engine: any): void;
139
+ /**
140
+ * @protected
141
+ */
142
+ protected onSurfaceTileAdded(surfaceTile: any, engine: any): void;
143
+ /**
144
+ * @protected
145
+ */
146
+ protected onSurfaceTileRemoved(surfaceTile: any, engine: any): void;
147
+ onSurfaceTileSSEChanged(surfaceTile: any, engine: any): void;
148
+ addAllSymbols(): void;
149
+ removeAllSymbols(): void;
150
+ }
151
+ import { VectorTileProvider } from './VectorTileProvider';
152
+ import { AsyncDataTileLoader } from '../AsyncDataTileLoader';
@@ -0,0 +1,16 @@
1
+ export class VideoConfig {
2
+ constructor(options: any);
3
+ duration: number;
4
+ fps: number;
5
+ width: number;
6
+ height: number;
7
+ outputPath: string;
8
+ outputFormat: string;
9
+ outputQuality: number;
10
+ outputBitrate: string;
11
+ onProgress: null;
12
+ pixelRatio: number;
13
+ pathTracker: any;
14
+ pathTrackerOptions: any;
15
+ get frameCount(): number;
16
+ }
@@ -74,3 +74,8 @@ export function getRadiusCenter(lineA: any, lineB: any, percent: any): {
74
74
  */
75
75
  export function isConcavePoly(vertexs: any): boolean;
76
76
  export function arrayRemoveDuplicates(values: any, wrapAround: any, removedIndices: any): any;
77
+ /**
78
+ * 球面线性插值(SLERP),在单位球面上对两个向量进行平滑插值,用于实现旋转或方向的平滑过渡。
79
+ * 相比普通线性插值 (LERP),SLERP 在大角度时能保持恒定的插值速度,避免“加速/减速”的假象。
80
+ */
81
+ export function slerpVectors(a: any, b: any, t: any): any;
@@ -9,7 +9,7 @@
9
9
  * @param {object} fetchOptions fetch的参数,同fetch第二个参数
10
10
  * @param {number} times 最大重新请求次数,默认3次
11
11
  */
12
- export function reFetch(url: string | undefined, fetchOptions: object, times?: number): any;
12
+ export function reFetch(url?: string, fetchOptions?: object, times?: number): any;
13
13
  /**
14
14
  * jsonp请求
15
15
  * @internal
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@baidumap/mapv-three",
3
- "version": "1.3.0",
3
+ "version": "1.3.2",
4
4
  "description": "A powerful 3D map engine.",
5
5
  "author": "mapopen-fe@baidu.com",
6
6
  "main": "dist/mapvthree.umd.js",
@@ -51,7 +51,6 @@
51
51
  "shader-particle-system": "^1.1.4",
52
52
  "simpleheat": "^0.4.0",
53
53
  "size-sensor": "^1.0.1",
54
- "three": "0.158.0",
55
54
  "urijs": "^1.19.11",
56
55
  "url-join": "^4.0.1",
57
56
  "wellknown": "^0.5.0"