vis-core 0.27.0 → 0.27.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/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- declare const _default: "0.27.0";
1
+ declare const _default: "0.27.2";
2
2
  export default _default;
@@ -58,9 +58,15 @@ export default class extends Base {
58
58
  animationIn(): void;
59
59
  initLight(): Promise<void>;
60
60
  getLocationPosition(location: [number, number], dr?: number): [number, number, number];
61
- setAreaColorByProperty(key: string, value: any, color: string): void;
62
- setAreaEmissiveByProperty(key: string, value: any, color: string, intensity?: number): void;
63
- setLineColorByProperty(key: string, value: any, color: string): void;
61
+ setAreaMaterialByProperty(key: string, value: any, ops: {
62
+ color?: string;
63
+ emissive?: string;
64
+ emissiveIntensity?: number;
65
+ } | 'origin'): void;
66
+ setLineMaterialByProperty(key: string, value: any, ops: {
67
+ color?: string;
68
+ width?: number;
69
+ } | 'origin'): void;
64
70
  addAreaPlaneByProperty(key: string, value: any, options: {
65
71
  area: ConstructorParameters<typeof THREE.MeshBasicMaterial>[0];
66
72
  line: ConstructorParameters<typeof MeshLineMaterial>[0];
@@ -26,8 +26,5 @@ export default class extends BaseObject {
26
26
  lineArr: Line[];
27
27
  constructor(options: Options);
28
28
  create(): Promise<void>;
29
- setAreaColor(area: ConicPolygon, color: string): THREE.MeshStandardMaterial | undefined;
30
- setLineColor(line: Line, color: string): MeshLineMaterial | undefined;
31
- setAreaEmissive(area: ConicPolygon, color: string, intensity?: number): THREE.MeshStandardMaterial | undefined;
32
29
  }
33
30
  export {};
@@ -180,16 +180,23 @@ export default class extends Base {
180
180
  loaderAddBg(): void;
181
181
  initMaterialBg(): Promise<void>;
182
182
  consoleMousePostion(): void;
183
- setAreaColorByProperty(key: string, value: any, color: string): void;
184
- setAreaEmissiveByProperty(key: string, value: any, color: string, intensity?: number): void;
185
- setLineColorByProperty(key: string, value: any, color: string): void;
186
- setLineWidthByProperty(key: string, value: any, width: number | 'origin'): void;
187
- addAreaPlaneByProperty(key: string, value: any, options?: {
188
- material?: THREE.Material | Record<string, any>;
189
- lineMaterial?: MeshLineMaterial | Record<string, any>;
183
+ setAreaMaterialByProperty(key: string, value: any, ops: {
184
+ color?: string;
185
+ emissive?: string;
186
+ emissiveIntensity?: number;
187
+ } | 'origin'): void;
188
+ setLineMaterialByProperty(key: string, value: any, ops: {
189
+ color?: string;
190
+ width?: number;
191
+ } | 'origin'): void;
192
+ addAreaPlaneByProperty(key: string, value: any, options: {
193
+ material: ConstructorParameters<typeof THREE.MeshBasicMaterial>[0];
194
+ lineMaterial: ConstructorParameters<typeof MeshLineMaterial>[0];
195
+ sideMaterial?: ConstructorParameters<typeof THREE.MeshBasicMaterial>[0];
196
+ depth?: number;
190
197
  lineBloom?: boolean;
191
198
  topSegments?: number;
192
- }): Promise<Group | undefined>;
199
+ }): Promise<PlaneMap | undefined>;
193
200
  caId: string | number | undefined;
194
201
  showAction(): Promise<void>;
195
202
  hide(): Promise<void>;
@@ -1,7 +1,7 @@
1
1
  import { BaseObject } from 'gl-draw';
2
2
  import * as THREE from 'three';
3
3
  import { Line, ExtrudePolygon, MeshLineMaterial, Group } from 'gl-draw/dist/objects';
4
- import type { FeatureCollection, Polygon, MultiPolygon, Position, Feature, GeoJsonProperties } from 'geojson';
4
+ import type { FeatureCollection, Polygon, MultiPolygon, Position, GeoJsonProperties } from 'geojson';
5
5
  type GeoJSON = FeatureCollection<Polygon | MultiPolygon>;
6
6
  interface Options {
7
7
  areaGroup?: boolean;
@@ -42,10 +42,6 @@ export default class PlaneMap extends BaseObject {
42
42
  extrudelineArr?: Line[];
43
43
  constructor(options: Options);
44
44
  create(): Promise<void>;
45
- setAreaColor(area: ExtrudePolygon, color: string): THREE.MeshStandardMaterial | undefined;
46
- setAreaEmissive(area: ExtrudePolygon, color: string, intensity?: number): THREE.MeshStandardMaterial | undefined;
47
- setLineColor(line: Line, color: string): MeshLineMaterial | undefined;
48
- setLineWidth(line: Line, width: number | 'origin'): MeshLineMaterial | undefined;
49
45
  addArea(geojson: GeoJSON, options: {
50
46
  material: THREE.Material | THREE.Material[];
51
47
  bbox?: number[];
@@ -55,17 +51,12 @@ export default class PlaneMap extends BaseObject {
55
51
  onTop?: number;
56
52
  castShadow?: boolean;
57
53
  }): Promise<ExtrudePolygon[]>;
58
- getPropertiesKey(properties: Record<string, any>): string;
59
- addPlane(geojson: Feature<Polygon | MultiPolygon, GeoJsonProperties>, options: {
60
- material: THREE.Material | THREE.Material[];
61
- lineMaterial: MeshLineMaterial;
62
- topSegments?: number;
63
- }): Promise<Group>;
64
54
  addLine(geojson: GeoJSON, options: {
65
55
  material?: MeshLineMaterial;
66
56
  onTop?: number;
67
57
  areaGroup?: boolean;
68
58
  }): Promise<Line[]>;
59
+ getPropertiesKey(properties: Record<string, any>): string;
69
60
  geojson2Meta(geojson: GeoJSON): {
70
61
  coords: Position[][];
71
62
  properties: GeoJsonProperties;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vis-core",
3
- "version": "0.27.0",
3
+ "version": "0.27.2",
4
4
  "scripts": {
5
5
  "start": "npm run version && PORT=5173 bundler-dev",
6
6
  "build:site": "npm run version && bundler",
@@ -69,7 +69,7 @@
69
69
  "esus-lite": "^0.2.8",
70
70
  "events": "^3.3.0",
71
71
  "geojson-cn": "^0.2.5",
72
- "gl-draw": "0.14.34",
72
+ "gl-draw": "0.14.36",
73
73
  "jsrsasign": "^11.1.0",
74
74
  "lodash-es": "^4.17.21"
75
75
  },