vis-core 0.13.11 → 0.14.0

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.13.11";
1
+ declare const _default: "0.14.0";
2
2
  export default _default;
@@ -1,8 +1,7 @@
1
1
  import { EventEmitter } from 'events';
2
2
  import Pencil, { BaseObject } from 'gl-draw';
3
3
  import MaterialList from "./all/MaterialList";
4
- import { Loader } from 'gl-draw/dist/plugins';
5
- import { Wk } from 'gl-draw/dist/plugins';
4
+ import { Wk, Loader, Draw as DrawController } from 'gl-draw/dist/plugins';
6
5
  import { Node } from 'gl-draw/dist/objects';
7
6
  import { RoomEnvironment } from 'three/examples/jsm/environments/RoomEnvironment';
8
7
  import * as THREE from 'three';
@@ -22,6 +21,32 @@ export default class Base {
22
21
  extendsOptions: Record<string, any>;
23
22
  pencil: Pencil;
24
23
  drawController: any;
24
+ allDrawController: DrawController<{
25
+ Plane: typeof import("./all/objects/Plane").default;
26
+ Ring: typeof import("./all/objects/Ring").default;
27
+ Sphere: typeof import("./all/objects/Sphere").default;
28
+ Sprite: typeof import("./all/objects/Sprite").default;
29
+ Tetrahedron: typeof import("./all/objects/Tetrahedron").default;
30
+ Torus: typeof import("./all/objects/Torus").default;
31
+ TorusKnot: typeof import("./all/objects/TorusKnot").default;
32
+ Tube: typeof import("./all/objects/Tube").default;
33
+ Box: typeof import("./all/objects/Box").default;
34
+ Capsule: typeof import("./all/objects/Capsule").default;
35
+ Circle: typeof import("./all/objects/Circle").default;
36
+ Cylinder: typeof import("./all/objects/Cylinder").default;
37
+ Dodecahedron: typeof import("./all/objects/Dodecahedron").default;
38
+ Icosahedron: typeof import("./all/objects/Icosahedron").default;
39
+ Lathe: typeof import("./all/objects/Lathe").default;
40
+ Octahedron: typeof import("./all/objects/Octahedron").default;
41
+ Node: typeof Node;
42
+ Image: typeof import("gl-draw/dist/objects").Image;
43
+ Line: typeof import("gl-draw/dist/objects").Line;
44
+ ExtrudePolygon: typeof import("gl-draw/dist/objects").ExtrudePolygon;
45
+ Group: typeof import("gl-draw/dist/objects").Group;
46
+ Light: typeof import("./map/objects").Light;
47
+ Point: typeof import("./all/objects/Point").default;
48
+ Arc: typeof import("./all/objects/Arc").default;
49
+ }>;
25
50
  mList: MaterialList;
26
51
  loader: Loader;
27
52
  worker: Wk;
@@ -37,7 +37,7 @@ export declare const objs2: {
37
37
  Lathe: typeof Lathe;
38
38
  Octahedron: typeof Octahedron;
39
39
  };
40
- declare const d: DrawController<{
40
+ declare const objall: {
41
41
  Plane: typeof Plane;
42
42
  Ring: typeof Ring;
43
43
  Sphere: typeof Sphere;
@@ -62,5 +62,6 @@ declare const d: DrawController<{
62
62
  Light: typeof Light;
63
63
  Point: typeof Point;
64
64
  Arc: typeof Arc;
65
- }>;
66
- export default d;
65
+ };
66
+ export default objall;
67
+ export type d = DrawController<typeof objall>;
@@ -3,6 +3,7 @@ import Base from "../Base";
3
3
  import * as THREE from 'three';
4
4
  import { getProjection } from 'gl-draw/dist/utils';
5
5
  import { Group } from "./objects";
6
+ import { Draw as DrawController } from 'gl-draw/dist/plugins';
6
7
  interface CityOptions {
7
8
  adcode: number;
8
9
  jsonName: string;
@@ -30,7 +31,7 @@ interface CityOptions {
30
31
  }
31
32
  export default class extends Base {
32
33
  static VisName: string;
33
- drawController: import("gl-draw/dist/plugins").Draw<{
34
+ drawController: DrawController<{
34
35
  Node: typeof import("gl-draw/dist/objects").Node;
35
36
  Image: typeof import("gl-draw/dist/objects").Image;
36
37
  Line: typeof import("./objects").Line;
@@ -21,18 +21,5 @@ export declare const objs: {
21
21
  Plane: typeof Plane;
22
22
  Target: typeof Target;
23
23
  };
24
- declare const _default: DrawController<{
25
- Node: typeof Node;
26
- Image: typeof Image;
27
- Line: typeof Line;
28
- ExtrudePolygon: typeof ExtrudePolygon;
29
- Building: typeof Building;
30
- Road: typeof Road;
31
- Area: typeof Area;
32
- Video: typeof Video;
33
- Group: typeof Group;
34
- Light: typeof Light;
35
- Plane: typeof Plane;
36
- Target: typeof Target;
37
- }>;
38
- export default _default;
24
+ export default objs;
25
+ export type d = DrawController<typeof objs>;
@@ -1,10 +1,11 @@
1
1
  import Base from "../Base";
2
+ import { Draw as DrawController } from 'gl-draw/dist/plugins';
2
3
  interface EarthOptions {
3
4
  assetsPrefix?: string;
4
5
  }
5
6
  export default class extends Base {
6
7
  static VisName: string;
7
- drawController: import("gl-draw/dist/plugins").Draw<{
8
+ drawController: DrawController<{
8
9
  Node: typeof import("gl-draw/dist/objects").Node;
9
10
  Image: typeof import("gl-draw/dist/objects").Image;
10
11
  Line: typeof import("gl-draw/dist/objects").Line;
@@ -4,7 +4,7 @@ import Earth from './earth';
4
4
  import Countries from './countries';
5
5
  import Light from './light';
6
6
  import China from './china';
7
- declare const _default: DrawController<{
7
+ declare const objs: {
8
8
  Node: typeof Node;
9
9
  Image: typeof Image;
10
10
  Line: typeof Line;
@@ -15,5 +15,6 @@ declare const _default: DrawController<{
15
15
  Earth: typeof Earth;
16
16
  Countries: typeof Countries;
17
17
  China: typeof China;
18
- }>;
19
- export default _default;
18
+ };
19
+ export default objs;
20
+ export type d = DrawController<typeof objs>;
@@ -1,11 +1,12 @@
1
1
  import Base from "../Base";
2
+ import { Draw as DrawController } from 'gl-draw/dist/plugins';
2
3
  interface EarthOptions {
3
4
  assetsPrefix?: string;
4
5
  }
5
6
  export default class extends Base {
6
7
  static VisName: string;
7
8
  leftTruck: boolean;
8
- drawController: import("gl-draw/dist/plugins").Draw<{
9
+ drawController: DrawController<{
9
10
  Node: typeof import("gl-draw/dist/objects").Node;
10
11
  Image: typeof import("gl-draw/dist/objects").Image;
11
12
  Line: typeof import("gl-draw/dist/objects").Line;
@@ -5,7 +5,7 @@ import Bg from './bg';
5
5
  import Label from './label';
6
6
  import Point from './point';
7
7
  import Light from "../../all/objects/Light";
8
- declare const _default: DrawController<{
8
+ declare const objs: {
9
9
  Node: typeof Node;
10
10
  Image: typeof Image;
11
11
  Line: typeof Line;
@@ -17,5 +17,6 @@ declare const _default: DrawController<{
17
17
  Bg: typeof Bg;
18
18
  Label: typeof Label;
19
19
  Point: typeof Point;
20
- }>;
21
- export default _default;
20
+ };
21
+ export default objs;
22
+ export type d = DrawController<typeof objs>;
@@ -5,6 +5,7 @@ import type { FeatureCollection, Polygon, MultiPolygon } from 'geojson';
5
5
  import { MeshLineMaterial } from 'gl-draw/dist/objects';
6
6
  import * as THREE from 'three';
7
7
  import { PlaneMap, Group, ContinentsBg } from "./objects";
8
+ import { Draw as DrawController } from 'gl-draw/dist/plugins';
8
9
  import { LevelArr } from 'geojson-cn';
9
10
  type GeoJSON = FeatureCollection<Polygon | MultiPolygon>;
10
11
  export interface MapOptions {
@@ -45,7 +46,7 @@ export interface MapOptions {
45
46
  }
46
47
  export default class extends Base {
47
48
  static VisName: string;
48
- drawController: import("gl-draw/dist/plugins").Draw<{
49
+ drawController: DrawController<{
49
50
  Node: typeof import("gl-draw/dist/objects").Node;
50
51
  Image: typeof import("gl-draw/dist/objects").Image;
51
52
  Line: typeof import("gl-draw/dist/objects").Line;
@@ -4,8 +4,7 @@ import PlaneMap from './PlaneMap';
4
4
  import ContinentsBg from './ContinentsBg';
5
5
  import Light from "../../all/objects/Light";
6
6
  import PlaneShadow from './PlaneShadow';
7
- export { PlaneMap, Light, ContinentsBg, Group };
8
- declare const _default: DrawController<{
7
+ declare const objs: {
9
8
  Node: typeof Node;
10
9
  Image: typeof Image;
11
10
  Line: typeof Line;
@@ -16,5 +15,7 @@ declare const _default: DrawController<{
16
15
  Light: typeof Light;
17
16
  PlaneShadow: typeof PlaneShadow;
18
17
  ConicPolygon: typeof ConicPolygon;
19
- }>;
20
- export default _default;
18
+ };
19
+ export { PlaneMap, Light, ContinentsBg, Group };
20
+ export default objs;
21
+ export type d = DrawController<typeof objs>;
@@ -1,6 +1,6 @@
1
1
  import City from "../city";
2
2
  export default class extends City {
3
- drawController: import("gl-draw/dist/plugins").Draw<{
3
+ drawController: {
4
4
  Node: typeof import("gl-draw/dist/objects").Node;
5
5
  Image: typeof import("gl-draw/dist/objects").Image;
6
6
  Line: typeof import("gl-draw/dist/objects").Line;
@@ -16,7 +16,7 @@ export default class extends City {
16
16
  Road: typeof import("../city/objects/road").default;
17
17
  Target: typeof import("../city/objects/target").default;
18
18
  ConicPolygon: typeof import("gl-draw/dist/objects").ConicPolygon;
19
- }>;
19
+ };
20
20
  multiplyScalar: number;
21
21
  fixNearFar(n?: number): void;
22
22
  }
@@ -24,23 +24,6 @@ interface showCityOption {
24
24
  }
25
25
  export default class extends Map {
26
26
  static VisName: string;
27
- drawController: import("gl-draw/dist/plugins").Draw<{
28
- Node: typeof import("gl-draw/dist/objects").Node;
29
- Image: typeof import("gl-draw/dist/objects").Image;
30
- Line: typeof import("gl-draw/dist/objects").Line;
31
- PlaneMap: typeof import("./objects").PlaneMap;
32
- ContinentsBg: typeof import("../map/objects").ContinentsBg;
33
- ExtrudePolygon: typeof import("gl-draw/dist/objects").ExtrudePolygon;
34
- Group: typeof import("./objects").Group;
35
- Light: typeof import("./objects").Light;
36
- PlaneShadow: typeof import("../map/objects/PlaneShadow").default;
37
- Plane: typeof import("../city/objects/plane").default;
38
- Building: typeof import("../city/objects/building").default;
39
- Area: typeof import("../city/objects/area").default;
40
- Road: typeof import("../city/objects/road").default;
41
- Target: typeof import("../city/objects/target").default;
42
- ConicPolygon: typeof import("gl-draw/dist/objects").ConicPolygon;
43
- }>;
44
27
  cityVisObj: Record<string, {
45
28
  city?: City;
46
29
  state: ReturnType<typeof makePromiseCreator>;
@@ -1,4 +1,5 @@
1
1
  import Map, { MapOptions } from "../map";
2
+ import { Draw as DrawController } from 'gl-draw/dist/plugins';
2
3
  import type { FeatureCollection, Polygon, MultiPolygon } from 'geojson';
3
4
  type GeoJSON = FeatureCollection<Polygon | MultiPolygon>;
4
5
  export interface Map2Options extends MapOptions {
@@ -9,7 +10,7 @@ export interface Map2Options extends MapOptions {
9
10
  export default class extends Map {
10
11
  options: Required<Map2Options>;
11
12
  constructor(container: HTMLElement, options: Map2Options);
12
- drawController: import("gl-draw/dist/plugins").Draw<{
13
+ drawController: DrawController<{
13
14
  Node: typeof import("gl-draw/dist/objects").Node;
14
15
  Image: typeof import("gl-draw/dist/objects").Image;
15
16
  Line: typeof import("gl-draw/dist/objects").Line;
@@ -1,4 +1,3 @@
1
- import { Draw as DrawController } from 'gl-draw/dist/plugins';
2
1
  import { Node, Image, Line, ExtrudePolygon, Group, ConicPolygon } from 'gl-draw/dist/objects';
3
2
  import PlaneMap from "../../map/objects/PlaneMap";
4
3
  import PlaneShadow from "../../map/objects/PlaneShadow";
@@ -9,8 +8,7 @@ import Building from "../../city/objects/building";
9
8
  import Area from "../../city/objects/area";
10
9
  import Road from "../../city/objects/road";
11
10
  import Target from "../../city/objects/target";
12
- export { PlaneMap, Light, Group };
13
- declare const _default: DrawController<{
11
+ declare const objs: {
14
12
  Node: typeof Node;
15
13
  Image: typeof Image;
16
14
  Line: typeof Line;
@@ -26,5 +24,6 @@ declare const _default: DrawController<{
26
24
  Road: typeof Road;
27
25
  Target: typeof Target;
28
26
  ConicPolygon: typeof ConicPolygon;
29
- }>;
30
- export default _default;
27
+ };
28
+ export { PlaneMap, Light, Group };
29
+ export default objs;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vis-core",
3
- "version": "0.13.11",
3
+ "version": "0.14.0",
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",
@@ -46,7 +46,7 @@
46
46
  "eslint-config-bundler": "^0.4.2",
47
47
  "esus": "^0.4.27",
48
48
  "fs-extra": "^11.1.1",
49
- "gl-draw": "0.9.0-beta.406",
49
+ "gl-draw": "0.9.1",
50
50
  "idb-keyval": "^6.2.1",
51
51
  "pinia": "^2.1.7",
52
52
  "prettier-config-bundler": "^0.4.3",