@aibee/crc-bmap 0.0.115 → 0.0.116

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.
@@ -12,6 +12,8 @@ export declare class Floor extends Object3D {
12
12
  poiLayer: PoiLayer;
13
13
  wallLayer: Layer;
14
14
  textureLayer: Layer;
15
+ glbModelLayer: Layer;
16
+ laneLayer: Layer;
15
17
  grounds: Set<Graphic>;
16
18
  shadow: Shadow;
17
19
  heatmap?: HeatmapElement;
@@ -0,0 +1,21 @@
1
+ import { Object3D } from "three";
2
+ import { Context } from "../context";
3
+ import { GLTF } from "three/examples/jsm/loaders/GLTFLoader";
4
+ import { PolygonGeometry } from "src/types";
5
+ export interface GlbModelOptions {
6
+ url: string;
7
+ geometry: PolygonGeometry;
8
+ id: string;
9
+ width: number;
10
+ rotate: number;
11
+ airHeight: number;
12
+ deltaHeight: number;
13
+ }
14
+ export declare class GlbModel extends Object3D {
15
+ context: Context;
16
+ model: GLTF | null;
17
+ options: GlbModelOptions;
18
+ constructor(context: Context, options: Partial<GlbModelOptions>);
19
+ loadModel(): Promise<void>;
20
+ dispose(): void;
21
+ }
@@ -1,15 +1,15 @@
1
1
  import { Context } from "../context";
2
2
  import { Mesh, Object3D } from "three";
3
+ import { PolygonGeometry } from "../types";
3
4
  export interface GroundTextureOptions {
4
5
  uuid: string;
5
- url: string;
6
+ iconUrl: string;
6
7
  name: string;
7
- angleX: number;
8
- angleY: number;
9
- angleZ: number;
10
- width: number;
8
+ secondRotate: number;
9
+ deltaHeight: number;
10
+ airHeight: number;
11
11
  height: number;
12
- center: [number, number];
12
+ geometry: PolygonGeometry;
13
13
  opacity: number;
14
14
  visible: boolean;
15
15
  }
@@ -11,3 +11,5 @@ export * from './select-box';
11
11
  export * from './model';
12
12
  export * from './wall';
13
13
  export * from './ground-texture';
14
+ export * from './glb-model';
15
+ export * from './lane';
@@ -0,0 +1,38 @@
1
+ import { PolygonGeometry } from "../types";
2
+ import { Context } from "../context";
3
+ import { BufferGeometry, LineBasicMaterial, LineSegments, Mesh, MeshBasicMaterial, Object3D, Vector3 } from "three";
4
+ export interface LaneOptions {
5
+ id: string;
6
+ airHeight: number;
7
+ fillColor: string;
8
+ fillOpacity: number;
9
+ secondColor: string;
10
+ secondWidth: number;
11
+ strokeColor: string;
12
+ strokeOpacity: number;
13
+ geometry: PolygonGeometry;
14
+ double: boolean;
15
+ dashed: boolean;
16
+ deltaHeight?: number;
17
+ userData: Record<string, any>;
18
+ }
19
+ export declare class Lane extends Object3D {
20
+ private context;
21
+ options: LaneOptions[];
22
+ geometry?: BufferGeometry;
23
+ material?: MeshBasicMaterial;
24
+ lineMaterial?: LineBasicMaterial;
25
+ lineGeometry?: BufferGeometry;
26
+ Mesh?: Mesh;
27
+ LineMesh?: LineSegments;
28
+ constructor(context: Context, options: LaneOptions[]);
29
+ initGeometry(): void;
30
+ initMaterial(): MeshBasicMaterial;
31
+ initLineMaterial(): LineBasicMaterial;
32
+ getBorderPoints(option: LaneOptions): Vector3[];
33
+ initDoubleLine(): void;
34
+ initLineGeometry(): void;
35
+ createBorder(): LineSegments<BufferGeometry<import("three").NormalBufferAttributes>, LineBasicMaterial>;
36
+ init(): void;
37
+ dispose(): void;
38
+ }
@@ -1,3 +1,4 @@
1
+ import { LineMaterial } from "three/examples/jsm/lines/LineMaterial";
1
2
  import { Context } from "../context";
2
3
  import { LineBasicMaterial, MeshStandardMaterial, MeshBasicMaterial, ShaderMaterial, Vector3 } from "three";
3
4
  interface LineMaterialOptions {
@@ -25,6 +26,11 @@ interface GroundTextureMaterialOptions {
25
26
  url: string;
26
27
  opacity: number;
27
28
  }
29
+ interface Line2MaterialMapOptions {
30
+ color: string;
31
+ width: number;
32
+ dashed: boolean;
33
+ }
28
34
  export declare class MaterialFactory {
29
35
  private context;
30
36
  private lineMaterialMap;
@@ -32,6 +38,7 @@ export declare class MaterialFactory {
32
38
  private meshBasicMaterialMap;
33
39
  private shaderMaterialMap;
34
40
  private groundTextureMaterialMap;
41
+ private line2MaterialMap;
35
42
  constructor(context: Context);
36
43
  generateLineMaterialKey({ color, opacity }: LineMaterialOptions): string;
37
44
  createLineMaterial({ color, opacity }: LineMaterialOptions): LineBasicMaterial;
@@ -39,6 +46,7 @@ export declare class MaterialFactory {
39
46
  createMeshBasicMaterial({ color, opacity }: MeshBasicMaterialOptions): MeshBasicMaterial;
40
47
  createShaderMaterial({ gradualColor, center, maxValue, opacity, direction, max, min, }: ShaderMaterialOptions): ShaderMaterial;
41
48
  createGroundTextureMaterial({ url, opacity }: GroundTextureMaterialOptions): Promise<MeshBasicMaterial>;
49
+ createLine2MaterialMap({ color, width, dashed }: Line2MaterialMapOptions): LineMaterial;
42
50
  dispose(): void;
43
51
  }
44
52
  export {};
@@ -45,24 +45,29 @@ export interface AibeeWallLayer {
45
45
  export interface AibeeLaneLayer {
46
46
  name: string;
47
47
  l_type: "lane";
48
- elements: AibeeGraphicLayer["elements"];
48
+ elements: (AibeeGraphicLayer["elements"][0] & {
49
+ secondColor: string;
50
+ secondWidth: number;
51
+ geometry: PolygonGeometry;
52
+ double: boolean;
53
+ dashed: boolean;
54
+ })[];
49
55
  }
50
56
  export interface AibeeTexture2dLayer {
51
57
  name: string;
52
58
  l_type: "texture2d";
53
59
  elements: {
54
60
  uuid: string;
55
- url: string;
61
+ iconUrl: string;
56
62
  name: string;
57
- angleX: number;
58
- angleY: number;
59
- angleZ: number;
60
- width: number;
63
+ secondRotate: number;
64
+ deltaHeight: number;
65
+ airHeight: number;
61
66
  height: number;
62
- center: [number, number];
63
67
  opacity: number;
64
68
  visible: boolean;
65
69
  poi_info: any;
70
+ geometry: PolygonGeometry;
66
71
  }[];
67
72
  }
68
73
  export interface AibeeTexture3dLayer {
@@ -74,7 +79,10 @@ export interface AibeeGlbLayer {
74
79
  name: string;
75
80
  l_type: "glb";
76
81
  elements: (AibeeGraphicLayer["elements"][0] & {
77
- poi_info: any;
82
+ secondUrl: string;
83
+ secondWidth: number;
84
+ secondRotate: number;
85
+ geometry: PolygonGeometry;
78
86
  })[];
79
87
  }
80
88
  export interface AibeeStoreLayer {
@@ -1,3 +1,6 @@
1
- import { AibeeGraphicLayer } from "./type";
2
- export declare function transformGraphicData(data: AibeeGraphicLayer['elements'], center: [number, number], baseIndex?: number): void;
1
+ import { PointGeometry, PolygonGeometry } from "../../types";
2
+ export declare function transformGraphicData(data: {
3
+ geometry: PolygonGeometry | PointGeometry;
4
+ deltaHeight?: number;
5
+ }[], center: [number, number], baseIndex?: number): void;
3
6
  export declare function translatePosToCenter(cds: [number, number], center: [number, number]): [number, number];
@@ -12,6 +12,8 @@ export interface PolygonGeometry {
12
12
  curveCpt: Coordinate[];
13
13
  curveIndex: number[];
14
14
  coords: Coordinate[][];
15
+ otherCds?: Coordinate[][];
16
+ otherCoords?: Coordinate[][];
15
17
  }
16
18
  export interface GraphicOptions {
17
19
  id: string;
@@ -45,3 +45,4 @@ export declare function remove(storeName: string, key: string, db?: IDBDatabase)
45
45
  * @returns
46
46
  */
47
47
  export declare function update(storeName: string, key: string, value: any, db?: IDBDatabase): Promise<unknown>;
48
+ export declare function closeDb(): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aibee/crc-bmap",
3
- "version": "0.0.115",
3
+ "version": "0.0.116",
4
4
  "description": "",
5
5
  "main": "lib/bmap.min.js",
6
6
  "module": "lib/bmap.esm.js",