@aibee/crc-bmap 0.8.32 → 0.8.33

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.
@@ -0,0 +1,6 @@
1
+ declare let ParkingTypeIconMap: Record<string, string>;
2
+ export { ParkingTypeIconMap };
3
+ declare let ManGlb: string;
4
+ export { ManGlb };
5
+ declare let Arrow: string;
6
+ export { Arrow };
@@ -0,0 +1,23 @@
1
+ // 默认不使用online在明确是公网服务的时候,用online模式优化SDK文件大小
2
+ const isOnline = process.env.CRC_BMAP_MODE === "online";
3
+ let ParkingTypeIconMap;
4
+ if (isOnline) {
5
+ ParkingTypeIconMap = require("./online").ParkingTypeIconMap;
6
+ } else {
7
+ ParkingTypeIconMap = require("./offline").ParkingTypeIconMap;
8
+ }
9
+ export { ParkingTypeIconMap };
10
+ let ManGlb;
11
+ if (isOnline) {
12
+ ManGlb = require("./online").ManGlb;
13
+ } else {
14
+ ManGlb = require("./offline").ManGlb;
15
+ }
16
+ export { ManGlb };
17
+ let Arrow;
18
+ if (isOnline) {
19
+ Arrow = require("./online").Arrow;
20
+ } else {
21
+ Arrow = require("./offline").Arrow;
22
+ }
23
+ export { Arrow };
@@ -0,0 +1,3 @@
1
+ export declare const ParkingTypeIconMap: Record<string, string>;
2
+ export declare const ManGlb: string;
3
+ export declare const Arrow: string;
@@ -0,0 +1,17 @@
1
+ import HalfParkingSpaceIcon from './icon/parkingSpace/half.svg';
2
+ import PowerParkingSpaceIcon from './icon/parkingSpace/power.svg';
3
+ import MechanicalParkingSpaceIcon from './icon/parkingSpace/mechanical.svg';
4
+ import VipParkingSpaceIcon from './icon/parkingSpace/vip.svg';
5
+ import manGlb from './glb/man2.glb';
6
+ import ArrowPng from "./icon/path/arrow.png";
7
+ // 车位贴图
8
+ export const ParkingTypeIconMap = {
9
+ half: HalfParkingSpaceIcon,
10
+ power: PowerParkingSpaceIcon,
11
+ mechanical: MechanicalParkingSpaceIcon,
12
+ vip: VipParkingSpaceIcon
13
+ };
14
+ // 人物模型
15
+ export const ManGlb = manGlb;
16
+ // 路线贴图
17
+ export const Arrow = ArrowPng;
@@ -0,0 +1,3 @@
1
+ export declare const ParkingTypeIconMap: Record<string, string>;
2
+ export declare const ManGlb = "https://robot-vr-public.cdn.bcebos.com/navigation_images/91ff33881f8b45acea4501fc6ff2fe9a.glb";
3
+ export declare const Arrow = "https://robot-vr-public.cdn.bcebos.com/navigation_images/b03b83729f7483a55793696a866e64db.png";
@@ -0,0 +1,11 @@
1
+ // 车位贴图
2
+ export const ParkingTypeIconMap = {
3
+ half: "https://robot-vr-public.cdn.bcebos.com/navigation_images/4df9149cef8dacc8072a9eeb7df46af7.svg",
4
+ power: "https://robot-vr-public.cdn.bcebos.com/navigation_images/57c894cd4a83c1a9ecf34248beff6d12.svg",
5
+ mechanical: "https://robot-vr-public.cdn.bcebos.com/navigation_images/ee87d9ef0abf1397992ebe037fc7d044.svg",
6
+ vip: "https://robot-vr-public.cdn.bcebos.com/navigation_images/bfcffa616d3934a191f4709046e870b1.svg"
7
+ };
8
+ // 人物模型
9
+ export const ManGlb = "https://robot-vr-public.cdn.bcebos.com/navigation_images/91ff33881f8b45acea4501fc6ff2fe9a.glb";
10
+ // 路线贴图
11
+ export const Arrow = "https://robot-vr-public.cdn.bcebos.com/navigation_images/b03b83729f7483a55793696a866e64db.png";
@@ -1,10 +1,7 @@
1
1
  import { _ as _extends } from "@swc/helpers/_/_extends";
