vis-core 0.29.13 → 0.30.0-beta.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/index.d.ts +1 -1
- package/dist/index.js +75 -75
- package/dist/index.module.js +17317 -17468
- package/dist/version.d.ts +1 -1
- package/dist/vis/base/index.d.ts +3 -5
- package/dist/vis/city/index.d.ts +8 -26
- package/dist/vis/city/objects/area/index.d.ts +2 -7
- package/dist/vis/city/objects/building/index.d.ts +1 -7
- package/dist/vis/city/objects/road/index.d.ts +1 -5
- package/dist/vis/map/index.d.ts +7 -11
- package/dist/vis/map/objects/PlaneMap.d.ts +1 -1
- package/dist/vis/map/styles/map2/cityOnMap.d.ts +1 -1
- package/package.json +4 -4
- package/dist/utils/clipGeojson.d.ts +0 -5
- package/dist/utils/fasterUnion.d.ts +0 -3
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "0.
|
|
1
|
+
declare const _default: "0.30.0-beta.2";
|
|
2
2
|
export default _default;
|
package/dist/vis/base/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import leadObjs from "../all/objects";
|
|
2
|
-
import Arc from "../all/objects/Arc";
|
|
3
|
-
import Pencil, { BaseObject, Lead } from 'gl-draw';
|
|
2
|
+
import type Arc from "../all/objects/Arc";
|
|
3
|
+
import Pencil, { type BaseObject, type Lead } from 'gl-draw';
|
|
4
4
|
import type { PickFunctionsItem } from 'gl-draw/dist/core/Lead/Pick';
|
|
5
|
-
import { Line, Node } from 'gl-draw/dist/objects';
|
|
5
|
+
import type { Line, Node } from 'gl-draw/dist/objects';
|
|
6
6
|
import { Wk } from 'gl-draw/dist/plugins';
|
|
7
7
|
import * as THREE from 'three';
|
|
8
8
|
import { RoomEnvironment } from 'three/examples/jsm/environments/RoomEnvironment';
|
|
@@ -12,7 +12,6 @@ export interface BaseOptions {
|
|
|
12
12
|
container: HTMLElement;
|
|
13
13
|
assetsPrefix?: string;
|
|
14
14
|
css2DContainer?: HTMLElement;
|
|
15
|
-
workerOnce?: boolean;
|
|
16
15
|
pencil?: any;
|
|
17
16
|
pencil2?: any;
|
|
18
17
|
pencilConfig?: Record<string, any>;
|
|
@@ -66,7 +65,6 @@ export default class Base extends Camera {
|
|
|
66
65
|
mList: Pencil['mList'];
|
|
67
66
|
get loader(): import("gl-draw/dist/core/Loader/Loader").default;
|
|
68
67
|
get worker(): Wk;
|
|
69
|
-
workerOnce: boolean;
|
|
70
68
|
tier0: boolean;
|
|
71
69
|
pmremGenerator: THREE.PMREMGenerator | null;
|
|
72
70
|
re: RoomEnvironment | null;
|
package/dist/vis/city/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import Base, { BaseOptions } from "../base";
|
|
1
|
+
import Base, { type BaseOptions } from "../base";
|
|
2
2
|
import leadObjs from "./objects";
|
|
3
|
-
import { BaseObject, Lead } from 'gl-draw';
|
|
4
|
-
import { Group } from 'gl-draw/dist/objects';
|
|
3
|
+
import { type BaseObject, type Lead } from 'gl-draw';
|
|
4
|
+
import { type Group } from 'gl-draw/dist/objects';
|
|
5
5
|
import { getProjection } from 'gl-draw/dist/utils';
|
|
6
6
|
import * as THREE from 'three';
|
|
7
|
-
import Building from './objects/building';
|
|
8
|
-
import Road from './objects/road';
|
|
7
|
+
import type Building from './objects/building';
|
|
8
|
+
import type Road from './objects/road';
|
|
9
9
|
interface CityOptions extends BaseOptions {
|
|
10
10
|
adcode: number;
|
|
11
11
|
jsonName: string;
|
|
@@ -18,14 +18,9 @@ interface CityOptions extends BaseOptions {
|
|
|
18
18
|
};
|
|
19
19
|
plane?: boolean;
|
|
20
20
|
grey?: boolean;
|
|
21
|
-
greyFull?: boolean;
|
|
22
|
-
clip?: {
|
|
23
|
-
features: any[];
|
|
24
|
-
};
|
|
25
|
-
clipOutShow?: boolean;
|
|
26
|
-
planeOut?: boolean;
|
|
27
21
|
showBuilding?: boolean;
|
|
28
22
|
buildingSideGradient?: boolean;
|
|
23
|
+
buildingHasSide?: boolean;
|
|
29
24
|
showRoad?: boolean;
|
|
30
25
|
showGrassland?: boolean;
|
|
31
26
|
showRiver?: boolean;
|
|
@@ -76,10 +71,9 @@ export default class extends Base {
|
|
|
76
71
|
projection: ReturnType<typeof getProjection>;
|
|
77
72
|
options: CityOptions;
|
|
78
73
|
group: Group;
|
|
74
|
+
outAreaGroup: Group;
|
|
79
75
|
building: Building;
|
|
80
76
|
road: Road;
|
|
81
|
-
innerAreaGroup: Group;
|
|
82
|
-
outAreaGroup: Group;
|
|
83
77
|
setOptions(options: CityOptions): void;
|
|
84
78
|
multiplyScalar: number;
|
|
85
79
|
loaderAdd(): void;
|
|
@@ -91,18 +85,14 @@ export default class extends Base {
|
|
|
91
85
|
getInvert(vector3: THREE.Vector3): any;
|
|
92
86
|
fitTo(obj: BaseObject, enableTransition?: boolean): Promise<void>;
|
|
93
87
|
initVis(): Promise<void>;
|
|
94
|
-
fitToTarget(adcode: number, lnglat?: [number, number]): Promise<void>;
|
|
95
88
|
drawBuilding(options?: {
|
|
96
89
|
json?: {
|
|
97
90
|
features: any[];
|
|
98
91
|
};
|
|
99
92
|
meters?: number;
|
|
100
|
-
clip?: {
|
|
101
|
-
features: any[];
|
|
102
|
-
};
|
|
103
93
|
grey?: boolean;
|
|
104
94
|
sideGradient?: boolean;
|
|
105
|
-
|
|
95
|
+
hasSide?: boolean;
|
|
106
96
|
}): Promise<Building | undefined>;
|
|
107
97
|
drawArea(options?: {
|
|
108
98
|
json?: {
|
|
@@ -110,11 +100,7 @@ export default class extends Base {
|
|
|
110
100
|
};
|
|
111
101
|
type?: 'river' | 'grassland';
|
|
112
102
|
oArr?: number[];
|
|
113
|
-
clip?: {
|
|
114
|
-
features: any[];
|
|
115
|
-
};
|
|
116
103
|
grey?: boolean;
|
|
117
|
-
group?: Group;
|
|
118
104
|
}): Promise<import("./objects/area").default | undefined>;
|
|
119
105
|
drawRoad(options?: {
|
|
120
106
|
json?: {
|
|
@@ -122,11 +108,7 @@ export default class extends Base {
|
|
|
122
108
|
};
|
|
123
109
|
meters?: number;
|
|
124
110
|
z?: number;
|
|
125
|
-
clip?: {
|
|
126
|
-
features: any[];
|
|
127
|
-
};
|
|
128
111
|
grey?: boolean;
|
|
129
|
-
group?: Group;
|
|
130
112
|
}): Promise<Road | undefined>;
|
|
131
113
|
getWorldPosition(longitude: number, latitude: number): {
|
|
132
114
|
x: any;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BaseObject } from 'gl-draw';
|
|
2
|
-
import { ExtrudePolygon } from 'gl-draw/dist/objects';
|
|
3
|
-
import * as THREE from 'three';
|
|
2
|
+
import type { ExtrudePolygon } from 'gl-draw/dist/objects';
|
|
3
|
+
import type * as THREE from 'three';
|
|
4
4
|
interface Options {
|
|
5
5
|
json: {
|
|
6
6
|
features: any[];
|
|
@@ -13,16 +13,11 @@ interface Options {
|
|
|
13
13
|
type: string;
|
|
14
14
|
cacheKey?: string;
|
|
15
15
|
oArr?: number[];
|
|
16
|
-
clip?: {
|
|
17
|
-
features: any[];
|
|
18
|
-
};
|
|
19
16
|
}
|
|
20
17
|
export default class extends BaseObject {
|
|
21
18
|
options: Options;
|
|
22
19
|
area: ExtrudePolygon[];
|
|
23
20
|
constructor(options: Options);
|
|
24
|
-
outJson: Map<any, any>;
|
|
25
21
|
create(): Promise<void>;
|
|
26
|
-
dispose(): void;
|
|
27
22
|
}
|
|
28
23
|
export {};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { BaseObject } from 'gl-draw';
|
|
2
|
-
import { ExtrudePolygon } from 'gl-draw/dist/objects';
|
|
3
2
|
import * as THREE from 'three';
|
|
4
3
|
interface Options {
|
|
5
4
|
json: {
|
|
@@ -12,23 +11,18 @@ interface Options {
|
|
|
12
11
|
cacheKey?: string;
|
|
13
12
|
material?: THREE.Material | THREE.Material[];
|
|
14
13
|
meters?: number;
|
|
14
|
+
hasSide?: boolean;
|
|
15
15
|
sideGradient?: boolean;
|
|
16
16
|
grey?: boolean;
|
|
17
|
-
clip?: {
|
|
18
|
-
features: any[];
|
|
19
|
-
};
|
|
20
17
|
}
|
|
21
18
|
export default class extends BaseObject {
|
|
22
19
|
options: Options;
|
|
23
20
|
constructor(options: Options);
|
|
24
|
-
building: Record<string, ExtrudePolygon[]>;
|
|
25
|
-
outJson: Map<any, any>;
|
|
26
21
|
create(): Promise<void>;
|
|
27
22
|
worldPositionZ: {
|
|
28
23
|
value: number;
|
|
29
24
|
};
|
|
30
25
|
sideGradient(color?: string, maxGradientHeight?: number): void;
|
|
31
26
|
update(): void;
|
|
32
|
-
dispose(): void;
|
|
33
27
|
}
|
|
34
28
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseObject } from 'gl-draw';
|
|
2
|
-
import { Line } from 'gl-draw/dist/objects';
|
|
2
|
+
import type { Line } from 'gl-draw/dist/objects';
|
|
3
3
|
interface Options {
|
|
4
4
|
json: {
|
|
5
5
|
features: any[];
|
|
@@ -11,14 +11,10 @@ interface Options {
|
|
|
11
11
|
cacheKey?: string;
|
|
12
12
|
meters?: number;
|
|
13
13
|
grey?: boolean;
|
|
14
|
-
clip?: {
|
|
15
|
-
features: any[];
|
|
16
|
-
};
|
|
17
14
|
}
|
|
18
15
|
export default class extends BaseObject {
|
|
19
16
|
options: Options;
|
|
20
17
|
constructor(options: Options);
|
|
21
|
-
outJson: Map<any, any>;
|
|
22
18
|
linePrimary: Line[];
|
|
23
19
|
lineSecondary: Line[];
|
|
24
20
|
create(): Promise<void>;
|
package/dist/vis/map/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { findAdcodeInfo } from "../all/json";
|
|
2
|
-
import Base, { BaseOptions } from "../base";
|
|
2
|
+
import Base, { type BaseOptions } from "../base";
|
|
3
3
|
import leadObjs from "./objects";
|
|
4
|
-
import ContinentsBg from "./objects/ContinentsBg";
|
|
5
|
-
import PlaneMap from "./objects/PlaneMap";
|
|
4
|
+
import type ContinentsBg from "./objects/ContinentsBg";
|
|
5
|
+
import type PlaneMap from "./objects/PlaneMap";
|
|
6
6
|
import type { FeatureCollection, MultiPolygon, Polygon } from 'geojson';
|
|
7
|
-
import { BaseObject, Lead } from 'gl-draw';
|
|
8
|
-
import { ExtrudePolygon, Group, Line, MeshLineMaterial } from 'gl-draw/dist/objects';
|
|
7
|
+
import { type BaseObject, type Lead } from 'gl-draw';
|
|
8
|
+
import { type ExtrudePolygon, type Group, Line, MeshLineMaterial } from 'gl-draw/dist/objects';
|
|
9
9
|
import { getProjection } from 'gl-draw/dist/utils';
|
|
10
10
|
import * as THREE from 'three';
|
|
11
11
|
import City from './city';
|
|
@@ -54,10 +54,9 @@ export interface MapOptions extends BaseOptions {
|
|
|
54
54
|
bottomPlaneWater?: boolean;
|
|
55
55
|
}
|
|
56
56
|
interface MapCityOptions extends MapOptions {
|
|
57
|
-
clipOutShow?: boolean;
|
|
58
57
|
jsonNameObj?: Record<number, string>;
|
|
59
58
|
cacheCity?: boolean;
|
|
60
|
-
|
|
59
|
+
nearbyCities?: boolean | 'full';
|
|
61
60
|
showBuilding?: boolean;
|
|
62
61
|
buildingSideGradient?: boolean;
|
|
63
62
|
showRoad?: boolean;
|
|
@@ -171,10 +170,7 @@ export default class extends Base {
|
|
|
171
170
|
initSettingsObj: Record<string, any>;
|
|
172
171
|
handleSetting(key: string, value: any): Promise<any>;
|
|
173
172
|
init(): Promise<void>;
|
|
174
|
-
initCityVis(adcode: number,
|
|
175
|
-
clip?: boolean;
|
|
176
|
-
grey?: boolean;
|
|
177
|
-
}): Promise<City>;
|
|
173
|
+
initCityVis(adcode: number, grey?: boolean): Promise<City>;
|
|
178
174
|
initCityOnMap(adcode: number): Promise<void>;
|
|
179
175
|
initVisBg(): Promise<void>;
|
|
180
176
|
initVis(adcode: number): Promise<void>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { FeatureCollection, GeoJsonProperties, MultiPolygon, Polygon, Position } from 'geojson';
|
|
2
2
|
import { BaseObject } from 'gl-draw';
|
|
3
|
-
import { ExtrudePolygon, Group, Line, MeshLineMaterial } from 'gl-draw/dist/objects';
|
|
3
|
+
import type { ExtrudePolygon, Group, Line, MeshLineMaterial } from 'gl-draw/dist/objects';
|
|
4
4
|
import * as THREE from 'three';
|
|
5
5
|
export type GeoJSON = FeatureCollection<Polygon | MultiPolygon>;
|
|
6
6
|
interface Options {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import Map from '../../index';
|
|
1
|
+
import type Map from '../../index';
|
|
2
2
|
export declare const cityOnMap: (map: Map) => void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vis-core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.30.0-beta.2",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"start": "npm run version && PORT=5173 bundler-dev",
|
|
6
6
|
"build:site": "npm run version && PUBLIC_EXCLUDE=true bundler",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"gzip": "node ./scripts/gzip",
|
|
12
12
|
"start:3dSite": "npm run version && VITE_SITE_3D=true bundler-dev",
|
|
13
13
|
"build:3dSite": "npm run version && VITE_SITE_3D=true bundler",
|
|
14
|
-
"pub": "npm publish"
|
|
14
|
+
"pub": "npm publish --tag beta"
|
|
15
15
|
},
|
|
16
16
|
"main": "dist/index.js",
|
|
17
17
|
"module": "dist/index.module.js",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"jszip": "^3.10.1",
|
|
49
49
|
"pinia": "^2.2.4",
|
|
50
50
|
"primeicons": "^7.0.0",
|
|
51
|
-
"primevue": "^4.
|
|
51
|
+
"primevue": "^4.4.1",
|
|
52
52
|
"tailwind-config-bundler": "^0.4.6",
|
|
53
53
|
"three": "^0.181.0",
|
|
54
54
|
"vite-plugin-javascript-obfuscator": "^3.1.0",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"esus-lite": "^0.2.8",
|
|
67
67
|
"events": "^3.3.0",
|
|
68
68
|
"geojson-cn": "^0.2.5",
|
|
69
|
-
"gl-draw": "0.
|
|
69
|
+
"gl-draw": "0.17.0-beta.12",
|
|
70
70
|
"jsrsasign": "^11.1.0",
|
|
71
71
|
"lodash-es": "^4.17.21"
|
|
72
72
|
},
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { union } from '@turf/turf';
|
|
2
|
-
declare const _default: (allGeometries: Parameters<typeof union>[0][]) => import("@turf/turf").Polygon | import("@turf/turf").MultiPolygon | import("@turf/turf").Feature<import("@turf/turf").Polygon | import("@turf/turf").MultiPolygon, import("@turf/turf").Properties> | null;
|
|
3
|
-
export default _default;
|