@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.
- package/dist/assets/wasm/lanelet.js +4263 -0
- package/dist/assets/wasm/lanelet.wasm +0 -0
- package/dist/assets/workers/BaiduVectorParser.worker-d550338e.js +7168 -0
- package/dist/assets/workers/CesiumTerrainParser.worker-20119751.js +5860 -0
- package/dist/assets/workers/MVTParser.worker-7dc8b0e4.js +10759 -0
- package/dist/mapvthree.module.js +54640 -45670
- package/dist/mapvthree.umd.js +6 -11
- package/dist/types/assets/wasm/lanelet.d.ts +2 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/threejs/loaders/gltf/GLTFCesiumRTCExtension.d.ts +4 -0
- package/dist/types/threejs/objects/element/OctahedralImpostor.d.ts +3 -0
- package/dist/types/threejs/objects/polygon/Polygon.d.ts +1 -0
- package/dist/types/threemap/3dtiles/elements/TileInstancedElementManager.d.ts +18 -4
- package/dist/types/threemap/Engine.d.ts +5 -0
- package/dist/types/threemap/animations/PathTracker.d.ts +106 -112
- package/dist/types/threemap/animations/PathTracker_deprecated.d.ts +136 -0
- package/dist/types/threemap/animations/TrackerAbstract.d.ts +89 -0
- package/dist/types/threemap/controls/editors/CircleEditor.d.ts +0 -7
- package/dist/types/threemap/controls/editors/Editor.d.ts +100 -21
- package/dist/types/threemap/controls/editors/PointEditor.d.ts +0 -9
- package/dist/types/threemap/controls/editors/PolygonEditor.d.ts +0 -9
- package/dist/types/threemap/controls/editors/RectEditor.d.ts +0 -9
- package/dist/types/threemap/controls/editors/SplineEditor.d.ts +0 -5
- package/dist/types/threemap/engine/Rendering.d.ts +12 -6
- package/dist/types/threemap/engine/map/earth/EllipsoidCamera.d.ts +3 -0
- package/dist/types/threemap/engine/rendering/MainNew.d.ts +1 -0
- package/dist/types/threemap/engine/rendering/MicroTaskScheduler.d.ts +1 -0
- package/dist/types/threemap/engine/rendering/Picking.d.ts +0 -1
- package/dist/types/threemap/engine/rendering/RenderState.d.ts +15 -0
- package/dist/types/threemap/engine/rendering/features/Features.d.ts +1 -0
- package/dist/types/threemap/engine/rendering/postprocessing/Postprocessings.d.ts +1 -0
- package/dist/types/threemap/engine/rendering/postprocessing/VolumetricCloudsPass.d.ts +1 -0
- package/dist/types/threemap/engine/rendering/scene/SceneRendering.d.ts +1 -0
- package/dist/types/threemap/mapView/constants.d.ts +5 -0
- package/dist/types/threemap/mapView/grid/BaiduLaneVectorGrid.d.ts +33 -0
- package/dist/types/threemap/mapView/grid/BaiduVectorOnlineGrid.d.ts +128 -2
- package/dist/types/threemap/mapView/map/MapView.d.ts +6 -0
- package/dist/types/threemap/mapView/surface/MapSurface.d.ts +19 -1
- package/dist/types/threemap/mapView/tileProvider/vector/BaiduLaneVectorTileProvider.d.ts +152 -0
- package/dist/types/threemap/mapView/tileProvider/worker/BaiduLaneVectorParser.worker.d.ts +1 -0
- package/dist/types/threemap/video/VideoConfig.d.ts +16 -0
- package/dist/types/util/math.d.ts +5 -0
- package/dist/types/util/request.d.ts +1 -1
- package/package.json +1 -2
package/dist/types/index.d.ts
CHANGED
|
@@ -34,6 +34,7 @@ export { GridCoordProvider } from "./threemap/mapView/tileProvider/imagery/GridC
|
|
|
34
34
|
export { PlaneTerrainTileProvider } from "./threemap/mapView/tileProvider/terrain/PlaneTerrainTileProvider";
|
|
35
35
|
export { CesiumTerrainTileProvider } from "./threemap/mapView/tileProvider/terrain/CesiumTerrainTileProvider";
|
|
36
36
|
export { BaiduVectorTileProvider } from "./threemap/mapView/tileProvider/vector/BaiduVectorTileProvider";
|
|
37
|
+
export { BaiduLaneVectorTileProvider } from "./threemap/mapView/tileProvider/vector/BaiduLaneVectorTileProvider";
|
|
37
38
|
export { GeoJSONVectorTileProvider } from "./threemap/mapView/tileProvider/vector/GeoJSONVectorTileProvider";
|
|
38
39
|
export { BaiduTrafficTileProvider } from "./threemap/mapView/tileProvider/vector/BaiduTrafficTileProvider";
|
|
39
40
|
export { MapboxVectorTileProvider } from "./threemap/mapView/tileProvider/vector/MapboxVectorTileProvider";
|
|
@@ -159,6 +160,7 @@ export { FoliageLeafMaterial } from "./threejs/materials/natural/FoliageLeafMate
|
|
|
159
160
|
export { BatchBuildingMaterial } from "./threemap/materials/BatchBuildingMaterial";
|
|
160
161
|
export { ColorAdjustPass } from "./threejs/postprocessing/ColorAdjustPass";
|
|
161
162
|
export { Transforms } from "../src/threemap/engine/map/earth/Transforms";
|
|
163
|
+
export { VideoConfig } from "./threemap/video/VideoConfig";
|
|
162
164
|
export * as urlUtils from "./util/urlUtils";
|
|
163
165
|
export * as geojsonUtils from "./util/geojsonUtils";
|
|
164
166
|
export * as colorUtils from "./util/colorUtils";
|
|
@@ -5,6 +5,9 @@ export class OctahedralImpostor extends GeoInstancedMesh {
|
|
|
5
5
|
normalDepth: null;
|
|
6
6
|
orm: null;
|
|
7
7
|
};
|
|
8
|
+
static _defaultTexturesPromise: null;
|
|
9
|
+
static _bitmapPromises: Map<any, any>;
|
|
10
|
+
static _getBitmap(url: any): any;
|
|
8
11
|
static initDefaultTextures(): Promise<void>;
|
|
9
12
|
static createTextures(diffuseUrl: any, normalDepthUrl: any, ormUrl: any): Promise<{
|
|
10
13
|
diffuseTexture: any;
|
|
@@ -197,6 +197,7 @@ export class Polygon extends GeoMesh {
|
|
|
197
197
|
* @protected
|
|
198
198
|
*/
|
|
199
199
|
protected onBeforeSceneRenderHook(engine: Engine, scene: Scene, camera: Camera, renderState: Object): void;
|
|
200
|
+
getNormal(): any;
|
|
200
201
|
/**
|
|
201
202
|
* 计算矩形边界
|
|
202
203
|
* @returns {Array<number>} 边界数组 [minX, minY, maxX, maxY]
|
|
@@ -153,14 +153,21 @@ export class TileInstancedElementManager {
|
|
|
153
153
|
isFoliage: boolean;
|
|
154
154
|
isBox: boolean;
|
|
155
155
|
scaleByZ: boolean;
|
|
156
|
-
instances: {
|
|
156
|
+
instances: ({
|
|
157
157
|
subtype: string;
|
|
158
158
|
diffuseTexture: string;
|
|
159
159
|
normalDepthTexture: string;
|
|
160
160
|
ormTexture: string;
|
|
161
161
|
imposterScale: number;
|
|
162
162
|
uvOffset: number;
|
|
163
|
-
}
|
|
163
|
+
} | {
|
|
164
|
+
subtype: string;
|
|
165
|
+
imposterScale: number;
|
|
166
|
+
uvOffset: number;
|
|
167
|
+
diffuseTexture?: undefined;
|
|
168
|
+
normalDepthTexture?: undefined;
|
|
169
|
+
ormTexture?: undefined;
|
|
170
|
+
})[];
|
|
164
171
|
};
|
|
165
172
|
});
|
|
166
173
|
get config(): {
|
|
@@ -169,14 +176,21 @@ export class TileInstancedElementManager {
|
|
|
169
176
|
isFoliage: boolean;
|
|
170
177
|
isBox: boolean;
|
|
171
178
|
scaleByZ: boolean;
|
|
172
|
-
instances: {
|
|
179
|
+
instances: ({
|
|
173
180
|
subtype: string;
|
|
174
181
|
diffuseTexture: string;
|
|
175
182
|
normalDepthTexture: string;
|
|
176
183
|
ormTexture: string;
|
|
177
184
|
imposterScale: number;
|
|
178
185
|
uvOffset: number;
|
|
179
|
-
}
|
|
186
|
+
} | {
|
|
187
|
+
subtype: string;
|
|
188
|
+
imposterScale: number;
|
|
189
|
+
uvOffset: number;
|
|
190
|
+
diffuseTexture?: undefined;
|
|
191
|
+
normalDepthTexture?: undefined;
|
|
192
|
+
ormTexture?: undefined;
|
|
193
|
+
})[];
|
|
180
194
|
};
|
|
181
195
|
};
|
|
182
196
|
set labelEnabled(enabled: boolean);
|
|
@@ -131,6 +131,11 @@ export class Engine {
|
|
|
131
131
|
* // TODO: 暂时不对外开放,考虑移到engine.map中
|
|
132
132
|
*/
|
|
133
133
|
private unlockCamera;
|
|
134
|
+
/**
|
|
135
|
+
* 渲染电影
|
|
136
|
+
* @param {Movie} movie 电影对象
|
|
137
|
+
*/
|
|
138
|
+
renderVideo(videoConfig: any): Promise<void>;
|
|
134
139
|
/**
|
|
135
140
|
* 容器对象
|
|
136
141
|
* @type {HTMLElement}
|
|
@@ -1,64 +1,84 @@
|
|
|
1
|
-
export class PathTracker {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
/** @private */ private _animationDuration;
|
|
5
|
-
/** @private */ private _animationTransform;
|
|
6
|
-
/** @private */ private _animationCurrenState;
|
|
7
|
-
/** @private */ private _engine;
|
|
8
|
-
/** @private */ private _track;
|
|
9
|
-
/** @private */ private _frameInfo;
|
|
10
|
-
/** @private */ private _sampledPath;
|
|
11
|
-
/** @private */ private _isPause;
|
|
12
|
-
/** @private */ private _pauseTime;
|
|
13
|
-
/** @private */ private _pauseTimestamp;
|
|
14
|
-
/** @private */ private _object;
|
|
1
|
+
export class PathTracker extends TrackerAbstract {
|
|
2
|
+
_sampledPath: any[];
|
|
3
|
+
_arcInfo: {};
|
|
15
4
|
/** @private */ private _interpolateDirectThreshold;
|
|
16
5
|
/** @private */ private _interpolateDirectThresholdPercent;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* @internal
|
|
28
|
-
* 控制地图视野移动
|
|
29
|
-
*/
|
|
30
|
-
_updateCamera(camera: any, center: any, zoom: any, zoomUnits: any, heading: any, pitch: any): void;
|
|
31
|
-
_computeCameraMatrixGlobe(camera: any, center: any, zoom: any, zoomUnits: any, heading: any, pitch: any): void;
|
|
32
|
-
/**
|
|
33
|
-
* @internal
|
|
34
|
-
* 不用map的方法,直接修改相机,避免出现卡顿问题
|
|
35
|
-
*/
|
|
36
|
-
_computeCameraMatrixBlankMap(camera: any, center: any, zoom: any, zoomUnits: any, heading: any, pitch: any): void;
|
|
37
|
-
/**
|
|
38
|
-
* @internal
|
|
39
|
-
* 3DControl的lookAt方法是直接操作相机
|
|
40
|
-
*/
|
|
41
|
-
_computeCameraMatrixBlankMap3D(camera: any, center: any, zoom: any, zoomUnits: any, heading: any, pitch: any): void;
|
|
42
|
-
_updatePositionAndDirection(last: any, current: any, percent: any, isTrans: any, transPercent: any): {
|
|
6
|
+
updatePositionByPercentage(ratio: any): {
|
|
7
|
+
point: any;
|
|
8
|
+
hpr: {
|
|
9
|
+
heading: number;
|
|
10
|
+
pitch: number;
|
|
11
|
+
roll: number;
|
|
12
|
+
};
|
|
13
|
+
direction: any;
|
|
14
|
+
} | {
|
|
43
15
|
point: any[];
|
|
16
|
+
hpr: {
|
|
17
|
+
heading: any;
|
|
18
|
+
pitch: any;
|
|
19
|
+
roll: any;
|
|
20
|
+
};
|
|
21
|
+
} | undefined;
|
|
22
|
+
_interpolatePath(ratio: any): {
|
|
23
|
+
point: any;
|
|
24
|
+
hpr: {
|
|
25
|
+
heading: number;
|
|
26
|
+
pitch: number;
|
|
27
|
+
roll: number;
|
|
28
|
+
};
|
|
44
29
|
direction: any;
|
|
30
|
+
} | {
|
|
31
|
+
point: any[];
|
|
32
|
+
hpr: {
|
|
33
|
+
heading: any;
|
|
34
|
+
pitch: any;
|
|
35
|
+
roll: any;
|
|
36
|
+
};
|
|
45
37
|
};
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
38
|
+
_handleFrame(lastFrame: any, currentFrame: any, last: any, current: any, next: any, point: any, transPercent: any, percent: any, ratio: any): {
|
|
39
|
+
point: any;
|
|
40
|
+
hpr: {
|
|
41
|
+
heading: number;
|
|
42
|
+
pitch: number;
|
|
43
|
+
roll: number;
|
|
44
|
+
};
|
|
45
|
+
direction: any;
|
|
46
|
+
};
|
|
47
|
+
_getSegment(ratio: any, dataLength: any): {
|
|
48
|
+
last: any;
|
|
49
|
+
current: any;
|
|
50
|
+
next: any;
|
|
51
|
+
isStart: boolean;
|
|
52
|
+
isEnd: boolean;
|
|
53
|
+
segmentPercent: number;
|
|
54
|
+
lastFrame: any;
|
|
55
|
+
currentFrame: any;
|
|
56
|
+
};
|
|
57
|
+
_computeTransition(percent: any, last: any, current: any, next: any, isStart: any, isEnd: any): {
|
|
58
|
+
isTransition: any;
|
|
59
|
+
transPercent: number;
|
|
60
|
+
};
|
|
61
|
+
_updatePositionAndDirection(last: any, current: any, percent: any, isTrans: any, transPercent: any): {
|
|
62
|
+
point: any[];
|
|
63
|
+
hpr: {
|
|
64
|
+
heading: any;
|
|
65
|
+
pitch: any;
|
|
66
|
+
roll: any;
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
_findCurrentSegment(ratio: any): {
|
|
70
|
+
last: any;
|
|
71
|
+
current: any;
|
|
72
|
+
next: any;
|
|
73
|
+
percent: number;
|
|
74
|
+
lastFrame: null;
|
|
75
|
+
currentFrame: null;
|
|
76
|
+
index: number;
|
|
77
|
+
} | null;
|
|
78
|
+
_calculateLocation(last: any, current: any, percent: any): {
|
|
52
79
|
point: any[];
|
|
53
|
-
position: any;
|
|
54
|
-
distance: number;
|
|
55
80
|
direction: any;
|
|
56
|
-
pitch: number;
|
|
57
|
-
path: any;
|
|
58
81
|
};
|
|
59
|
-
/**
|
|
60
|
-
* @internal
|
|
61
|
-
*/
|
|
62
82
|
_createSampledPath(path: any): {
|
|
63
83
|
percent: string;
|
|
64
84
|
point: any;
|
|
@@ -68,69 +88,43 @@ export class PathTracker {
|
|
|
68
88
|
pitch: number;
|
|
69
89
|
}[] | undefined;
|
|
70
90
|
/**
|
|
71
|
-
*
|
|
72
|
-
* 计算v0到v1的地图倾斜角度
|
|
73
|
-
* @param {Array} v0 起点
|
|
74
|
-
* @param {Array} v1 终点
|
|
75
|
-
*/
|
|
76
|
-
_getRadians(v0: any[], v1: any[]): number;
|
|
77
|
-
startByRouteServe(start: any, end: any, options?: {}): void;
|
|
78
|
-
/**
|
|
79
|
-
* 设置视野跟随的坐标
|
|
80
|
-
* @param {Array | GeoJSON} target 坐标数组或geojson对象
|
|
81
|
-
*/
|
|
82
|
-
set track(target: any[] | GeoJSON);
|
|
83
|
-
get track(): any[] | GeoJSON;
|
|
84
|
-
set viewMode(value: string);
|
|
85
|
-
get viewMode(): string;
|
|
86
|
-
set pointHandle(value: any);
|
|
87
|
-
updateViewConfig(viewConfig: any): void;
|
|
88
|
-
/**
|
|
89
|
-
* 开始漫游动画,可设置动画时长、视野距离、视野偏移
|
|
90
|
-
* @param {{duration?: number, heading?: number, pitch?: number, distance?: number}} options 动画参数
|
|
91
|
-
*/
|
|
92
|
-
start(options?: {
|
|
93
|
-
duration?: number;
|
|
94
|
-
heading?: number;
|
|
95
|
-
pitch?: number;
|
|
96
|
-
distance?: number;
|
|
97
|
-
}): void;
|
|
98
|
-
/**
|
|
99
|
-
* 暂停漫游动画
|
|
100
|
-
* @param {*} unlock 是否解锁视野
|
|
101
|
-
* @returns 当前视角参数
|
|
102
|
-
*/
|
|
103
|
-
pause(unlock: any): null;
|
|
104
|
-
/**
|
|
105
|
-
* 停止漫游动画
|
|
91
|
+
* 计算两点间的地图倾斜角度
|
|
106
92
|
*/
|
|
107
|
-
|
|
108
|
-
|
|
93
|
+
_getRadians(v0: any, v1: any): number;
|
|
94
|
+
_parseCoordinateArray(target: any): {
|
|
95
|
+
track: any[];
|
|
96
|
+
frameInfo: never[];
|
|
97
|
+
} | undefined;
|
|
98
|
+
_parseGeoJSON(target: any): {
|
|
99
|
+
track: any;
|
|
100
|
+
frameInfo: any;
|
|
101
|
+
} | undefined;
|
|
102
|
+
_parseFrameArray(target: any): {
|
|
103
|
+
track: any[][];
|
|
104
|
+
frameInfo: {
|
|
105
|
+
pitch: any;
|
|
106
|
+
yaw: any;
|
|
107
|
+
aim: any;
|
|
108
|
+
speed: any;
|
|
109
|
+
time: any;
|
|
110
|
+
}[];
|
|
111
|
+
} | undefined;
|
|
109
112
|
/**
|
|
110
|
-
*
|
|
111
|
-
* @param {
|
|
113
|
+
* 设置路径数据
|
|
114
|
+
* @param {Array|Object} target 路径数据
|
|
112
115
|
*/
|
|
116
|
+
set track(target: any[] | Object);
|
|
117
|
+
get track(): any[] | Object;
|
|
118
|
+
dirUpToHPR(direction: any, position: any, up: any): {
|
|
119
|
+
heading: any;
|
|
120
|
+
pitch: any;
|
|
121
|
+
roll: any;
|
|
122
|
+
};
|
|
113
123
|
set interpolateDirectThreshold(value: number);
|
|
114
124
|
get interpolateDirectThreshold(): number;
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
*/
|
|
119
|
-
set interpolateDirectThresholdPercent(value: number);
|
|
120
|
-
get interpolateDirectThresholdPercent(): number;
|
|
121
|
-
/**
|
|
122
|
-
* 锁定视角
|
|
123
|
-
* @param {boolean} value 是否锁定
|
|
124
|
-
*/
|
|
125
|
-
set lockView(value: boolean);
|
|
126
|
-
get lockView(): boolean;
|
|
127
|
-
set viewFollow(value: boolean);
|
|
128
|
-
get viewFollow(): boolean;
|
|
129
|
-
/**
|
|
130
|
-
* 设置跟踪的object物体,如果参数为模型则需遵循以下要求:模型的前进方向为X正半轴,且按+Y UP导出
|
|
131
|
-
* @param {Object3D} value 传入threejs的Object对象
|
|
132
|
-
*/
|
|
133
|
-
set object(value: Object3D);
|
|
134
|
-
get object(): Object3D;
|
|
125
|
+
set pointHandle(value: any);
|
|
126
|
+
get pointHandle(): any;
|
|
127
|
+
_pointHandle: any;
|
|
135
128
|
curvePath: any;
|
|
136
129
|
}
|
|
130
|
+
import { TrackerAbstract } from './TrackerAbstract';
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
export class PathTracker {
|
|
2
|
+
/** @private */ private _isRunning;
|
|
3
|
+
/** @private */ private _animationStartTime;
|
|
4
|
+
/** @private */ private _animationDuration;
|
|
5
|
+
/** @private */ private _animationTransform;
|
|
6
|
+
/** @private */ private _animationCurrenState;
|
|
7
|
+
/** @private */ private _engine;
|
|
8
|
+
/** @private */ private _track;
|
|
9
|
+
/** @private */ private _frameInfo;
|
|
10
|
+
/** @private */ private _sampledPath;
|
|
11
|
+
/** @private */ private _isPause;
|
|
12
|
+
/** @private */ private _pauseTime;
|
|
13
|
+
/** @private */ private _pauseTimestamp;
|
|
14
|
+
/** @private */ private _object;
|
|
15
|
+
/** @private */ private _interpolateDirectThreshold;
|
|
16
|
+
/** @private */ private _interpolateDirectThresholdPercent;
|
|
17
|
+
/** @private */ private _lockView;
|
|
18
|
+
/** @private */ private _viewFollow;
|
|
19
|
+
/** @private */ private _viewMode;
|
|
20
|
+
/** @private */ private _arcInfo;
|
|
21
|
+
/** @private */ private _pointHandle;
|
|
22
|
+
/** @protected */
|
|
23
|
+
protected afterAddToEngine(engine: any): void;
|
|
24
|
+
beforeRemoveFromEngine(): void;
|
|
25
|
+
_update: () => void;
|
|
26
|
+
/**
|
|
27
|
+
* @internal
|
|
28
|
+
* 控制地图视野移动
|
|
29
|
+
*/
|
|
30
|
+
_updateCamera(camera: any, center: any, zoom: any, zoomUnits: any, heading: any, pitch: any): void;
|
|
31
|
+
_computeCameraMatrixGlobe(camera: any, center: any, zoom: any, zoomUnits: any, heading: any, pitch: any): void;
|
|
32
|
+
/**
|
|
33
|
+
* @internal
|
|
34
|
+
* 不用map的方法,直接修改相机,避免出现卡顿问题
|
|
35
|
+
*/
|
|
36
|
+
_computeCameraMatrixBlankMap(camera: any, center: any, zoom: any, zoomUnits: any, heading: any, pitch: any): void;
|
|
37
|
+
/**
|
|
38
|
+
* @internal
|
|
39
|
+
* 3DControl的lookAt方法是直接操作相机
|
|
40
|
+
*/
|
|
41
|
+
_computeCameraMatrixBlankMap3D(camera: any, center: any, zoom: any, zoomUnits: any, heading: any, pitch: any): void;
|
|
42
|
+
_updatePositionAndDirection(last: any, current: any, percent: any, isTrans: any, transPercent: any): {
|
|
43
|
+
point: any[];
|
|
44
|
+
direction: any;
|
|
45
|
+
};
|
|
46
|
+
_updatePitch(last: any, current: any, percent: any): number;
|
|
47
|
+
/**
|
|
48
|
+
* @internal
|
|
49
|
+
*/
|
|
50
|
+
_interpolatePath(ratio: any): {
|
|
51
|
+
percent: any;
|
|
52
|
+
point: any[];
|
|
53
|
+
position: any;
|
|
54
|
+
distance: number;
|
|
55
|
+
direction: any;
|
|
56
|
+
pitch: number;
|
|
57
|
+
path: any;
|
|
58
|
+
};
|
|
59
|
+
/**
|
|
60
|
+
* @internal
|
|
61
|
+
*/
|
|
62
|
+
_createSampledPath(path: any): {
|
|
63
|
+
percent: string;
|
|
64
|
+
point: any;
|
|
65
|
+
position: any;
|
|
66
|
+
distance: number;
|
|
67
|
+
direction: any;
|
|
68
|
+
pitch: number;
|
|
69
|
+
}[] | undefined;
|
|
70
|
+
/**
|
|
71
|
+
* @internal
|
|
72
|
+
* 计算v0到v1的地图倾斜角度
|
|
73
|
+
* @param {Array} v0 起点
|
|
74
|
+
* @param {Array} v1 终点
|
|
75
|
+
*/
|
|
76
|
+
_getRadians(v0: any[], v1: any[]): number;
|
|
77
|
+
startByRouteServe(start: any, end: any, options?: {}): void;
|
|
78
|
+
/**
|
|
79
|
+
* 设置视野跟随的坐标
|
|
80
|
+
* @param {Array | GeoJSON} target 坐标数组或geojson对象
|
|
81
|
+
*/
|
|
82
|
+
set track(target: any[] | GeoJSON);
|
|
83
|
+
get track(): any[] | GeoJSON;
|
|
84
|
+
set viewMode(value: string);
|
|
85
|
+
get viewMode(): string;
|
|
86
|
+
set pointHandle(value: any);
|
|
87
|
+
updateViewConfig(viewConfig: any): void;
|
|
88
|
+
/**
|
|
89
|
+
* 开始漫游动画,可设置动画时长、视野距离、视野偏移
|
|
90
|
+
* @param {{duration?: number, heading?: number, pitch?: number, distance?: number}} options 动画参数
|
|
91
|
+
*/
|
|
92
|
+
start(options?: {
|
|
93
|
+
duration?: number;
|
|
94
|
+
heading?: number;
|
|
95
|
+
pitch?: number;
|
|
96
|
+
distance?: number;
|
|
97
|
+
}): void;
|
|
98
|
+
/**
|
|
99
|
+
* 暂停漫游动画
|
|
100
|
+
* @param {*} unlock 是否解锁视野
|
|
101
|
+
* @returns 当前视角参数
|
|
102
|
+
*/
|
|
103
|
+
pause(unlock: any): null;
|
|
104
|
+
/**
|
|
105
|
+
* 停止漫游动画
|
|
106
|
+
*/
|
|
107
|
+
stop(): void;
|
|
108
|
+
replay(): void;
|
|
109
|
+
/**
|
|
110
|
+
* 设置拐弯处的开始差值的距离
|
|
111
|
+
* @param {number} value 距离单位米
|
|
112
|
+
*/
|
|
113
|
+
set interpolateDirectThreshold(value: number);
|
|
114
|
+
get interpolateDirectThreshold(): number;
|
|
115
|
+
/**
|
|
116
|
+
* 设置拐弯处的开始差值的距离百分比
|
|
117
|
+
* @param {number} value 百分比 0 < value < 0.5
|
|
118
|
+
*/
|
|
119
|
+
set interpolateDirectThresholdPercent(value: number);
|
|
120
|
+
get interpolateDirectThresholdPercent(): number;
|
|
121
|
+
/**
|
|
122
|
+
* 锁定视角
|
|
123
|
+
* @param {boolean} value 是否锁定
|
|
124
|
+
*/
|
|
125
|
+
set lockView(value: boolean);
|
|
126
|
+
get lockView(): boolean;
|
|
127
|
+
set viewFollow(value: boolean);
|
|
128
|
+
get viewFollow(): boolean;
|
|
129
|
+
/**
|
|
130
|
+
* 设置跟踪的object物体,如果参数为模型则需遵循以下要求:模型的前进方向为X正半轴,且按+Y UP导出
|
|
131
|
+
* @param {Object3D} value 传入threejs的Object对象
|
|
132
|
+
*/
|
|
133
|
+
set object(value: Object3D);
|
|
134
|
+
get object(): Object3D;
|
|
135
|
+
curvePath: any;
|
|
136
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
export namespace VIEW_MODEL_MAP {
|
|
2
|
+
let FOLLOW: string;
|
|
3
|
+
let LOCK: string;
|
|
4
|
+
let UNLOCK: string;
|
|
5
|
+
let KEYFRAME: string;
|
|
6
|
+
let ACTIVEFRAME: string;
|
|
7
|
+
}
|
|
8
|
+
export namespace Easing {
|
|
9
|
+
function linear(t: any): any;
|
|
10
|
+
function easeInQuad(t: any): number;
|
|
11
|
+
function easeOutQuad(t: any): number;
|
|
12
|
+
function easeInOutQuad(t: any): number;
|
|
13
|
+
}
|
|
14
|
+
export class TrackerAbstract {
|
|
15
|
+
constructor(options?: {});
|
|
16
|
+
/** @private */ private _isRunning;
|
|
17
|
+
/** @private */ private _isPause;
|
|
18
|
+
/** @private */ private _pauseTime;
|
|
19
|
+
/** @private */ private _pauseTimestamp;
|
|
20
|
+
/** @private */ private _animationStartTime;
|
|
21
|
+
/** @private */ private _animationDuration;
|
|
22
|
+
/** @private */ private _animationTransform;
|
|
23
|
+
/** @private */ private _animationCurrenState;
|
|
24
|
+
/** @private */ private _track;
|
|
25
|
+
/** @private */ private _frameInfo;
|
|
26
|
+
/** @public */ public onStart: null;
|
|
27
|
+
/** @public */ public onFinish: null;
|
|
28
|
+
/** @public */ public onUpdate: null;
|
|
29
|
+
_debug: boolean;
|
|
30
|
+
_trackPoint: null;
|
|
31
|
+
_trackLists: any[];
|
|
32
|
+
_lockView: boolean;
|
|
33
|
+
_viewFollow: boolean;
|
|
34
|
+
_easingFn: (t: any) => any;
|
|
35
|
+
_currentEasingFn: (t: any) => any;
|
|
36
|
+
_resolveEasing(easing: any): any;
|
|
37
|
+
afterAddToEngine(engine: any): void;
|
|
38
|
+
_engine: any;
|
|
39
|
+
/**
|
|
40
|
+
* 根据百分比更新位置的核心方法
|
|
41
|
+
* 子类需要重写此方法来实现具体的插值逻辑
|
|
42
|
+
* @param {number} ratio 进度比例 (0-1)
|
|
43
|
+
* @returns {Object} 更新后的状态
|
|
44
|
+
*/
|
|
45
|
+
updatePositionByPercentage(ratio: number): Object;
|
|
46
|
+
start(options?: {}): void;
|
|
47
|
+
/**
|
|
48
|
+
* 暂停动画
|
|
49
|
+
* @returns 当前状态
|
|
50
|
+
*/
|
|
51
|
+
pause(): null;
|
|
52
|
+
/**
|
|
53
|
+
* 停止动画
|
|
54
|
+
*/
|
|
55
|
+
stop(): void;
|
|
56
|
+
_arcInfo: {} | undefined;
|
|
57
|
+
/**
|
|
58
|
+
* 更新动画状态
|
|
59
|
+
*/
|
|
60
|
+
update: () => void;
|
|
61
|
+
updateObject(animationState: any): void;
|
|
62
|
+
updateCamera(animationState: any): void;
|
|
63
|
+
_updateDebug(point: any): void;
|
|
64
|
+
distanceToZoom(distance: any): any;
|
|
65
|
+
_computeCameraMatrixBlank(position: any, hpr: any): void;
|
|
66
|
+
_computeCameraMatrix(position: any, hpr: any): void;
|
|
67
|
+
set viewMode(value: any);
|
|
68
|
+
get viewMode(): any;
|
|
69
|
+
_viewMode: any;
|
|
70
|
+
set lockView(value: boolean);
|
|
71
|
+
get lockView(): boolean;
|
|
72
|
+
set viewFollow(value: boolean);
|
|
73
|
+
get viewFollow(): boolean;
|
|
74
|
+
/**
|
|
75
|
+
* 获取当前状态
|
|
76
|
+
*/
|
|
77
|
+
get currentState(): null;
|
|
78
|
+
/**
|
|
79
|
+
* 获取是否正在运行
|
|
80
|
+
*/
|
|
81
|
+
get isRunning(): boolean;
|
|
82
|
+
/**
|
|
83
|
+
* 获取是否暂停
|
|
84
|
+
*/
|
|
85
|
+
get isPaused(): boolean;
|
|
86
|
+
set object(value: any);
|
|
87
|
+
get object(): any;
|
|
88
|
+
_object: any;
|
|
89
|
+
}
|
|
@@ -74,18 +74,11 @@ export class CircleEditor extends Editor {
|
|
|
74
74
|
private adjustRadius;
|
|
75
75
|
dispose(): void;
|
|
76
76
|
/** @private */
|
|
77
|
-
private clearObjects;
|
|
78
|
-
/** @private */
|
|
79
77
|
private overwriteNodes;
|
|
80
78
|
_getProperties(attributes: any): {
|
|
81
79
|
scale: any;
|
|
82
80
|
size: any;
|
|
83
81
|
};
|
|
84
82
|
_vertex: any;
|
|
85
|
-
set data(value: any);
|
|
86
|
-
/**
|
|
87
|
-
* 绘制的圆形的数据信息
|
|
88
|
-
*/
|
|
89
|
-
get data(): any;
|
|
90
83
|
}
|
|
91
84
|
import { Editor } from './Editor';
|