vis-core 0.14.3 → 0.14.5

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.14.3";
1
+ declare const _default: "0.14.5";
2
2
  export default _default;
@@ -1,7 +1,7 @@
1
1
  import { BaseObject } from 'gl-draw';
2
2
  import * as THREE from 'three';
3
3
  interface LightOptions {
4
- type: 'AmbientLight' | 'DirectionalLight' | 'PointLight' | 'SpotLight';
4
+ type: 'AmbientLight' | 'DirectionalLight' | 'PointLight' | 'SpotLight' | 'RectAreaLight' | 'HemisphereLight';
5
5
  [key: string]: any;
6
6
  }
7
7
  export default class extends BaseObject {
@@ -10,6 +10,8 @@ export default class extends BaseObject {
10
10
  spotLight?: THREE.SpotLight;
11
11
  pointLight?: THREE.PointLight;
12
12
  hemisphereLight?: THREE.HemisphereLight;
13
+ rectAreaLight?: THREE.RectAreaLight;
14
+ rectAreaLightUniformsLibInit: boolean;
13
15
  constructor(options: LightOptions);
14
16
  create(): void;
15
17
  render(): void;
@@ -1,5 +1,6 @@
1
1
  import Base from "../Base";
2
2
  import { Draw as DrawController } from 'gl-draw/dist/plugins';
3
+ import Countries from './objects/countries';
3
4
  interface EarthOptions {
4
5
  assetsPrefix?: string;
5
6
  mapDepth?: number;
@@ -8,9 +9,8 @@ interface EarthOptions {
8
9
  export default class extends Base {
9
10
  static VisName: string;
10
11
  drawController: DrawController<{
11
- Light: typeof import("./objects/light").default;
12
12
  Earth: typeof import("./objects/earth").default;
13
- Countries: typeof import("./objects/countries").default;
13
+ Countries: typeof Countries;
14
14
  China: typeof import("./objects/china").BorderAreaArc;
15
15
  Plane: typeof import("../all/objects/Plane").default;
16
16
  Ring: typeof import("../all/objects/Ring").default;
@@ -34,17 +34,21 @@ export default class extends Base {
34
34
  ExtrudePolygon: typeof import("gl-draw/dist/objects").ExtrudePolygon;
35
35
  ConicPolygon: typeof import("gl-draw/dist/objects").ConicPolygon;
36
36
  Group: typeof import("gl-draw/dist/objects").Group;
37
+ Light: typeof import("../all/objects/Light").default;
37
38
  Point: typeof import("../all/objects/Point").default;
38
39
  Arc: typeof import("../all/objects/Arc").default;
39
40
  }>;
40
41
  leftTruck: boolean;
41
42
  options: Required<EarthOptions>;
42
43
  extendsOptions: Record<string, any>;
44
+ map: Countries;
45
+ get mapArea(): import("gl-draw/dist/objects").ConicPolygon[];
43
46
  constructor(container: HTMLElement, options?: EarthOptions);
44
47
  loaderAdd(): void;
45
48
  init(): Promise<void>;
46
49
  initMaterial(): Promise<void>;
47
50
  initEarth(): Promise<void>;
48
51
  getLocationPosition(location: [number, number], dr?: number): [number, number, number];
52
+ setAreaColorByProperty(key: string, value: any, color: string, mix?: boolean): void;
49
53
  }
50
54
  export {};
@@ -1,11 +1,15 @@
1
1
  import { BaseObject } from 'gl-draw';
2
+ import * as THREE from 'three';
3
+ import { ConicPolygon } from 'gl-draw/dist/objects';
2
4
  interface Options {
3
5
  start?: number;
4
6
  depth?: number;
5
7
  }
6
8
  export default class extends BaseObject {
7
9
  options: Required<Options>;
10
+ areaArr: ConicPolygon[];
8
11
  constructor(options: Options);
9
12
  create(): Promise<void>;
13
+ setAreaColor(area: ConicPolygon, color: string): THREE.MeshStandardMaterial | undefined;
10
14
  }
11
15
  export {};
@@ -1,10 +1,8 @@
1
1
  import { Draw as DrawController } from 'gl-draw/dist/plugins';
2
2
  import Earth from './earth';
3
3
  import Countries from './countries';
4
- import Light from './light';
5
4
  import China from './china';
6
5
  declare const objs: {
7
- Light: typeof Light;
8
6
  Earth: typeof Earth;
9
7
  Countries: typeof Countries;
10
8
  China: typeof China;
@@ -30,6 +28,7 @@ declare const objs: {
30
28
  ExtrudePolygon: typeof import("gl-draw/dist/objects").ExtrudePolygon;
31
29
  ConicPolygon: typeof import("gl-draw/dist/objects").ConicPolygon;
32
30
  Group: typeof import("gl-draw/dist/objects").Group;
31
+ Light: typeof import("../../all/objects/Light").default;
33
32
  Point: typeof import("../../all/objects/Point").default;
34
33
  Arc: typeof import("../../all/objects/Arc").default;
35
34
  };
@@ -3,7 +3,6 @@ import { Draw as DrawController } from 'gl-draw/dist/plugins';
3
3
  export default class extends Earth {
4
4
  static VisName: string;
5
5
  drawController: DrawController<{
6
- Light: typeof import("../earth/objects/light").default;
7
6
  Earth: typeof import("../earth/objects/earth").default;
8
7
  Countries: typeof import("./objects/countries").default;
9
8
  Plane: typeof import("../all/objects/Plane").default;
@@ -28,6 +27,7 @@ export default class extends Earth {
28
27
  ExtrudePolygon: typeof import("gl-draw/dist/objects").ExtrudePolygon;
29
28
  ConicPolygon: typeof import("gl-draw/dist/objects").ConicPolygon;
30
29
  Group: typeof import("gl-draw/dist/objects").Group;
30
+ Light: typeof import("../all/objects/Light").default;
31
31
  Point: typeof import("../all/objects/Point").default;
32
32
  Arc: typeof import("../all/objects/Arc").default;
33
33
  }>;
@@ -1,11 +1,4 @@
1
- import { BaseObject } from 'gl-draw';
2
- interface Options {
3
- start?: number;
4
- depth?: number;
5
- }
6
- export default class extends BaseObject {
7
- options: Required<Options>;
8
- constructor(options: Options);
1
+ import Countries from "../../../earth/objects/countries";
2
+ export default class extends Countries {
9
3
  create(): Promise<void>;
10
4
  }
11
- export {};
@@ -1,9 +1,7 @@
1
1
  import { Draw as DrawController } from 'gl-draw/dist/plugins';
2
- import Light from "../../earth/objects/light";
3
2
  import Earth from "../../earth/objects/earth";
4
3
  import Countries from './countries';
5
4
  declare const objs: {
6
- Light: typeof Light;
7
5
  Earth: typeof Earth;
8
6
  Countries: typeof Countries;
9
7
  Plane: typeof import("../../all/objects/Plane").default;
@@ -28,6 +26,7 @@ declare const objs: {
28
26
  ExtrudePolygon: typeof import("gl-draw/dist/objects").ExtrudePolygon;
29
27
  ConicPolygon: typeof import("gl-draw/dist/objects").ConicPolygon;
30
28
  Group: typeof import("gl-draw/dist/objects").Group;
29
+ Light: typeof import("../../all/objects/Light").default;
31
30
  Point: typeof import("../../all/objects/Point").default;
32
31
  Arc: typeof import("../../all/objects/Arc").default;
33
32
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vis-core",
3
- "version": "0.14.3",
3
+ "version": "0.14.5",
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",
@@ -1,97 +0,0 @@
1
- import { BaseObject } from 'gl-draw';
2
- export default class extends BaseObject {
3
- bbox: any[];
4
- guiParams: {
5
- light1: {
6
- color: {
7
- value: string;
8
- target: () => any;
9
- };
10
- intensity: {
11
- value: number;
12
- target: () => any;
13
- };
14
- width: {
15
- value: number;
16
- min: number;
17
- max: number;
18
- step: number;
19
- target: () => any;
20
- };
21
- height: {
22
- value: number;
23
- min: number;
24
- max: number;
25
- step: number;
26
- target: () => any;
27
- };
28
- x: {
29
- value: number;
30
- min: number;
31
- max: number;
32
- step: number;
33
- target: () => any;
34
- };
35
- y: {
36
- value: number;
37
- min: number;
38
- max: number;
39
- step: number;
40
- target: () => any;
41
- };
42
- z: {
43
- value: number;
44
- min: number;
45
- max: number;
46
- step: number;
47
- target: () => any;
48
- };
49
- };
50
- light2: {
51
- color: {
52
- value: string;
53
- target: () => any;
54
- };
55
- intensity: {
56
- value: number;
57
- target: () => any;
58
- };
59
- width: {
60
- value: number;
61
- min: number;
62
- max: number;
63
- step: number;
64
- target: () => any;
65
- };
66
- height: {
67
- value: number;
68
- min: number;
69
- max: number;
70
- step: number;
71
- target: () => any;
72
- };
73
- x: {
74
- value: number;
75
- min: number;
76
- max: number;
77
- step: number;
78
- target: () => any;
79
- };
80
- y: {
81
- value: number;
82
- min: number;
83
- max: number;
84
- step: number;
85
- target: () => any;
86
- };
87
- z: {
88
- value: number;
89
- min: number;
90
- max: number;
91
- step: number;
92
- target: () => any;
93
- };
94
- };
95
- };
96
- create(): void;
97
- }