vis-core 0.26.13 → 0.27.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.26.13";
1
+ declare const _default: "0.27.0";
2
2
  export default _default;
@@ -1,51 +1,25 @@
1
1
  import * as THREE from 'three';
2
- import Pencil, { BaseObject } from 'gl-draw';
3
- interface ObjectMeta {
4
- selectHide?: boolean;
5
- baseObject?: BaseObject;
6
- parent?: THREE.Object3D;
7
- remove?: boolean;
8
- }
9
- interface Meta extends ObjectMeta {
10
- key: string;
11
- object3d: THREE.Object3D;
12
- }
2
+ import { IBaseObject } from "../../editor";
3
+ import Pencil from 'gl-draw';
13
4
  export default class MaterialList {
14
5
  pluginName: string;
15
6
  pencil: Pencil;
16
- materialList: Map<string, THREE.Material>;
17
- objectList: Map<THREE.Object3D<THREE.Object3DEventMap>, Meta>;
7
+ private materials;
8
+ private meshs;
9
+ private fixBufferGeometry;
10
+ wrapObject: IBaseObject;
18
11
  install(pencil: Pencil): void;
19
- setMaterial(key: string, material: THREE.Material, options?: {
20
- selectHide?: boolean;
21
- }): void;
22
- setMaterialObj(prefix: string, obj: Record<string, THREE.Material | null>, options?: Record<string, {
23
- selectHide?: boolean;
24
- }> | {
25
- selectHide?: boolean;
26
- }): void;
27
- copyMaterialObj(prefix: string, newPrefix: string, options?: {
28
- selectHide?: boolean;
29
- }): void;
30
- getMaterial(key: string): THREE.Material | undefined;
31
- getMaterialObj(prefix: string): Record<string, THREE.Material> | undefined;
32
- setFixMeshList(key: string, materialList: string | string[], options?: {
33
- selectHide?: boolean;
34
- name?: string;
35
- disableCheckHide?: boolean;
36
- }): void;
37
- getValidShowObjectListArr(): Meta[];
12
+ private buildMaterialObjectHierarchy;
13
+ private makeBaseObject;
14
+ setUserData(key: string, userData: Record<string, any>): void;
15
+ add(key: string, material: THREE.Material): void;
16
+ addMultiple(key: string, materialMap: Record<string, THREE.Material | null>): void;
17
+ get(key: string): THREE.Material | undefined;
18
+ getMultiple(key: string): Record<string, THREE.Material> | null;
19
+ copyMultiple(sourceKey: string, destinationKey: string): Record<string, THREE.Material>;
20
+ remove(key: string): void;
21
+ clear(): void;
22
+ getKeys(): string[];
38
23
  emitObject3dChange(): void;
39
- setObject3dMeta(key: string, meta: ObjectMeta): void;
40
- setObject3d(object3d: THREE.Object3D, key: string, meta?: ObjectMeta & {
41
- disableCheckHide?: boolean;
42
- replace?: boolean;
43
- }): void;
44
- delObject3d(object3d: THREE.Object3D): void;
45
- getObject3dKey(object3d: THREE.Object3D): string | undefined;
46
- changeObject3dKey(object3d: THREE.Object3D, key: string): void;
47
- selectHideObject3d(object3d: THREE.Object3D): void;
48
- selectShowObject3d(object3d: THREE.Object3D): void;
49
24
  dispose(): void;
50
25
  }
51
- export {};
@@ -1,6 +1,6 @@
1
1
  import Pencil, { BaseObject } from 'gl-draw';
2
2
  import * as THREE from 'three';
3
- import { Line } from 'gl-draw/dist/objects';
3
+ import { Line, Group } from 'gl-draw/dist/objects';
4
4
  import Tube from '../Tube';
