vis-core 0.31.7 → 0.31.9
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 +31 -5
- package/dist/index.js +2 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -107,6 +107,7 @@ export declare class Base extends Camera {
|
|
|
107
107
|
constructor(options: BaseOptions);
|
|
108
108
|
private showDetectRes;
|
|
109
109
|
setOptions(options: Record<string, any>): void;
|
|
110
|
+
syncExtendsOptionToScene(name: string, value: any): void;
|
|
110
111
|
fromJSON(jsonOrUrl: Record<string, any> | string, hooksE?: Record<string, any>): Promise<void>;
|
|
111
112
|
private parseHooks;
|
|
112
113
|
loaderAdd(...args: any): void;
|
|
@@ -503,6 +504,8 @@ export declare class Earth extends Base {
|
|
|
503
504
|
Line: LineObject;
|
|
504
505
|
Group: GroupObject;
|
|
505
506
|
}): Promise<void>;
|
|
507
|
+
syncExtendsOptionToScene(name: string, value: any): void;
|
|
508
|
+
private _syncConicDepth;
|
|
506
509
|
rebuildFromScene(): Promise<void>;
|
|
507
510
|
}
|
|
508
511
|
|
|
@@ -552,6 +555,7 @@ export declare interface FixConfig {
|
|
|
552
555
|
t?: string[];
|
|
553
556
|
b?: string[];
|
|
554
557
|
l?: string[];
|
|
558
|
+
r?: string[];
|
|
555
559
|
};
|
|
556
560
|
}
|
|
557
561
|
|
|
@@ -664,6 +668,7 @@ declare class Map_2 extends Base {
|
|
|
664
668
|
pscale: number;
|
|
665
669
|
meters: number;
|
|
666
670
|
cityVis: city[];
|
|
671
|
+
cityGroup: GroupObject[];
|
|
667
672
|
extendsOptions: Record<string, any>;
|
|
668
673
|
setOptions(options: MapOptions): void;
|
|
669
674
|
initGroup(): Promise<void>;
|
|
@@ -702,7 +707,7 @@ declare class Map_2 extends Base {
|
|
|
702
707
|
hide(): Promise<void>;
|
|
703
708
|
shadowMapEnabled(): Promise<void>;
|
|
704
709
|
getOptionsDepth(adcode: number): number;
|
|
705
|
-
getDepth(adcode: number
|
|
710
|
+
getDepth(adcode: number): number;
|
|
706
711
|
getReferenceScale(bboxa: number[], bboxb: number[]): number;
|
|
707
712
|
getAdcodeShowLevel(adcode: number, fix?: boolean): string | undefined;
|
|
708
713
|
handleClick(area?: ExtrudePolygonObject): void;
|
|
@@ -838,6 +843,17 @@ declare class Map_2 extends Base {
|
|
|
838
843
|
Line: LineObject;
|
|
839
844
|
Group: typeof GroupObject;
|
|
840
845
|
}): Promise<void>;
|
|
846
|
+
/**
|
|
847
|
+
* Called from Viewport.setExtendsOptions immediately before toJSON().
|
|
848
|
+
* Updates the live PlaneMap / ExtrudePolygon / Line objects' .options so
|
|
849
|
+
* that gl-draw's exportScene() serialises the correct values into
|
|
850
|
+
* _baseObjectOptions. fromJSON will then re-create geometry from those
|
|
851
|
+
* saved options without any extra patching step.
|
|
852
|
+
*/
|
|
853
|
+
syncExtendsOptionToScene(name: string, value: any): Promise<void>;
|
|
854
|
+
private _syncDepthToLivePlaneMaps;
|
|
855
|
+
private _syncDepthToLiveParentPlaneMaps;
|
|
856
|
+
private _syncProjectionToLivePlaneMaps;
|
|
841
857
|
dispose(): void;
|
|
842
858
|
}
|
|
843
859
|
export { Map_2 as Map }
|
|
@@ -877,6 +893,8 @@ export declare class MapManager {
|
|
|
877
893
|
private isInitializing;
|
|
878
894
|
private rmTemplateIdentifier;
|
|
879
895
|
private geojsonExtensions;
|
|
896
|
+
private areaHoverEnabled;
|
|
897
|
+
private showBuildingOnlyWithoutChildren;
|
|
880
898
|
private groups;
|
|
881
899
|
private eventHandlers;
|
|
882
900
|
private areaCloseTimer;
|
|
@@ -903,6 +921,7 @@ export declare class MapManager {
|
|
|
903
921
|
} | undefined;
|
|
904
922
|
static extendsAdcodeAll: (cb: any) => void;
|
|
905
923
|
key: string;
|
|
924
|
+
topAdcode: number;
|
|
906
925
|
constructor(config: MapManagerConfig);
|
|
907
926
|
/**
|
|
908
927
|
* 设置事件处理器
|
|
@@ -923,7 +942,7 @@ export declare class MapManager {
|
|
|
923
942
|
/**
|
|
924
943
|
* 初始化地图
|
|
925
944
|
*/
|
|
926
|
-
|
|
945
|
+
showMap(adcodeArr: number[], fixedAdcode?: boolean): Promise<Map_2 | null | undefined>;
|
|
927
946
|
/**
|
|
928
947
|
* 创建地图实例
|
|
929
948
|
*/
|
|
@@ -978,6 +997,9 @@ export declare interface MapManagerConfig {
|
|
|
978
997
|
rmTemplateIdentifier?: boolean;
|
|
979
998
|
geojsonExtensions?: Record<string, any[]>;
|
|
980
999
|
mapConfigs?: Record<string, any>;
|
|
1000
|
+
areaHoverEnabled?: boolean;
|
|
1001
|
+
topAdcode?: number;
|
|
1002
|
+
showBuildingOnlyWithoutChildren?: boolean;
|
|
981
1003
|
}
|
|
982
1004
|
|
|
983
1005
|
declare interface MapOptions extends BaseOptions {
|
|
@@ -1022,6 +1044,7 @@ declare interface MapOptions extends BaseOptions {
|
|
|
1022
1044
|
geojsonExtensions?: Record<string, GeoJSON_3 | string | number | (GeoJSON_3 | string | number)[]>;
|
|
1023
1045
|
shadowMap?: boolean;
|
|
1024
1046
|
switchFixConfig?: SwitchFixConfig;
|
|
1047
|
+
_currentAdcodes?: number[];
|
|
1025
1048
|
}
|
|
1026
1049
|
|
|
1027
1050
|
declare class Model extends GroupObject {
|
|
@@ -1220,7 +1243,6 @@ declare interface Options_9 {
|
|
|
1220
1243
|
extrudeLineGeojson?: GeoJSON_2;
|
|
1221
1244
|
hasSide?: boolean;
|
|
1222
1245
|
hasTop?: boolean;
|
|
1223
|
-
mergeSide?: boolean;
|
|
1224
1246
|
hasLine?: boolean;
|
|
1225
1247
|
start?: number;
|
|
1226
1248
|
depth?: number;
|
|
@@ -1229,6 +1251,7 @@ declare interface Options_9 {
|
|
|
1229
1251
|
topSegments?: number;
|
|
1230
1252
|
conic?: boolean;
|
|
1231
1253
|
castShadow?: boolean;
|
|
1254
|
+
mergeSide?: boolean;
|
|
1232
1255
|
materialOptions: {
|
|
1233
1256
|
topMat: THREE.Material;
|
|
1234
1257
|
sideMat?: THREE.Material;
|
|
@@ -1260,6 +1283,8 @@ declare class PlaneMap extends GroupObject {
|
|
|
1260
1283
|
splitPolygons: number;
|
|
1261
1284
|
constructor(options: Options_9);
|
|
1262
1285
|
create(): Promise<void>;
|
|
1286
|
+
mergeAreaSide(): Promise<void>;
|
|
1287
|
+
unmergeAreaSide(): Promise<void>;
|
|
1263
1288
|
addArea(geojson: GeoJSON_2, options: {
|
|
1264
1289
|
material: THREE.Material | THREE.Material[];
|
|
1265
1290
|
bbox?: number[];
|
|
@@ -1267,7 +1292,6 @@ declare class PlaneMap extends GroupObject {
|
|
|
1267
1292
|
hasSide?: boolean;
|
|
1268
1293
|
hasTop?: boolean;
|
|
1269
1294
|
onTop?: number;
|
|
1270
|
-
castShadow?: boolean;
|
|
1271
1295
|
}): Promise<ExtrudePolygonObject[]>;
|
|
1272
1296
|
addLine(geojson: GeoJSON_2, options: {
|
|
1273
1297
|
material?: MeshLineMaterial;
|
|
@@ -1408,6 +1432,8 @@ declare interface SwitchFixConfig {
|
|
|
1408
1432
|
b?: string[];
|
|
1409
1433
|
/** 灯光按缩放比调整 */
|
|
1410
1434
|
l?: string[];
|
|
1435
|
+
/** 删除对象 */
|
|
1436
|
+
r?: string[];
|
|
1411
1437
|
}
|
|
1412
1438
|
|
|
1413
1439
|
declare class Target extends GroupObject {
|
|
@@ -1456,7 +1482,7 @@ export { TWEEN }
|
|
|
1456
1482
|
|
|
1457
1483
|
export { Tween }
|
|
1458
1484
|
|
|
1459
|
-
export declare const VERSION = "0.31.
|
|
1485
|
+
export declare const VERSION = "0.31.9";
|
|
1460
1486
|
|
|
1461
1487
|
export { }
|
|
1462
1488
|
|