earthsdk3 3.7.0-beta.12 → 3.7.0-beta.13
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 +39 -39
- package/dist/earthsdk3.js +4408 -4166
- package/dist/earthsdk3.umd.cjs +32 -32
- package/dist/types/ESMCPTools/index.d.ts +1 -0
- package/dist/types/ESMCPTools/index.d.ts.map +1 -1
- package/dist/types/ESMCPTools/tools/getCameraTools.d.ts +5 -0
- package/dist/types/ESMCPTools/tools/getCameraTools.d.ts.map +1 -1
- package/dist/types/ESMCPTools/tools/getSceneObjectTools.d.ts +5 -0
- package/dist/types/ESMCPTools/tools/getSceneObjectTools.d.ts.map +1 -1
- 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 +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ESMCPTools/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ESMCPTools/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC"}
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import { ESObjectsManager } from "../../ESObjectManager";
|
|
2
2
|
import { Tool } from "../types";
|
|
3
|
+
/**
|
|
4
|
+
* 获取相机相关的mcp工具
|
|
5
|
+
* @param objm ESObjectsManager
|
|
6
|
+
* @returns { Tool[] }
|
|
7
|
+
*/
|
|
3
8
|
export declare const getCameraTools: (objm: ESObjectsManager) => Tool[];
|
|
4
9
|
//# sourceMappingURL=getCameraTools.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getCameraTools.d.ts","sourceRoot":"","sources":["../../../../src/ESMCPTools/tools/getCameraTools.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAEhC,eAAO,MAAM,cAAc,GAAI,MAAM,gBAAgB,KAAG,IAAI,EAoH3D,CAAC"}
|
|
1
|
+
{"version":3,"file":"getCameraTools.d.ts","sourceRoot":"","sources":["../../../../src/ESMCPTools/tools/getCameraTools.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAEhC;;;;GAIG;AACH,eAAO,MAAM,cAAc,GAAI,MAAM,gBAAgB,KAAG,IAAI,EAoH3D,CAAC"}
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import { ESObjectsManager } from "../../ESObjectManager";
|
|
2
2
|
import { Tool } from "../types";
|
|
3
|
+
/**
|
|
4
|
+
* 获取场景对象相关的mcp工具
|
|
5
|
+
* @param objm ESObjectsManager
|
|
6
|
+
* @returns {Tool[]}
|
|
7
|
+
*/
|
|
3
8
|
export declare const getSceneObjectTools: (objm: ESObjectsManager) => Tool[];
|
|
4
9
|
//# sourceMappingURL=getSceneObjectTools.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getSceneObjectTools.d.ts","sourceRoot":"","sources":["../../../../src/ESMCPTools/tools/getSceneObjectTools.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAEhC,eAAO,MAAM,mBAAmB,GAAI,MAAM,gBAAgB,KAAG,IAAI,EA+IhE,CAAC"}
|
|
1
|
+
{"version":3,"file":"getSceneObjectTools.d.ts","sourceRoot":"","sources":["../../../../src/ESMCPTools/tools/getSceneObjectTools.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAEhC;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,GAAI,MAAM,gBAAgB,KAAG,IAAI,EA+IhE,CAAC"}
|
|
@@ -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
|