5
5
  interface Options {
6
6
  from: number[];
@@ -10,11 +10,12 @@ interface Options {
10
10
  color?: string;
11
11
  lineWidth?: number;
12
12
  offsetLoop?: boolean;
13
+ key?: string;
13
14
  }
14
15
  export default class extends BaseObject {
15
16
  options: Options;
16
17
  line: Line;
17
- helperMesh?: THREE.Mesh[];
18
+ helperMesh?: Group[];
18
19
  helperMeshPosition?: THREE.Vector3[];
19
20
  constructor(options: Options);
20
21
  static getInitOptions(pencil: Pencil, options: Options): {
@@ -36,7 +37,6 @@ export default class extends BaseObject {
36
37
  onRepeat?: (count: number) => void;
37
38
  }): void;
38
39
  update(): void;
39
- setMList(): void;
40
40
  render(): void;
41
41
  }
42
42
  export {};
@@ -6,6 +6,5 @@ export default class extends BaseObject {
6
6
  options: Options;
7
7
  constructor(options: Options);
8
8
  create(): Promise<void>;
9
- render(): void;
10
9
  }
11
10
  export {};
@@ -83,11 +83,11 @@ export default class Base extends Camera {
83
83
  _objectByUuid: Editor['objectByUuid'];
84
84
  get fromJSON(): (jsonOrUrl: Record<string, any> | string, hooks?: Record<string, any>) => Promise<Record<string, any>>;
85
85
  get baseObjectByUuid(): {
86
- (uuid: `arc${string}`, flag?: boolean): Arc;
87
- (uuid: `sprite${string}`, flag?: boolean): import("../all/objects/Sprite").default;
88
- (uuid: string, flag?: boolean): BaseObject;
86
+ (key: `arc${string}`): Arc;
87
+ (key: `sprite${string}`): import("../all/objects/Sprite").default;
88
+ (key: string): BaseObject;
89
89
  };
90
- get objectByUuid(): (uuid: string) => THREE.Mesh<THREE.BufferGeometry<THREE.NormalBufferAttributes>, THREE.Material | THREE.Material[], THREE.Object3DEventMap> | undefined;
90
+ get objectByUuid(): (key: string) => THREE.Mesh<THREE.BufferGeometry<THREE.NormalBufferAttributes>, THREE.Material | THREE.Material[], THREE.Object3DEventMap> | undefined;
91
91
  get getDataURL(): () => string;
92
92
  loaderAdd(...args: any): void;
93
93
  initMaterial(...args: any): Promise<void>;
@@ -22,8 +22,6 @@ export default class extends BaseObject {
22
22
  linePrimary: Line[];
23
23
  lineSecondary: Line[];
24
24
  create(): Promise<void>;
25
- initBaseObjectUserData(): void;
26
- render(): void;
27
25
  dispose(): void;
28
26
  }
29
27
  export {};
@@ -192,7 +192,6 @@ export default class extends Base {
192
192
  }): Promise<Group | undefined>;
193
193
  caId: string | number | undefined;
194
194
  showAction(): Promise<void>;
195
- private handlePickTest;
196
195
  hide(): Promise<void>;
197
196
  shadowMapLight?: BaseObject;
198
197
  planeShadow?: BaseObject;
@@ -219,6 +218,7 @@ export default class extends Base {
219
218
  y: number;
220
219
  } | undefined;
221
220
  booleanPointInCn(location: [number, number]): boolean;
221
+ private getGeojson;
222
222
  handleDrillDown({ adcode, duration, handleLook, saveBackCamvasState, extrudelineBloom, }: {
223
223
  adcode: number;
224
224
  duration?: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vis-core",
3
- "version": "0.26.13",
3
+ "version": "0.27.0",
4
4
  "scripts": {
5
5
  "start": "npm run version && PORT=5173 bundler-dev",
6
6
  "build:site": "npm run version && bundler",
@@ -40,7 +40,7 @@
40
40
  "@types/jsrsasign": "^10.5.14",
41
41
  "@types/lodash-es": "^4.17.9",
42
42
  "@types/node": "^20.6.0",
43
- "ant-design-vue": "^4.2.3",
43
+ "ant-design-vue": "^4.2.6",
44
44
  "archiver": "^7.0.1",
45
45
  "dayjs": "^1.11.12",
46
46
  "eslint-config-bundler": "^0.4.2",
@@ -52,7 +52,7 @@
52
52
  "prettier-config-bundler": "^0.4.3",
53
53
  "stylelint-config-bundler": "^0.4.5",
54
54
  "tailwind-config-bundler": "^0.4.6",
55
- "three": "^0.174.0",
55
+ "three": "^0.176.0",
56
56
  "vite-plugin-javascript-obfuscator": "^3.1.0",
57
57
  "vite-plugin-markdown": "^2.2.0",
58
58
  "vite-plugin-static-copy": "^2.2.0",
@@ -64,12 +64,12 @@
64
64
  "dependencies": {
65
65
  "@turf/turf": "^6.5.0",
66
66
  "@types/crypto-js": "^4.2.2",
67
- "@types/three": "^0.174.0",
67
+ "@types/three": "^0.175.0",
68
68
  "crypto-js": "^4.2.0",
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.13",
72
+ "gl-draw": "0.14.34",
73
73
  "jsrsasign": "^11.1.0",
74
74
  "lodash-es": "^4.17.21"
75
75
  },