@aibee/crc-bmap 0.0.96 → 0.0.98

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/lib/src/bmap.d.ts CHANGED
@@ -61,8 +61,8 @@ export declare class BMap extends EventDispatcher<BmapEventMap> {
61
61
  loadBuildingGround({ brand, project, }: Omit<LoadQuery, "floor" | "ts" | "resource_type_list">): Promise<GraphicInfo | null>;
62
62
  load({ brand, project, floor, ts, resource_type_list, }: LoadQuery): Promise<GraphicInfo[] | undefined>;
63
63
  transformGraphicData(data: GraphicInfo[], center?: number[], baseIndex?: number): void;
64
- loadEquipment(): void;
65
64
  use(plugin: Plugin): void;
65
+ unUse(plugin: Plugin): void;
66
66
  createFloor(data: GraphicInfo[]): {
67
67
  curFloor: Floor;
68
68
  graphics: Graphic[];
@@ -19,6 +19,7 @@ export declare class Floor extends Object3D {
19
19
  modelMap: Map<any, any>;
20
20
  groundMaxHeight: number;
21
21
  name: string;
22
+ key: string;
22
23
  constructor(context: Context);
23
24
  getPosition(): Vector3;
24
25
  createGround(options: GraphicOptionsParam): void;
@@ -37,7 +37,7 @@ type PoiEventMap = {
37
37
  export type PoiOptionsParam = Partial<PoiOptions>;
38
38
  export declare class Poi extends EventDispatcher<PoiEventMap> {
39
39
  private context;
40
- private div;
40
+ div: HTMLDivElement;
41
41
  private textDiv;
42
42
  private img?;
43
43
  private overlay;
@@ -48,7 +48,7 @@ export declare class Poi extends EventDispatcher<PoiEventMap> {
48
48
  height: number;
49
49
  };
50
50
  position: Vector3;
51
- userData: {};
51
+ userData: any;
52
52
  showTextStatus: boolean;
53
53
  disposed: boolean;
54
54
  constructor(context: Context, options: PoiOptionsParam);
@@ -39,7 +39,7 @@ export declare class Navigation extends Plugin<EventMap> {
39
39
  nodeId: string;
40
40
  }): Promise<PathData>;
41
41
  renderPath(points: Point[]): void;
42
- catmullRomCurve3(points: Point[]): number[][];
42
+ catmullRomCurve3(points: Point[]): [number, number][];
43
43
  dispose(): void;
44
44
  }
45
45
  export {};
@@ -0,0 +1,10 @@
1
+ /**
2
+ * 路径简化
3
+ * @param path 路径点集数组
4
+ * @param ignoreFirst 是否在简化过程中忽略第一个点
5
+ * @param smoothingOptimization 是否针对平滑对路径进行插值
6
+ * @param simplifyDistanceThreshold 简化时路径最短保留的距离, 默认为5
7
+ * @param maximumTurningDegree 简化时三点夹角认定为转弯的最大角度,默认为150
8
+ * @param smoothingDistance 平滑时使用的转角最大距离
9
+ */
10
+ export declare function simplifyPath(path: [number, number][], ignoreFirst?: boolean, smoothingOptimization?: boolean, simplifyDistanceThreshold?: number, maximumTurningDegree?: number, smoothingDistance?: number): [number, number][];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aibee/crc-bmap",
3
- "version": "0.0.96",
3
+ "version": "0.0.98",
4
4
  "description": "",
5
5
  "main": "lib/bmap.min.js",
6
6
  "module": "lib/bmap.esm.min.js",
@@ -19,9 +19,9 @@
19
19
  "start": "cd example && vite",
20
20
  "dev": "ts-node --esm ./build/dev.ts",
21
21
  "publish:all": "npm run build && npm version patch && npm run publish:npm && npm run publish:aibee",
22
- "publish:npm": "npm publish --access public --registry https://registry.npmjs.org",
23
- "publish:aibee": "npm publish --registry https://npm.aibee.cn",
24
-
22
+ "publish:npm": "npm run publish:pre && npm publish --access public --registry https://registry.npmjs.org",
23
+ "publish:aibee": "npm run publish:pre && npm publish --registry https://npm.aibee.cn",
24
+ "publish:pre": "mv .npmrc .npmrc.bak",
25
25
  "postpublish": "mv .npmrc.bak .npmrc"
26
26
  },
27
27
  "keywords": [],
@@ -46,6 +46,7 @@
46
46
  "@turf/turf": "^6.5.0",
47
47
  "@tweenjs/tween.js": "^21.0.0",
48
48
  "@types/three": "^0.156.0",
49
+ "chaikin-smooth": "^1.0.4",
49
50
  "hotkeys-js": "^3.12.0",
50
51
  "lodash": "^4.17.21",
51
52
  "meshline": "^3.3.0",