vis-core 0.29.13 → 0.30.0-beta.1
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 +79 -79
- package/dist/index.module.js +18124 -18290
- package/dist/version.d.ts +1 -1
- package/dist/vis/base/index.d.ts +3 -5
- package/dist/vis/city/index.d.ts +6 -26
- package/dist/vis/city/objects/area/index.d.ts +2 -4
- package/dist/vis/city/objects/building/index.d.ts +0 -4
- package/dist/vis/city/objects/road/index.d.ts +1 -2
- 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.1";
|
|
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,12 +18,6 @@ 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;
|
|
29
23
|
showRoad?: boolean;
|
|
@@ -76,10 +70,9 @@ export default class extends Base {
|
|
|
76
70
|
projection: ReturnType<typeof getProjection>;
|
|
77
71
|
options: CityOptions;
|
|
78
72
|
group: Group;
|
|
73
|
+
outAreaGroup: Group;
|
|
79
74
|
building: Building;
|
|
80
75
|
road: Road;
|
|
81
|
-
innerAreaGroup: Group;
|
|
82
|
-
outAreaGroup: Group;
|
|
83
76
|
setOptions(options: CityOptions): void;
|
|
84
77
|
multiplyScalar: number;
|
|
85
78
|
loaderAdd(): void;
|
|
@@ -91,18 +84,13 @@ export default class extends Base {
|
|
|
91
84
|
getInvert(vector3: THREE.Vector3): any;
|
|
92
85
|
fitTo(obj: BaseObject, enableTransition?: boolean): Promise<void>;
|
|
93
86
|
initVis(): Promise<void>;
|
|
94
|
-
fitToTarget(adcode: number, lnglat?: [number, number]): Promise<void>;
|
|
95
87
|
drawBuilding(options?: {
|
|
96
88
|
json?: {
|
|
97
89
|
features: any[];
|
|
98
90
|
};
|
|
99
91
|
meters?: number;
|
|
100
|
-
clip?: {
|
|
101
|
-
features: any[];
|
|
102
|
-
};
|
|
103
92
|
grey?: boolean;
|
|
104
93
|
sideGradient?: boolean;
|
|
105
|
-
group?: Group;
|
|
106
94
|
}): Promise<Building | undefined>;
|
|
107
95
|
drawArea(options?: {
|
|
108
96
|
json?: {
|
|
@@ -110,11 +98,7 @@ export default class extends Base {
|
|
|
110
98
|
};
|
|
111
99
|
type?: 'river' | 'grassland';
|
|
112
100
|
oArr?: number[];
|
|
113
|
-
clip?: {
|
|
114
|
-
features: any[];
|
|
115
|
-
};
|
|
116
101
|
grey?: boolean;
|
|
117
|
-
group?: Group;
|
|
118
102
|
}): Promise<import("./objects/area").default | undefined>;
|
|
119
103
|
drawRoad(options?: {
|
|
120
104
|
json?: {
|
|
@@ -122,11 +106,7 @@ export default class extends Base {
|
|
|
122
106
|
};
|
|
123
107
|
meters?: number;
|
|
124
108
|
z?: number;
|
|
125
|
-
clip?: {
|
|
126
|
-
features: any[];
|
|
127
|
-
};
|
|
128
109
|
grey?: boolean;
|
|
129
|
-
group?: Group;
|
|
130
110
|
}): Promise<Road | undefined>;
|
|
131
111
|
getWorldPosition(longitude: number, latitude: number): {
|
|
132
112
|
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[];
|
|
@@ -21,8 +21,6 @@ export default class extends BaseObject {
|
|
|
21
21
|
options: Options;
|
|
22
22
|
area: ExtrudePolygon[];
|
|
23
23
|
constructor(options: Options);
|
|
24
|
-
outJson: Map<any, any>;
|
|
25
24
|
create(): Promise<void>;
|
|
26
|
-
dispose(): void;
|
|
27
25
|
}
|
|
28
26
|
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: {
|
|
@@ -21,14 +20,11 @@ interface Options {
|
|
|
21
20
|
export default class extends BaseObject {
|
|
22
21
|
options: Options;
|
|
23
22
|
constructor(options: Options);
|
|
24
|
-
building: Record<string, ExtrudePolygon[]>;
|
|
25
|
-
outJson: Map<any, any>;
|
|
26
23
|
create(): Promise<void>;
|
|
27
24
|
worldPositionZ: {
|
|
28
25
|
value: number;
|
|
29
26
|
};
|
|
30
27
|
sideGradient(color?: string, maxGradientHeight?: number): void;
|
|
31
28
|
update(): void;
|
|
32
|
-
dispose(): void;
|
|
33
29
|
}
|
|
34
30
|
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[];
|
|
@@ -18,7 +18,6 @@ interface Options {
|
|
|
18
18
|
export default class extends BaseObject {
|
|
19
19
|
options: Options;
|
|
20
20
|
constructor(options: Options);
|
|
21
|
-
outJson: Map<any, any>;
|
|
22
21
|
linePrimary: Line[];
|
|
23
22
|
lineSecondary: Line[];
|
|
24
23
|
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.1",
|
|
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;
|