@aibee/crc-bmap 0.0.86 → 0.0.87

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.
@@ -16,6 +16,7 @@ export declare class Floor extends Object3D {
16
16
  heatmap?: HeatmapElement;
17
17
  groundUpper: Object3D<import("three").Object3DEventMap>;
18
18
  models: Object3D<import("three").Object3DEventMap>;
19
+ modelMap: Map<any, any>;
19
20
  private groundMaxHeight;
20
21
  constructor(context: Context);
21
22
  getPosition(): Vector3;
@@ -1,6 +1,6 @@
1
- import { Object3D, ExtrudeGeometry, Mesh, MeshBasicMaterial, Raycaster, Object3DEventMap, Vector3, BufferGeometry, LineBasicMaterial, LineSegments } from 'three';
2
- import { GraphicOptions } from 'src/types';
3
- import { Context } from '../context';
1
+ import { Object3D, ExtrudeGeometry, Mesh, MeshBasicMaterial, Raycaster, Object3DEventMap, Vector3, BufferGeometry, LineBasicMaterial, LineSegments, ShaderMaterial } from "three";
2
+ import { GraphicOptions } from "src/types";
3
+ import { Context } from "../context";
4
4
  declare const DoorType: {
5
5
  single: string;
6
6
  double: string;
@@ -40,7 +40,9 @@ export declare class Graphic extends Object3D<GraphicEventMap> {
40
40
  getPosition(): Vector3;
41
41
  init(): void;
42
42
  initGeometry(): ExtrudeGeometry;
43
- initMaterial(): MeshBasicMaterial | MeshBasicMaterial[];
43
+ initSingleMaterial(): MeshBasicMaterial | MeshBasicMaterial[];
44
+ initGradualMaterial(): ShaderMaterial | ShaderMaterial[];
45
+ initMaterial(): MeshBasicMaterial | ShaderMaterial | MeshBasicMaterial[] | ShaderMaterial[];
44
46
  initLineMaterial(): LineBasicMaterial;
45
47
  initMesh(): void;
46
48
  getBorderPoints(): Vector3[];
@@ -7,6 +7,7 @@ export interface ModelOptions {
7
7
  icon?: string;
8
8
  icon_size?: [number, number];
9
9
  position?: Vector3;
10
+ id: string;
10
11
  }
11
12
  export declare class Model extends Object3D {
12
13
  context: Context;
@@ -31,6 +31,7 @@ export declare class Overlay extends EventDispatcher<OverlayEventMap> {
31
31
  setOpacity(opacity: number): void;
32
32
  getPosition(): Vector3;
33
33
  get withinDisplayRange(): boolean;
34
+ updatePosition(force?: boolean): void;
34
35
  onUpdate: () => void;
35
36
  registryEvent(): void;
36
37
  unRegistryEvent(): void;
@@ -1,5 +1,5 @@
1
1
  import { Context } from "../context";
2
- import { LineBasicMaterial, MeshStandardMaterial, MeshBasicMaterial } from "three";
2
+ import { LineBasicMaterial, MeshStandardMaterial, MeshBasicMaterial, ShaderMaterial, Vector3 } from "three";
3
3
  interface LineMaterialOptions {
4
4
  color: string;
5
5
  opacity: number;
@@ -12,16 +12,27 @@ interface MeshBasicMaterialOptions {
12
12
  color: string;
13
13
  opacity: number;
14
14
  }
15
+ interface ShaderMaterialOptions {
16
+ gradualColor: string[];
17
+ center: Vector3;
18
+ maxValue: number;
19
+ opacity: number;
20
+ direction: Vector3;
21
+ max: Vector3;
22
+ min: Vector3;
23
+ }
15
24
  export declare class MaterialFactory {
16
25
  private context;
17
26
  private lineMaterialMap;
18
27
  private meshStandardMaterialMap;
19
28
  private meshBasicMaterialMap;
29
+ private shaderMaterialMap;
20
30
  constructor(context: Context);
21
31
  generateLineMaterialKey({ color, opacity }: LineMaterialOptions): string;
22
32
  createLineMaterial({ color, opacity }: LineMaterialOptions): LineBasicMaterial;
23
33
  createMeshStandardMaterial({ color, opacity }: MeshStandardMaterialOptions): MeshStandardMaterial;
24
34
  createMeshBasicMaterial({ color, opacity }: MeshBasicMaterialOptions): MeshBasicMaterial;
35
+ createShaderMaterial({ gradualColor, center, maxValue, opacity, direction, max, min }: ShaderMaterialOptions): ShaderMaterial;
25
36
  dispose(): void;
26
37
  }
27
38
  export {};
@@ -2,6 +2,7 @@ export type Coordinate = [number, number];
2
2
  export interface PointGeometry {
3
3
  type: "point";
4
4
  cds: Coordinate;
5
+ coords: Coordinate;
5
6
  curveCpt: Coordinate[];
6
7
  curveIndex: [];
7
8
  }
@@ -10,6 +11,7 @@ export interface PolygonGeometry {
10
11
  cds: Coordinate[][];
11
12
  curveCpt: Coordinate[];
12
13
  curveIndex: number[];
14
+ coords: Coordinate[][];
13
15
  }
14
16
  export interface GraphicOptions {
15
17
  id: string;
@@ -32,6 +34,8 @@ export interface GraphicOptions {
32
34
  deltaHeight: number;
33
35
  stroke?: boolean;
34
36
  userData: Record<string, any>;
37
+ gradualColor: string[];
38
+ renderType: "gradual" | "single";
35
39
  }
36
40
  /**
37
41
  * 接口返回的图元信息
@@ -6,4 +6,4 @@ export declare function strToNumber(str: string): number;
6
6
  * @returns
7
7
  */
8
8
  export declare function addAlphaToHexColor(hexColor: string, alpha: number): string;
9
- export declare function darkenColor(hexColor: string): string;
9
+ export declare function darkenColor(hexColor: string, factor?: number): string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aibee/crc-bmap",
3
- "version": "0.0.86",
3
+ "version": "0.0.87",
4
4
  "description": "",
5
5
  "main": "lib/bmap.min.js",
6
6
  "module": "lib/bmap.esm.min.js",