earthsdk3 3.7.0-beta.14 → 3.7.0-beta.16
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/earthsdk3.iife.js +16 -16
- package/dist/earthsdk3.js +434 -429
- package/dist/earthsdk3.umd.cjs +6 -6
- package/dist/types/ESJTypes/ScreenManager/index.d.ts +2 -1
- package/dist/types/ESJTypes/properties/Viewer.d.ts +8 -0
- package/dist/types/ESObjectManager/index.d.ts +8 -4
- package/dist/types/ESObjects/general/ES3DTileset/index.d.ts +4 -0
- package/dist/types/ESObjects/general/ESPipeserTileset.d.ts +1 -0
- package/dist/types/ESObjects/general/ESRtsFeatureEditing/index.d.ts +1 -0
- package/dist/types/ESObjects/general/ESRtsTileset/index.d.ts +1 -0
- package/dist/types/utils/geoPolylineToBezierSpline/bezierSpline/lib/spline.d.ts +62 -0
- package/dist/types/xbsj-base/xr-utils/gif/gifuct-js/index.d.ts +101 -0
- package/package.json +2 -2
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ESJVector3D } from "../properties";
|
|
2
2
|
import { ESEntityClusterStyle } from "../../ESObjects";
|
|
3
3
|
import { SceneObjectKey } from "../../xbsj-base";
|
|
4
|
+
import * as Cesium from "cesium";
|
|
4
5
|
export type ESJScreenLayerInfo = {
|
|
5
6
|
layer: string;
|
|
6
7
|
id: SceneObjectKey;
|
|
@@ -8,7 +9,7 @@ export type ESJScreenLayerInfo = {
|
|
|
8
9
|
};
|
|
9
10
|
export type ESJScreenObjectInfo = {
|
|
10
11
|
index?: number | string;
|
|
11
|
-
position: ESJVector3D;
|
|
12
|
+
position: ESJVector3D | Cesium.Cartesian3;
|
|
12
13
|
name?: string;
|
|
13
14
|
zOrder?: number;
|
|
14
15
|
properties?: any;
|
|
@@ -27,6 +27,7 @@ export type ESJSwitchToCesiumViewerOptionType = {
|
|
|
27
27
|
* @property {boolean} [attributeSync] - 是否同步属性,可选参数
|
|
28
28
|
* @property {boolean} [destroy] - 是否销毁,可选参数
|
|
29
29
|
* @property {string} [id] - 视口的ID,可选参数
|
|
30
|
+
* @property {number} [silentTime] - 静默时间(s),可选参数
|
|
30
31
|
*/
|
|
31
32
|
export type ESJSwitchToUEViewerUrlOptionType = {
|
|
32
33
|
container: HTMLDivElement | string;
|
|
@@ -37,6 +38,7 @@ export type ESJSwitchToUEViewerUrlOptionType = {
|
|
|
37
38
|
attributeSync?: boolean;
|
|
38
39
|
destroy?: boolean;
|
|
39
40
|
id?: string;
|
|
41
|
+
silentTime?: number;
|
|
40
42
|
};
|
|
41
43
|
/**
|
|
42
44
|
* 切换到UE HTML5视口的选项类型
|
|
@@ -66,6 +68,7 @@ export type ESJSwitchToUEViewerH5OptionType = {
|
|
|
66
68
|
* @property {boolean} [attributeSync] - 是否同步属性,可选参数
|
|
67
69
|
* @property {boolean} [destroy] - 是否销毁,可选参数
|
|
68
70
|
* @property {string} [id] - 视口的ID,可选参数
|
|
71
|
+
* @property {number} [silentTime] - 静默时间(s),可选参数
|
|
69
72
|
*/
|
|
70
73
|
export type ESJSwitchToUEViewerWsOptionType = {
|
|
71
74
|
container: HTMLDivElement | string;
|
|
@@ -75,6 +78,7 @@ export type ESJSwitchToUEViewerWsOptionType = {
|
|
|
75
78
|
attributeSync?: boolean;
|
|
76
79
|
destroy?: boolean;
|
|
77
80
|
id?: string;
|
|
81
|
+
silentTime?: number;
|
|
78
82
|
};
|
|
79
83
|
/**
|
|
80
84
|
* 切换到UE视口的选项类型,包含URL、WebSocket和HTML5三种方式
|
|
@@ -102,6 +106,7 @@ type ESVOption = {
|
|
|
102
106
|
* @property {string} options.uri - UE应用的URI
|
|
103
107
|
* @property {string} options.app - 应用名称
|
|
104
108
|
* @property {string} [options.token] - 访问令牌,可选参数
|
|
109
|
+
* @property {number} [options.silentTime] - 静默时间(s),可选参数
|
|
105
110
|
*/
|
|
106
111
|
export type ESVOptionUeUri = {
|
|
107
112
|
type: 'ESUeViewer';
|
|
@@ -111,6 +116,7 @@ export type ESVOptionUeUri = {
|
|
|
111
116
|
uri: string;
|
|
112
117
|
app: string;
|
|
113
118
|
token?: string;
|
|
119
|
+
silentTime?: number;
|
|
114
120
|
};
|
|
115
121
|
};
|
|
116
122
|
/**
|
|
@@ -122,6 +128,7 @@ export type ESVOptionUeUri = {
|
|
|
122
128
|
* @property {string} options.ws - WebSocket地址
|
|
123
129
|
* @property {string} [options.esmsg] - 消息内容,可选参数
|
|
124
130
|
* @property {boolean} [options.uselnternalSignallingServer] - 是否使用内部信令服务器,可选参数
|
|
131
|
+
* @property {number} [options.silentTime] - 静默时间(s),可选参数
|
|
125
132
|
*/
|
|
126
133
|
export type ESVOptionUeWs = {
|
|
127
134
|
type: 'ESUeViewer';
|
|
@@ -131,6 +138,7 @@ export type ESVOptionUeWs = {
|
|
|
131
138
|
ws: string;
|
|
132
139
|
esmsg?: string;
|
|
133
140
|
uselnternalSignallingServer?: boolean;
|
|
141
|
+
silentTime?: number;
|
|
134
142
|
};
|
|
135
143
|
};
|
|
136
144
|
/**
|
|
@@ -315,9 +315,10 @@ export declare class ESObjectsManager extends Destroyable {
|
|
|
315
315
|
* @param attributeSync - 是否同步属性,默认为 true。
|
|
316
316
|
* @param destroy - 是否销毁当前活动视口,默认为 true。
|
|
317
317
|
* @param id - 视口的 ID,可选。
|
|
318
|
+
* @param silentTime - 静默时间(s),可选。
|
|
318
319
|
* @returns 切换后的视口。
|
|
319
320
|
*/
|
|
320
|
-
switchToUEViewer<T extends ESViewer>(container: HTMLDivElement | string, uri: string, app: string, token?: string, viewSync?: boolean, attributeSync?: boolean, destroy?: boolean, id?: string): T;
|
|
321
|
+
switchToUEViewer<T extends ESViewer>(container: HTMLDivElement | string, uri: string, app: string, token?: string, viewSync?: boolean, attributeSync?: boolean, destroy?: boolean, id?: string, silentTime?: number): T;
|
|
321
322
|
/**
|
|
322
323
|
* 切换到 UE 视口。
|
|
323
324
|
* @param container - 视口容器,可以是 HTML 元素或字符串。
|
|
@@ -327,9 +328,10 @@ export declare class ESObjectsManager extends Destroyable {
|
|
|
327
328
|
* @param attributeSync - 是否同步属性,默认为 true。
|
|
328
329
|
* @param destroy - 是否销毁当前活动视口,默认为 true。
|
|
329
330
|
* @param id - 视口的 ID,可选。
|
|
331
|
+
* @param silentTime - 静默时间(s),可选。
|
|
330
332
|
* @returns 切换后的视口。
|
|
331
333
|
*/
|
|
332
|
-
switchToUEViewer<T extends ESViewer>(container: HTMLDivElement | string, ws: string, esmsg?: string, viewSync?: boolean, attributeSync?: boolean, destroy?: boolean, id?: string): T;
|
|
334
|
+
switchToUEViewer<T extends ESViewer>(container: HTMLDivElement | string, ws: string, esmsg?: string, viewSync?: boolean, attributeSync?: boolean, destroy?: boolean, id?: string, silentTime?: number): T;
|
|
333
335
|
/**
|
|
334
336
|
* 切换到 UE 视口。
|
|
335
337
|
* @param container - 视口容器,可以是 HTML 元素或字符串。
|
|
@@ -387,18 +389,20 @@ export declare class ESObjectsManager extends Destroyable {
|
|
|
387
389
|
* @param app - 应用程序名称。
|
|
388
390
|
* @param token - 令牌,可选。
|
|
389
391
|
* @param id - 视口的 ID,可选。
|
|
392
|
+
* @param silentTime - 静默时间(s),可选。
|
|
390
393
|
* @returns 创建的视口。
|
|
391
394
|
*/
|
|
392
|
-
createUeViewer<T extends ESViewer>(container: HTMLDivElement | string, uri: string, app: string, token?: string, id?: string): T;
|
|
395
|
+
createUeViewer<T extends ESViewer>(container: HTMLDivElement | string, uri: string, app: string, token?: string, id?: string, silentTime?: number): T;
|
|
393
396
|
/**
|
|
394
397
|
* 创建 UE 视口。
|
|
395
398
|
* @param container - 视口容器,可以是 HTML 元素或字符串。
|
|
396
399
|
* @param ws - WebSocket 地址。
|
|
397
400
|
* @param esmsg - 消息,可选。
|
|
398
401
|
* @param id - 视口的 ID,可选。
|
|
402
|
+
* @param silentTime - 静默时间(s),可选。
|
|
399
403
|
* @returns 创建的视口。
|
|
400
404
|
*/
|
|
401
|
-
createUeViewer<T extends ESViewer>(container: HTMLDivElement | string, ws: string, esmsg?: string, id?: string): T;
|
|
405
|
+
createUeViewer<T extends ESViewer>(container: HTMLDivElement | string, ws: string, esmsg?: string, id?: string, silentTime?: number): T;
|
|
402
406
|
/**
|
|
403
407
|
* 创建 UE 视口。
|
|
404
408
|
* @param container - 视口容器,可以是 HTML 元素或字符串。
|
|
@@ -162,6 +162,10 @@ export declare class ES3DTileset extends ESVisualObject {
|
|
|
162
162
|
featureIdLabel: number;
|
|
163
163
|
/** 分割方向 */
|
|
164
164
|
splitDirection: ESJSplitDirectionType;
|
|
165
|
+
/**
|
|
166
|
+
* 调试线框模式,仅Cesium引擎生效
|
|
167
|
+
*/
|
|
168
|
+
czmDebugWireframe: boolean;
|
|
165
169
|
show: boolean;
|
|
166
170
|
collision: boolean;
|
|
167
171
|
flyToParam: import("../../../index").ReactiveVariable<import("../../../index").ESJFlyToParam | undefined>;
|
|
@@ -60,6 +60,7 @@ export declare class ESPipeserTileset extends ES3DTileset {
|
|
|
60
60
|
materialOverrideMap: import("../../xbsj-base").ReactiveVariable<{} | undefined>;
|
|
61
61
|
featureIdLabel: number;
|
|
62
62
|
splitDirection: import(".").ESJSplitDirectionType;
|
|
63
|
+
czmDebugWireframe: boolean;
|
|
63
64
|
show: boolean;
|
|
64
65
|
collision: boolean;
|
|
65
66
|
flyToParam: import("../../xbsj-base").ReactiveVariable<import("../../ESJTypes").ESJFlyToParam | undefined>;
|
|
@@ -68,6 +68,7 @@ export declare class ESRtsFeatureEditing extends ES3DTileset {
|
|
|
68
68
|
materialOverrideMap: import("../../../xbsj-base").ReactiveVariable<{} | undefined>;
|
|
69
69
|
featureIdLabel: number;
|
|
70
70
|
splitDirection: import("..").ESJSplitDirectionType;
|
|
71
|
+
czmDebugWireframe: boolean;
|
|
71
72
|
show: boolean;
|
|
72
73
|
collision: boolean;
|
|
73
74
|
flyToParam: import("../../../xbsj-base").ReactiveVariable<import("../../..").ESJFlyToParam | undefined>;
|
|
@@ -59,6 +59,7 @@ export declare class ESRtsTileset extends ES3DTileset {
|
|
|
59
59
|
materialOverrideMap: import("../../../xbsj-base").ReactiveVariable<{} | undefined>;
|
|
60
60
|
featureIdLabel: number;
|
|
61
61
|
splitDirection: import("..").ESJSplitDirectionType;
|
|
62
|
+
czmDebugWireframe: boolean;
|
|
62
63
|
show: boolean;
|
|
63
64
|
collision: boolean;
|
|
64
65
|
flyToParam: import("../../../xbsj-base").ReactiveVariable<import("../../../ESJTypes").ESJFlyToParam | undefined>;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
export interface Point {
|
|
2
|
+
x: number;
|
|
3
|
+
y: number;
|
|
4
|
+
z: number;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* BezierSpline
|
|
8
|
+
* https://github.com/leszekr/bezier-spline-js
|
|
9
|
+
*
|
|
10
|
+
* @private
|
|
11
|
+
* @copyright
|
|
12
|
+
* Copyright (c) 2013 Leszek Rybicki
|
|
13
|
+
*
|
|
14
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
15
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
16
|
+
* in the Software without restriction, including without limitation the rights
|
|
17
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
18
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
19
|
+
* furnished to do so, subject to the following conditions:
|
|
20
|
+
*
|
|
21
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
22
|
+
* copies or substantial portions of the Software.
|
|
23
|
+
*
|
|
24
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
25
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
26
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
27
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
28
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
29
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
30
|
+
* SOFTWARE.
|
|
31
|
+
*/
|
|
32
|
+
export default class Spline {
|
|
33
|
+
duration: number;
|
|
34
|
+
points: Point[];
|
|
35
|
+
sharpness: number;
|
|
36
|
+
centers: Point[];
|
|
37
|
+
controls: Array<[Point, Point]>;
|
|
38
|
+
stepLength: number;
|
|
39
|
+
length: number;
|
|
40
|
+
delay: number;
|
|
41
|
+
steps: number[];
|
|
42
|
+
constructor(options?: any);
|
|
43
|
+
/**
|
|
44
|
+
* Caches an array of equidistant (more or less) points on the curve.
|
|
45
|
+
*/
|
|
46
|
+
cacheSteps(mindist: number): number[];
|
|
47
|
+
/**
|
|
48
|
+
* returns angle and speed in the given point in the curve
|
|
49
|
+
*/
|
|
50
|
+
vector(t: number): {
|
|
51
|
+
angle: number;
|
|
52
|
+
speed: number;
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* Gets the position of the point, given time.
|
|
56
|
+
*
|
|
57
|
+
* WARNING: The speed is not constant. The time it takes between control points is constant.
|
|
58
|
+
*
|
|
59
|
+
* For constant speed, use Spline.steps[i];
|
|
60
|
+
*/
|
|
61
|
+
pos(time: number): Point;
|
|
62
|
+
}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
type Application = {
|
|
2
|
+
application: {
|
|
3
|
+
blockSize: number
|
|
4
|
+
blocks: number[]
|
|
5
|
+
codes: number[]
|
|
6
|
+
id: string
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
type Frame = {
|
|
11
|
+
gce: {
|
|
12
|
+
byteSize: number
|
|
13
|
+
codes: number[]
|
|
14
|
+
delay: number
|
|
15
|
+
terminator: number
|
|
16
|
+
transparentColorIndex: number
|
|
17
|
+
extras: {
|
|
18
|
+
userInput: boolean
|
|
19
|
+
transparentColorGiven: boolean
|
|
20
|
+
future: number
|
|
21
|
+
disposal: number
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
image: {
|
|
25
|
+
code: number
|
|
26
|
+
data: {
|
|
27
|
+
minCodeSize: number
|
|
28
|
+
blocks: number[]
|
|
29
|
+
}
|
|
30
|
+
descriptor: {
|
|
31
|
+
top: number
|
|
32
|
+
left: number
|
|
33
|
+
width: number
|
|
34
|
+
height: number
|
|
35
|
+
lct: {
|
|
36
|
+
exists: boolean
|
|
37
|
+
future: number
|
|
38
|
+
interlaced: boolean
|
|
39
|
+
size: number
|
|
40
|
+
sort: boolean
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export type ParsedGif = {
|
|
47
|
+
frames: (Application | Frame)[]
|
|
48
|
+
gct: [number, number, number][]
|
|
49
|
+
header: {
|
|
50
|
+
signature: string
|
|
51
|
+
version: string
|
|
52
|
+
}
|
|
53
|
+
lsd: {
|
|
54
|
+
backgroundColorIndex: number
|
|
55
|
+
gct: {
|
|
56
|
+
exists: boolean
|
|
57
|
+
resolution: number
|
|
58
|
+
size: number
|
|
59
|
+
sort: boolean
|
|
60
|
+
}
|
|
61
|
+
height: number
|
|
62
|
+
width: number
|
|
63
|
+
pixelAspectRatio: number
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export type ParsedFrame = {
|
|
68
|
+
dims: { width: number; height: number; top: number; left: number }
|
|
69
|
+
colorTable: [number, number, number][]
|
|
70
|
+
delay: number
|
|
71
|
+
disposalType: number
|
|
72
|
+
patch: Uint8ClampedArray
|
|
73
|
+
pixels: number[]
|
|
74
|
+
transparentIndex: number
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export type ParsedFrameWithoutPatch = Omit<ParsedFrame, 'patch'>
|
|
78
|
+
|
|
79
|
+
export function parseGIF(arrayBuffer: ArrayBuffer): ParsedGif
|
|
80
|
+
|
|
81
|
+
export function decompressFrames(
|
|
82
|
+
parsedGif: ParsedGif,
|
|
83
|
+
buildImagePatches: true
|
|
84
|
+
): ParsedFrame[]
|
|
85
|
+
|
|
86
|
+
export function decompressFrames(
|
|
87
|
+
parsedGif: ParsedGif,
|
|
88
|
+
buildImagePatches: false
|
|
89
|
+
): ParsedFrameWithoutPatch[]
|
|
90
|
+
|
|
91
|
+
export function decompressFrame(
|
|
92
|
+
frame: Frame,
|
|
93
|
+
gct: [number, number, number][],
|
|
94
|
+
buildImagePatches: true
|
|
95
|
+
): ParsedFrame
|
|
96
|
+
|
|
97
|
+
export function decompressFrame(
|
|
98
|
+
frame: Frame,
|
|
99
|
+
gct: [number, number, number][],
|
|
100
|
+
buildImagePatches: false
|
|
101
|
+
): ParsedFrameWithoutPatch
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "earthsdk3",
|
|
3
|
-
"version": "3.7.0-beta.
|
|
3
|
+
"version": "3.7.0-beta.16",
|
|
4
4
|
"description": "地球可视化实验室 (EarthSDK&CesiumLab) https://www.bjxbsj.cn",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/earthsdk3.umd.cjs",
|
|
@@ -53,4 +53,4 @@
|
|
|
53
53
|
"types": "./dist/types/index.d.ts",
|
|
54
54
|
"import": "./dist/earthsdk3.js"
|
|
55
55
|
}
|
|
56
|
-
}
|
|
56
|
+
}
|