2
2
  import { getMinEdgeSquare, transformGraphicData, translatePosToCenter } from "../../utils";
3
3
  import { GlbModel, GroundTexture, Lane, MergeGraphic, Poi2, TextTexture, Wall } from "../../elements";
4
- import HalfParkingSpaceIcon from '../../assets/icon/parkingSpace/half.svg';
5
- import PowerParkingSpaceIcon from '../../assets/icon/parkingSpace/power.svg';
6
- import MechanicalParkingSpaceIcon from '../../assets/icon/parkingSpace/mechanical.svg';
7
- import VipParkingSpaceIcon from '../../assets/icon/parkingSpace/vip.svg';
4
+ import { ParkingTypeIconMap } from '../../assets';
8
5
  export function transformLayers(layer, floor) {
9
6
  switch(layer.l_type){
10
7
  case 'graph':
@@ -230,13 +227,6 @@ export function transformLayers(layer, floor) {
230
227
  }
231
228
  });
232
229
  }
233
- // 车位贴图
234
- const ParkingTypeIconMap = {
235
- half: HalfParkingSpaceIcon,
236
- power: PowerParkingSpaceIcon,
237
- mechanical: MechanicalParkingSpaceIcon,
238
- vip: VipParkingSpaceIcon
239
- };
240
230
  /**
241
231
  * 车位
242
232
  */ export function parkingSpaceLayer(layer, floor) {
@@ -5,10 +5,11 @@ import { MulPath } from "./path";
5
5
  import { getPointEdgeIndex, TweenUtil } from "../../utils";
6
6
  import { getPosByPathDistance, simplifyPath } from "../../utils/path";
7
7
  import { Tween } from "@tweenjs/tween.js";
8
- import glb from './man2.glb';
8
+ // import glb from './man2.glb'
9
9
  import { StartModel } from "./start-model";
10
10
  import { Vector3 } from "three";
11
11
  import { isNil } from "lodash";
12
+ import { ManGlb } from '../../assets';
12
13
  export class MulFloorNavigation extends Plugin {
13
14
  registryEvent() {
14
15
  this.bmap.context.addEventListener("update", this.onUpdate);
@@ -226,7 +227,7 @@ export class MulFloorNavigation extends Plugin {
226
227
  }, this.cPath = [], this.onUpdate = ()=>{
227
228
  this.tweenUtil.update();
228
229
  };
229
- this.startModel = new StartModel(bmap, glb);
230
+ this.startModel = new StartModel(bmap, ManGlb);
230
231
  this.startModel.visible = false;
231
232
  this.bmap.context.scene.add(this.startModel);
232
233
  this.registryEvent();
@@ -2,7 +2,7 @@ import { _ as _async_to_generator } from "@swc/helpers/_/_async_to_generator";
2
2
  import { Mesh, Object3D, TextureLoader, Color, Vector2, Vector3, NormalBlending, RepeatWrapping } from "three";
3
3
  // @ts-ignore
4
4
  import { MeshLine, MeshLineMaterial } from "../../external/meshLine";
5
- import Arrow from "../../assets/icon/path/arrow.png";
5
+ import { Arrow } from "../../assets";
6
6
  import { getPathLength, vector3ToDevice } from "../../utils";
7
7
  export const defaultConfig = {
8
8
  texture_url: Arrow,
@@ -2,7 +2,7 @@ import { _ as _async_to_generator } from "@swc/helpers/_/_async_to_generator";
2
2
  import { Mesh, Object3D, TextureLoader, Color, Vector2, Vector3, NormalBlending, RepeatWrapping } from "three";
3
3
  // @ts-ignore
4
4
  import { MeshLine, MeshLineMaterial } from "../../external/meshLine";
5
- import Arrow from "../../assets/icon/path/arrow.png";
5
+ import { Arrow } from "../../assets";
6
6
  import { getPathLength, vector3ToDevice } from "../../utils";
7
7
  export const defaultConfig = {
8
8
  texture_url: Arrow,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aibee/crc-bmap",
3
- "version": "0.8.32",
3
+ "version": "0.8.33",
4
4
  "description": "",
5
5
  "main": "lib/bmap.min.js",
6
6
  "module": "lib/bmap.esm.js",