vis-core 0.21.22 → 0.21.24
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.js +82 -82
- package/dist/index.module.js +25589 -22803
- package/dist/version.d.ts +1 -1
- package/dist/vis/base/index.d.ts +0 -5
- package/dist/vis/map/index.d.ts +3 -2
- package/dist/vis/map/objects/Mountain.d.ts +32 -0
- package/dist/vis/map/objects/PlaneMap.d.ts +2 -2
- package/dist/vis/map/objects/index.d.ts +2 -0
- package/dist/vis/map2/city.d.ts +1 -0
- package/dist/vis/map2/map.d.ts +1 -0
- package/dist/vis/map2/objects/index.d.ts +2 -0
- package/package.json +2 -2
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "0.21.
|
|
1
|
+
declare const _default: "0.21.24";
|
|
2
2
|
export default _default;
|
package/dist/vis/base/index.d.ts
CHANGED
|
@@ -5,7 +5,6 @@ import type { PickFunctionsItem } from 'gl-draw/dist/plugins/Draw';
|
|
|
5
5
|
import { Node } from 'gl-draw/dist/objects';
|
|
6
6
|
import { RoomEnvironment } from 'three/examples/jsm/environments/RoomEnvironment';
|
|
7
7
|
import * as THREE from 'three';
|
|
8
|
-
import { Timer } from 'esus-lite';
|
|
9
8
|
import Event from "./event";
|
|
10
9
|
import Editor from "../../editor";
|
|
11
10
|
export interface BaseOptions {
|
|
@@ -67,7 +66,6 @@ export default class Base extends Event {
|
|
|
67
66
|
re: RoomEnvironment | null;
|
|
68
67
|
roomEnvMap?: THREE.Texture;
|
|
69
68
|
visName: string;
|
|
70
|
-
checkDprTimer: Timer;
|
|
71
69
|
editor?: Editor;
|
|
72
70
|
constructor(options: BaseOptions);
|
|
73
71
|
setOptions(options: Record<string, any>): void;
|
|
@@ -78,9 +76,6 @@ export default class Base extends Event {
|
|
|
78
76
|
(uuid: string): BaseObject;
|
|
79
77
|
};
|
|
80
78
|
get getDataURL(): () => string;
|
|
81
|
-
devicePixelRatio: number;
|
|
82
|
-
getDevicePixelRatio(): number;
|
|
83
|
-
setDevicePixelRatio(dpr: number): void;
|
|
84
79
|
loaderAdd(...args: any): void;
|
|
85
80
|
initMaterial(...args: any): Promise<void>;
|
|
86
81
|
initVis(...args: any): Promise<void>;
|
package/dist/vis/map/index.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ export interface MapOptions extends BaseOptions {
|
|
|
14
14
|
center?: [number, number];
|
|
15
15
|
parentBg?: boolean | number;
|
|
16
16
|
parentBgDepth?: number;
|
|
17
|
-
|
|
17
|
+
parentBgTopSegments?: number;
|
|
18
18
|
fixCity?: Record<number, number>;
|
|
19
19
|
continentsBg?: boolean;
|
|
20
20
|
continentsBgDepth?: number;
|
|
@@ -54,6 +54,7 @@ export default class extends Base {
|
|
|
54
54
|
drawController: DrawController<{
|
|
55
55
|
PlaneMap: typeof PlaneMap;
|
|
56
56
|
ContinentsBg: typeof ContinentsBg;
|
|
57
|
+
Mountain: typeof import("./objects/Mountain").default;
|
|
57
58
|
Plane: typeof import("../all/objects/Plane").default;
|
|
58
59
|
CrossPlane: typeof import("../all/objects/CrossPlane").default;
|
|
59
60
|
PlaneShadow: typeof import("../all/objects/PlaneShadow").default;
|
|
@@ -135,7 +136,7 @@ export default class extends Base {
|
|
|
135
136
|
addAreaPlaneByProperty(key: string, value: any, options?: {
|
|
136
137
|
material?: THREE.Material;
|
|
137
138
|
lineMaterial?: MeshLineMaterial;
|
|
138
|
-
|
|
139
|
+
topSegments?: number;
|
|
139
140
|
}): Promise<Group | undefined>;
|
|
140
141
|
caId: string | number | undefined;
|
|
141
142
|
show(): Promise<void>;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { BaseObject } from 'gl-draw';
|
|
2
|
+
import * as THREE from 'three';
|
|
3
|
+
import { Line, ExtrudePolygon, Group } from 'gl-draw/dist/objects';
|
|
4
|
+
import type { FeatureCollection, Position, Polygon, MultiPolygon } from 'geojson';
|
|
5
|
+
type GeoJSON = FeatureCollection<Polygon | MultiPolygon>;
|
|
6
|
+
interface Options {
|
|
7
|
+
geojson: GeoJSON;
|
|
8
|
+
projection: {
|
|
9
|
+
center: [number, number];
|
|
10
|
+
scale: number;
|
|
11
|
+
rotate?: [number, number];
|
|
12
|
+
projectionType?: 'mercator' | 'equirectangular' | 'fahey';
|
|
13
|
+
};
|
|
14
|
+
depth?: number;
|
|
15
|
+
bbox?: number[];
|
|
16
|
+
}
|
|
17
|
+
export default class PlaneMap extends BaseObject {
|
|
18
|
+
options: Required<Omit<Options, 'bbox'>> & Pick<Options, 'bbox'>;
|
|
19
|
+
isActive: boolean;
|
|
20
|
+
groupArr: Group[];
|
|
21
|
+
areaArr: ExtrudePolygon[];
|
|
22
|
+
lineArr: Line[];
|
|
23
|
+
extrudelineArr?: Line[];
|
|
24
|
+
constructor(options: Options);
|
|
25
|
+
geojson2Meta(geojson: GeoJSON): {
|
|
26
|
+
coords: Position[][];
|
|
27
|
+
properties: import("geojson").GeoJsonProperties;
|
|
28
|
+
}[];
|
|
29
|
+
create(): Promise<void>;
|
|
30
|
+
setNoise(geometry: THREE.BufferGeometry, image: HTMLImageElement, maxHeight?: number): void;
|
|
31
|
+
}
|
|
32
|
+
export {};
|
|
@@ -17,7 +17,7 @@ interface Options {
|
|
|
17
17
|
depth?: number;
|
|
18
18
|
lineOffset?: number;
|
|
19
19
|
bbox?: number[];
|
|
20
|
-
|
|
20
|
+
topSegments?: number;
|
|
21
21
|
materialOptions: {
|
|
22
22
|
topMat: THREE.Material;
|
|
23
23
|
sideMat?: THREE.Material;
|
|
@@ -55,7 +55,7 @@ export default class PlaneMap extends BaseObject {
|
|
|
55
55
|
addPlane(geojson: Feature<Polygon | MultiPolygon, GeoJsonProperties>, options: {
|
|
56
56
|
material: THREE.Material | THREE.Material[];
|
|
57
57
|
lineMaterial: MeshLineMaterial;
|
|
58
|
-
|
|
58
|
+
topSegments?: number;
|
|
59
59
|
}): Promise<Group>;
|
|
60
60
|
addLine(geojson: GeoJSON, options: {
|
|
61
61
|
material?: MeshLineMaterial;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { Draw as DrawController } from 'gl-draw/dist/plugins';
|
|
2
2
|
import PlaneMap from './PlaneMap';
|
|
3
3
|
import ContinentsBg from './ContinentsBg';
|
|
4
|
+
import Mountain from './Mountain';
|
|
4
5
|
declare const objs: {
|
|
5
6
|
PlaneMap: typeof PlaneMap;
|
|
6
7
|
ContinentsBg: typeof ContinentsBg;
|
|
8
|
+
Mountain: typeof Mountain;
|
|
7
9
|
Plane: typeof import("../../all/objects/Plane").default;
|
|
8
10
|
CrossPlane: typeof import("../../all/objects/CrossPlane").default;
|
|
9
11
|
PlaneShadow: typeof import("../../all/objects/PlaneShadow").default;
|
package/dist/vis/map2/city.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ export default class extends City {
|
|
|
3
3
|
drawController: {
|
|
4
4
|
PlaneMap: typeof import("../map/objects/PlaneMap").default;
|
|
5
5
|
ContinentsBg: typeof import("../map/objects/ContinentsBg").default;
|
|
6
|
+
Mountain: typeof import("../map/objects/Mountain").default;
|
|
6
7
|
Plane: typeof import("../city/objects/plane").default;
|
|
7
8
|
Building: typeof import("../city/objects/building").default;
|
|
8
9
|
Area: typeof import("../city/objects/area").default;
|
package/dist/vis/map2/map.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ export default class extends Map {
|
|
|
14
14
|
drawController: DrawController<{
|
|
15
15
|
PlaneMap: typeof import("../map/objects/PlaneMap").default;
|
|
16
16
|
ContinentsBg: typeof import("../map/objects/ContinentsBg").default;
|
|
17
|
+
Mountain: typeof import("../map/objects/Mountain").default;
|
|
17
18
|
Plane: typeof import("../city/objects/plane").default;
|
|
18
19
|
Building: typeof import("../city/objects/building").default;
|
|
19
20
|
Area: typeof import("../city/objects/area").default;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import PlaneMap from "../../map/objects/PlaneMap";
|
|
2
|
+
import Mountain from "../../map/objects/Mountain";
|
|
2
3
|
import ContinentsBg from "../../map/objects/ContinentsBg";
|
|
3
4
|
import Plane from "../../city/objects/plane";
|
|
4
5
|
import Building from "../../city/objects/building";
|
|
@@ -8,6 +9,7 @@ import Target from "../../city/objects/target";
|
|
|
8
9
|
declare const objs: {
|
|
9
10
|
PlaneMap: typeof PlaneMap;
|
|
10
11
|
ContinentsBg: typeof ContinentsBg;
|
|
12
|
+
Mountain: typeof Mountain;
|
|
11
13
|
Plane: typeof Plane;
|
|
12
14
|
Building: typeof Building;
|
|
13
15
|
Area: typeof Area;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vis-core",
|
|
3
|
-
"version": "0.21.
|
|
3
|
+
"version": "0.21.24",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"start": "npm run version && PORT=5173 bundler-dev",
|
|
6
6
|
"build:site": "npm run version &&PUBLIC_EXCLUDE=public/city bundler",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"esus-lite": "^0.2.2",
|
|
67
67
|
"events": "^3.3.0",
|
|
68
68
|
"geojson-cn": "^0.1.29",
|
|
69
|
-
"gl-draw": "0.11.
|
|
69
|
+
"gl-draw": "0.11.27",
|
|
70
70
|
"jsrsasign": "^11.1.0",
|
|
71
71
|
"lodash-es": "^4.17.21"
|
|
72
72
|
},
|