vis-core 0.12.37 → 0.13.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/dist/index.d.ts +1 -2
- package/dist/index.js +203 -203
- package/dist/index.module.js +6430 -6477
- package/dist/version.d.ts +1 -1
- package/dist/vis/index.d.ts +0 -1
- package/dist/vis/map/index.d.ts +9 -1
- package/dist/vis/map/mapWorld.d.ts +2 -0
- package/dist/vis/map/objects/PlaneMap.d.ts +7 -1
- package/dist/vis/map/objects/index.d.ts +2 -1
- package/package.json +1 -1
- package/dist/vis/map/world.d.ts +0 -53
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "0.
|
|
1
|
+
declare const _default: "0.13.0";
|
|
2
2
|
export default _default;
|
package/dist/vis/index.d.ts
CHANGED
package/dist/vis/map/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { BaseObject } from 'gl-draw';
|
|
|
2
2
|
import Base from "../Base";
|
|
3
3
|
import { getProjection } from 'gl-draw/dist/utils';
|
|
4
4
|
import type { FeatureCollection, Polygon, MultiPolygon } from 'geojson';
|
|
5
|
+
import { MeshLineMaterial } from 'gl-draw/dist/objects';
|
|
5
6
|
import * as THREE from 'three';
|
|
6
7
|
import { PlaneMap, Group, ContinentsBg } from "./objects";
|
|
7
8
|
import { LevelArr } from 'geojson-cn';
|
|
@@ -38,6 +39,7 @@ export interface MapOptions {
|
|
|
38
39
|
curvatureResolution?: number;
|
|
39
40
|
showOneLevel?: boolean;
|
|
40
41
|
handleBackKeepCamvasState?: boolean;
|
|
42
|
+
worldPacificCentre?: boolean;
|
|
41
43
|
}
|
|
42
44
|
export default class extends Base {
|
|
43
45
|
static VisName: string;
|
|
@@ -51,6 +53,7 @@ export default class extends Base {
|
|
|
51
53
|
Group: typeof Group;
|
|
52
54
|
Light: typeof import("./objects").Light;
|
|
53
55
|
PlaneShadow: typeof import("./objects/PlaneShadow").default;
|
|
56
|
+
ConicPolygon: typeof import("gl-draw/dist/objects").ConicPolygon;
|
|
54
57
|
}>;
|
|
55
58
|
options: Required<MapOptions>;
|
|
56
59
|
mapHistory: {
|
|
@@ -100,6 +103,11 @@ export default class extends Base {
|
|
|
100
103
|
loaderAdd(adcode: number): void;
|
|
101
104
|
initMaterial(adcode: number): Promise<void>;
|
|
102
105
|
setAreaColor(adcode: number, color: string): void;
|
|
106
|
+
addAreaPlaneByProperty(key: string, value: string, options?: {
|
|
107
|
+
material?: THREE.Material;
|
|
108
|
+
lineMaterial?: MeshLineMaterial;
|
|
109
|
+
curvatureResolution?: number;
|
|
110
|
+
}): void;
|
|
103
111
|
show(): Promise<void>;
|
|
104
112
|
hide(): Promise<void>;
|
|
105
113
|
shadowMapLight?: BaseObject;
|
|
@@ -148,7 +156,7 @@ export default class extends Base {
|
|
|
148
156
|
adcodes: number[];
|
|
149
157
|
duration?: number;
|
|
150
158
|
}): Promise<void>;
|
|
151
|
-
setPadding(padding: number[]): void;
|
|
159
|
+
setPadding(padding: number[], fitTo?: boolean): void;
|
|
152
160
|
dispose(): void;
|
|
153
161
|
}
|
|
154
162
|
export {};
|
|
@@ -32,7 +32,7 @@ interface Options {
|
|
|
32
32
|
bloom?: boolean;
|
|
33
33
|
}
|
|
34
34
|
export default class PlaneMap extends BaseObject {
|
|
35
|
-
options: Required<Omit<Options, 'bbox' | 'bboxOffset' | 'extrudeLineGeojson'
|
|
35
|
+
options: Required<Omit<Options, 'bbox' | 'bboxOffset' | 'extrudeLineGeojson'>> & Pick<Options, 'bbox' | 'bboxOffset' | 'extrudeLineGeojson'>;
|
|
36
36
|
isActive: boolean;
|
|
37
37
|
groupArr: Group[];
|
|
38
38
|
areaArr: ExtrudePolygon[];
|
|
@@ -49,6 +49,12 @@ export default class PlaneMap extends BaseObject {
|
|
|
49
49
|
hasSide?: boolean;
|
|
50
50
|
onTop?: number;
|
|
51
51
|
}): Promise<ExtrudePolygon[]>;
|
|
52
|
+
getPropertiesKey(properties: Record<string, any>): any;
|
|
53
|
+
addPlane(geojson: any, options: {
|
|
54
|
+
material: THREE.Material | THREE.Material[];
|
|
55
|
+
lineMaterial: MeshLineMaterial;
|
|
56
|
+
curvatureResolution?: number;
|
|
57
|
+
}): Promise<void[]>;
|
|
52
58
|
addLine(geojson: GeoJSON, options: {
|
|
53
59
|
material?: MeshLineMaterial;
|
|
54
60
|
onTop?: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Draw as DrawController } from 'gl-draw/dist/plugins';
|
|
2
|
-
import { Node, Image, Line, ExtrudePolygon, Group } from 'gl-draw/dist/objects';
|
|
2
|
+
import { Node, Image, Line, ExtrudePolygon, Group, ConicPolygon } from 'gl-draw/dist/objects';
|
|
3
3
|
import PlaneMap from './PlaneMap';
|
|
4
4
|
import ContinentsBg from './ContinentsBg';
|
|
5
5
|
import Light from "../../all/objects/Light";
|
|
@@ -15,5 +15,6 @@ declare const _default: DrawController<{
|
|
|
15
15
|
Group: typeof Group;
|
|
16
16
|
Light: typeof Light;
|
|
17
17
|
PlaneShadow: typeof PlaneShadow;
|
|
18
|
+
ConicPolygon: typeof ConicPolygon;
|
|
18
19
|
}>;
|
|
19
20
|
export default _default;
|
package/package.json
CHANGED
package/dist/vis/map/world.d.ts
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { BaseObject } from 'gl-draw';
|
|
2
|
-
import Base from "../Base";
|
|
3
|
-
import { getProjection } from 'gl-draw/dist/utils';
|
|
4
|
-
import { PlaneMap, Group } from "./objects";
|
|
5
|
-
interface MapOptions {
|
|
6
|
-
mapDepth?: number;
|
|
7
|
-
mapPadding?: number[];
|
|
8
|
-
bboxOffset?: number[];
|
|
9
|
-
lineWidth?: number;
|
|
10
|
-
assetsPrefix?: string;
|
|
11
|
-
equirectangular?: boolean;
|
|
12
|
-
}
|
|
13
|
-
export default class extends Base {
|
|
14
|
-
static VisName: string;
|
|
15
|
-
drawController: import("gl-draw/dist/plugins").Draw<{
|
|
16
|
-
Node: typeof import("gl-draw/dist/objects").Node;
|
|
17
|
-
Image: typeof import("gl-draw/dist/objects").Image;
|
|
18
|
-
Line: typeof import("gl-draw/dist/objects").Line;
|
|
19
|
-
PlaneMap: typeof PlaneMap;
|
|
20
|
-
ContinentsBg: typeof import("./objects").ContinentsBg;
|
|
21
|
-
ExtrudePolygon: typeof import("gl-draw/dist/objects").ExtrudePolygon;
|
|
22
|
-
Group: typeof Group;
|
|
23
|
-
Light: typeof import("./objects").Light;
|
|
24
|
-
PlaneShadow: typeof import("./objects/PlaneShadow").default;
|
|
25
|
-
}>;
|
|
26
|
-
options: Required<MapOptions>;
|
|
27
|
-
isAnimating: boolean;
|
|
28
|
-
world?: PlaneMap;
|
|
29
|
-
group: Group;
|
|
30
|
-
projection: ReturnType<typeof getProjection>;
|
|
31
|
-
pcenter: [number, number];
|
|
32
|
-
pscale: number;
|
|
33
|
-
meters: number;
|
|
34
|
-
extendsOptions: Record<string, any>;
|
|
35
|
-
constructor(container: HTMLElement, options?: MapOptions);
|
|
36
|
-
initSettingsObj: {
|
|
37
|
-
label: boolean;
|
|
38
|
-
};
|
|
39
|
-
handleSetting(key: string, value: any): Promise<any>;
|
|
40
|
-
drawLabels(): Promise<void>;
|
|
41
|
-
init(): Promise<void>;
|
|
42
|
-
initMap(): Promise<void>;
|
|
43
|
-
loaderAdd(): void;
|
|
44
|
-
initMaterial(): Promise<void>;
|
|
45
|
-
eraseLabels(): void;
|
|
46
|
-
fitTo(obj?: BaseObject, { polarAngle, enableTransition }?: {
|
|
47
|
-
polarAngle?: number | undefined;
|
|
48
|
-
enableTransition?: boolean | undefined;
|
|
49
|
-
}): Promise<void>;
|
|
50
|
-
paddingInCssPixel(obj: BaseObject, top: number, right: number, bottom: number, left: number, enableTransition: boolean): Promise<void[]>;
|
|
51
|
-
dispose(): void;
|
|
52
|
-
}
|
|
53
|
-
export {};
|