@aibee/crc-bmap 0.0.141 → 0.0.143

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.
Files changed (67) hide show
  1. package/lib/bmap.cjs.min.js +204 -204
  2. package/lib/bmap.cjs.min.js.map +4 -4
  3. package/lib/bmap.esm.js +1473 -1457
  4. package/lib/bmap.esm.js.map +4 -4
  5. package/lib/bmap.esm.min.js +205 -205
  6. package/lib/bmap.esm.min.js.map +4 -4
  7. package/lib/bmap.min.js +204 -204
  8. package/lib/bmap.min.js.map +4 -4
  9. package/lib/src/bmap.d.ts +5 -18
  10. package/lib/src/context/camera.d.ts +4 -0
  11. package/lib/src/{context.d.ts → context/context.d.ts} +18 -25
  12. package/lib/src/context/control.d.ts +47 -0
  13. package/lib/src/context/index.d.ts +5 -0
  14. package/lib/src/context/renderer.d.ts +23 -0
  15. package/lib/src/context/scene.d.ts +4 -0
  16. package/lib/src/elements/base-svg.d.ts +1 -1
  17. package/lib/src/elements/floor.d.ts +2 -1
  18. package/lib/src/elements/glb-model.d.ts +2 -2
  19. package/lib/src/elements/graphic.d.ts +1 -1
  20. package/lib/src/elements/ground-texture.d.ts +1 -1
  21. package/lib/src/elements/heatmap.d.ts +1 -1
  22. package/lib/src/elements/index.d.ts +1 -0
  23. package/lib/src/elements/lane.d.ts +1 -1
  24. package/lib/src/elements/merge-graphic.d.ts +1 -1
  25. package/lib/src/elements/model.d.ts +1 -1
  26. package/lib/src/elements/overlay.d.ts +1 -1
  27. package/lib/src/elements/poi.d.ts +1 -1
  28. package/lib/src/elements/poi2.d.ts +2 -2
  29. package/lib/src/elements/select-box.d.ts +1 -1
  30. package/lib/src/elements/svg-line.d.ts +1 -1
  31. package/lib/src/elements/svg-polygon.d.ts +1 -1
  32. package/lib/src/elements/text-texture.d.ts +28 -0
  33. package/lib/src/elements/wall.d.ts +1 -1
  34. package/lib/src/factory/img-texture.d.ts +7 -0
  35. package/lib/src/factory/index.d.ts +4 -0
  36. package/lib/src/factory/material.d.ts +14 -22
  37. package/lib/src/factory/model.d.ts +7 -0
  38. package/lib/src/factory/text-texture.d.ts +20 -0
  39. package/lib/src/factory/unique-key.d.ts +7 -0
  40. package/lib/src/index.d.ts +2 -2
  41. package/lib/src/layer/graphic-layer.d.ts +1 -1
  42. package/lib/src/layer/layer.d.ts +1 -1
  43. package/lib/src/layer/poi-layer.d.ts +1 -1
  44. package/lib/src/layer/poi-layer2.d.ts +1 -1
  45. package/lib/src/loader/AibeeLoader/type.d.ts +13 -1
  46. package/lib/src/{api → loader/CrLoader/api}/floor.d.ts +2 -2
  47. package/lib/src/loader/CrLoader/index.d.ts +21 -0
  48. package/lib/src/loader/index.d.ts +1 -0
  49. package/lib/src/operations/hover/hover-helper.d.ts +1 -1
  50. package/lib/src/operations/selection/box-selection.d.ts +1 -1
  51. package/lib/src/operations/selection/selection.d.ts +1 -1
  52. package/lib/src/plugins/index.d.ts +0 -1
  53. package/lib/src/plugins/navigation/navigation.d.ts +2 -2
  54. package/lib/src/utils/camera-bound.d.ts +1 -1
  55. package/lib/src/utils/color.d.ts +1 -0
  56. package/lib/src/utils/create.d.ts +2 -0
  57. package/lib/src/utils/index.d.ts +2 -3
  58. package/lib/src/utils/init-helper.d.ts +2 -7
  59. package/lib/src/{loader/AibeeLoader/utils.d.ts → utils/translate.d.ts} +1 -1
  60. package/package.json +1 -1
  61. package/lib/src/factory/texture.d.ts +0 -10
  62. package/lib/src/plugins/split-load/index.d.ts +0 -1
  63. package/lib/src/plugins/split-load/split-load.d.ts +0 -16
  64. package/lib/src/utils/model.d.ts +0 -8
  65. package/lib/src/utils/texture.d.ts +0 -10
  66. package/lib/src/utils/unique-key.d.ts +0 -7
  67. /package/lib/src/{api → loader/CrLoader/api}/index.d.ts +0 -0
@@ -1 +1,2 @@
1
1
  export * from './AibeeLoader';
2
+ export * from './CrLoader';
@@ -1,5 +1,5 @@
1
1
  import { Graphic, Poi } from "../../elements";
2
- import { Context } from "../../context";
2
+ import { Context } from "../../context/context";
3
3
  import { EventDispatcher } from "three";
4
4
  import { Timer } from "../../utils";
5
5
  interface HoverHelperEventMap {
@@ -1,4 +1,4 @@
1
- import { Context } from "../../context";
1
+ import { Context } from "../../context/context";
2
2
  import { BaseSvg, Graphic } from "../../elements";
3
3
  import { Frustum, Vector3 } from "three";
4
4
  interface BoxSelectionEventMap {
@@ -1,5 +1,5 @@
1
1
  import { EventDispatcher } from "three";
2
- import { Context } from "../../context";
2
+ import { Context } from "../../context/context";
3
3
  import { Graphic } from "../../elements";
4
4
  import { BoxSelection } from "./box-selection";
5
5
  interface SelectionEventMap {
@@ -1,4 +1,3 @@
1
1
  export * from "./equipment";
2
2
  export * from "./navigation";
3
- export * from './split-load';
4
3
  export * from './mul-floors';
@@ -1,7 +1,7 @@
1
1
  import { BMap } from "../../bmap";
2
2
  import { Plugin } from "../base";
3
3
  import { Path, PathConfig } from "./path";
4
- import { End, PathData, RoadData, RouteType, Start, UniqueKey } from "../../utils";
4
+ import { End, PathData, RoadData, RouteType, Start } from "../../utils";
5
5
  import { Floor, Poi2, PoiOptions2 } from "../../elements";
6
6
  import { Group as TweenGroup } from "@tweenjs/tween.js";
7
7
  export type Point = [number, number];
@@ -25,12 +25,12 @@ export interface NavigationConfig {
25
25
  needStartPoi: boolean;
26
26
  loadRoad: boolean;
27
27
  roadNetwork: "RoadNetwork" | "RoadNetwork2";
28
+ offsetY: number;
28
29
  }
29
30
  export declare class Navigation extends Plugin<EventMap> {
30
31
  path: Path | null;
31
32
  worker: any;
32
33
  fetchRoadStatus: boolean;
33
- uniqueKey: UniqueKey;
34
34
  paths: PathData;
35
35
  options: NavigationConfig;
36
36
  pathTween: TweenGroup;
@@ -1,5 +1,5 @@
1
1
  import { Box3 } from "three";
2
- import { Context } from "../context";
2
+ import { Context } from "../context/context";
3
3
  export declare class CameraBound {
4
4
  private context;
5
5
  private prevCamera;
@@ -7,3 +7,4 @@ export declare function strToNumber(str: string): number;
7
7
  */
8
8
  export declare function addAlphaToHexColor(hexColor: string, alpha: number): string;
9
9
  export declare function darkenColor(hexColor: string, factor?: number): string;
10
+ export declare function hexToRgb(hex: string, opacity?: number): string;
@@ -0,0 +1,2 @@
1
+ import { BufferGeometry, Line, LineBasicMaterial, Vector3 } from "three";
2
+ export declare function createThreeLine(points: Vector3[], color?: number): Line<BufferGeometry<import("three").NormalBufferAttributes>, LineBasicMaterial>;
@@ -1,7 +1,6 @@
1
1
  export * from './timer';
2
2
  export * from './init-helper';
3
3
  export * from './dispose';
4
- export * from './texture';
5
4
  export * from './rules';
6
5
  export * from './coordinate';
7
6
  export * from './proxy';
@@ -9,16 +8,16 @@ export * from './promise';
9
8
  export * from './svg';
10
9
  export * from './sleep';
11
10
  export * from './color';
12
- export * from './model';
13
11
  export * from './keyboard';
14
12
  export * from './os';
15
13
  export * from './events';
16
14
  export * from './event-name';
17
15
  export * from './obj-utils';
18
16
  export * from './ajax';
19
- export * from './unique-key';
20
17
  export * from './path';
21
18
  export * from './road';
22
19
  export * from './road2';
23
20
  export * from './webworker';
24
21
  export * from './string';
22
+ export * from './create';
23
+ export * from './translate';
@@ -1,10 +1,5 @@
1
- import { Coordinate } from 'src/types';
2
- import { Scene, WebGLRenderer, OrthographicCamera, Shape, Group, DirectionalLight } from 'three';
3
- import { MapControls } from 'three/examples/jsm/controls/MapControls';
4
- export declare function initScene(): Scene;
5
- export declare function initRenderer(): WebGLRenderer;
6
- export declare function initCamera(width: number, height: number): OrthographicCamera;
1
+ import { Coordinate } from "src/types";
2
+ import { Shape, Group, DirectionalLight } from "three";
7
3
  export declare function initLight(): Group<import("three").Object3DEventMap>;
8
- export declare function initControl(camera: OrthographicCamera, domElement: HTMLCanvasElement): MapControls;
9
4
  export declare function initShape(path: Coordinate[], holePath?: Coordinate[][]): Shape;
10
5
  export declare function initDirectionalLight(color?: number, intensity?: number): DirectionalLight;
@@ -1,4 +1,4 @@
1
- import { PointGeometry, PolygonGeometry, Door } from "../../types";
1
+ import { PointGeometry, PolygonGeometry, Door } from "../types";
2
2
  export declare function transformGraphicData(data: {
3
3
  geometry: PolygonGeometry | PointGeometry;
4
4
  deltaHeight?: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aibee/crc-bmap",
3
- "version": "0.0.141",
3
+ "version": "0.0.143",
4
4
  "description": "",
5
5
  "main": "lib/bmap.min.js",
6
6
  "module": "lib/bmap.esm.js",
@@ -1,10 +0,0 @@
1
- import { Texture, TextureLoader } from "three";
2
- import { Context } from "../context";
3
- export declare class TextureFactory {
4
- private context;
5
- textureMap: Map<string, Texture | Promise<Texture>>;
6
- loader: TextureLoader;
7
- constructor(context: Context);
8
- getTexture(url: string): Promise<Texture>;
9
- dispose(): void;
10
- }
@@ -1 +0,0 @@
1
- export * from './split-load';
@@ -1,16 +0,0 @@
1
- import { GraphicInfo, LoadQuery } from "../../types";
2
- import { Plugin } from "../base";
3
- type LoadGraphicQuery = Omit<LoadQuery, "resource_type_list">;
4
- export declare class SplitLoad extends Plugin {
5
- cacheData: Map<string, GraphicInfo[]>;
6
- floorDataLengthMap: Map<any, any>;
7
- load(query: LoadQuery): Promise<GraphicInfo[]>;
8
- isSameFloor(query: LoadGraphicQuery): boolean;
9
- switchFloorByData(data: GraphicInfo[], query: LoadGraphicQuery): void;
10
- filterData(data: GraphicInfo[], query: LoadGraphicQuery): GraphicInfo[];
11
- private switchFloorByStoreData;
12
- private switchFloorByOtherData;
13
- loadBuildGround({ brand, project }: LoadGraphicQuery): Promise<GraphicInfo | null>;
14
- changeFloor(query: LoadGraphicQuery): Promise<unknown[]>;
15
- }
16
- export {};
@@ -1,8 +0,0 @@
1
- import { GLTF } from 'three/examples/jsm/loaders/GLTFLoader';
2
- /**
3
- * 加载模型
4
- * @param url
5
- * @returns
6
- */
7
- export declare function loadModel(url: string): Promise<GLTF>;
8
- export declare function disposeLoader(): void;
@@ -1,10 +0,0 @@
1
- import { DataTexture, Texture } from 'three';
2
- export declare function initCanvas(): {
3
- canvas: HTMLCanvasElement;
4
- ctx: CanvasRenderingContext2D;
5
- };
6
- export declare function createCanvas(): void;
7
- export declare function getTextureByText(text: string): DataTexture;
8
- export declare function clearTextTexture(): void;
9
- export declare function clearCanvas(): void;
10
- export declare function getTextureByUrl(url: string): Promise<Texture>;
@@ -1,7 +0,0 @@
1
- export declare class UniqueKey {
2
- keySet: Set<string>;
3
- static createKey(): string;
4
- genUniqueKey(): string;
5
- removeKey(key: string): void;
6
- dispose(): void;
7
- }
File without changes