@aibee/crc-bmap 0.12.48 → 0.12.50
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/README.md +2 -2
- package/lib/draco/draco_decoder.js +34 -34
- package/lib/draco/draco_wasm_wrapper.js +117 -117
- package/lib/furstenstein_1k.hdr +0 -0
- package/lib/icon/parkingSpace/vip.svg +7 -7
- package/lib/index.cjs +691 -579
- package/lib/index.esm.min.js +691 -579
- package/lib/index.online.esm.min.js +691 -579
- package/lib/src/assets/index.d.ts +1 -1
- package/lib/src/assets/offline.d.ts +0 -1
- package/lib/src/assets/online.d.ts +0 -1
- package/lib/src/context/env-texture.d.ts +2 -0
- package/lib/src/context/scene.d.ts +2 -2
- package/lib/src/elements/index.d.ts +3 -1
- package/lib/src/elements/instanced-graphic.d.ts +34 -0
- package/lib/src/elements/instanced-parking-space.d.ts +1 -1
- package/lib/src/elements/instanced-wall.d.ts +25 -0
- package/lib/src/elements/merge-attribute-graphic-line.d.ts +16 -0
- package/lib/src/factory/material.d.ts +4 -2
- package/lib/src/factory/merge-geometry.d.ts +1 -0
- package/lib/src/layer/merged-graphic-layer.d.ts +11 -3
- package/lib/src/layer/parking-layer.d.ts +2 -2
- package/lib/src/loader/AibeeLoader/type.d.ts +13 -4
- package/lib/src/plugins/navigation/position-navigation.d.ts +2 -0
- package/lib/src/types/index.d.ts +2 -2
- package/lib/src/utils/geometry.d.ts +11 -1
- package/package.json +1 -1
- package/lib/index.online.min.js +0 -27666
- package/lib/src/elements/merge-parking-space.d.ts +0 -25
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const ParkingTypeIconMap: Record<string, string>, ManGlb: string, Arrow: string, DracoDecoderJs: any, DracoDecoderWasm: any, DracoWasmWrapperJs: any
|
|
1
|
+
export declare const ParkingTypeIconMap: Record<string, string>, ManGlb: string, Arrow: string, DracoDecoderJs: any, DracoDecoderWasm: any, DracoWasmWrapperJs: any;
|
|
@@ -4,4 +4,3 @@ export declare const Arrow = "https://robot-vr-public.cdn.bcebos.com/navigation_
|
|
|
4
4
|
export declare const DracoDecoderJs = "https://robot-vr-public.cdn.bcebos.com/navigation_images/69b56a1d86b226ea41399f572eccc9ce.js";
|
|
5
5
|
export declare const DracoDecoderWasm = "https://robot-vr-public.cdn.bcebos.com/navigation_images/31d6fb9b3962cd0ecb3135c26f52fe41.wasm";
|
|
6
6
|
export declare const DracoWasmWrapperJs = "https://robot-vr-public.cdn.bcebos.com/navigation_images/5900efaec20d6859eb66417fedb1acb4.js";
|
|
7
|
-
export declare const RoyalEsplanade1k = "https://robot-vr-public.cdn.bcebos.com/navigation_images/375181a19c870eb048c0751a468396d4.hdr";
|
|
@@ -24,4 +24,6 @@ export * from './merge-attribute-ground-texture';
|
|
|
24
24
|
export * from './merge-attribute-ground-texture';
|
|
25
25
|
export * from './merge-attribute-lane';
|
|
26
26
|
export * from './instanced-parking-space';
|
|
27
|
-
export * from './
|
|
27
|
+
export * from './instanced-graphic';
|
|
28
|
+
export * from './instanced-wall';
|
|
29
|
+
export * from './merge-attribute-graphic-line';
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Object3D, ShaderMaterial, BoxGeometry, InstancedMesh, Matrix4 } from "three";
|
|
2
|
+
import { Context } from "../context";
|
|
3
|
+
export interface InstancedGraphicConfig {
|
|
4
|
+
size: number;
|
|
5
|
+
matrixes: number[];
|
|
6
|
+
ids: string[];
|
|
7
|
+
colors: number[];
|
|
8
|
+
opacities: number[];
|
|
9
|
+
maxZs: number[];
|
|
10
|
+
}
|
|
11
|
+
export declare class InstancedGraphic extends Object3D {
|
|
12
|
+
geometry: BoxGeometry;
|
|
13
|
+
material: ShaderMaterial | null;
|
|
14
|
+
mesh?: InstancedMesh;
|
|
15
|
+
elements: InstancedGraphicConfig | null;
|
|
16
|
+
originOpacities: number[];
|
|
17
|
+
constructor(context: Context, elements: InstancedGraphicConfig);
|
|
18
|
+
init(): Promise<void>;
|
|
19
|
+
initMaterial(): void;
|
|
20
|
+
initMesh(): void;
|
|
21
|
+
setColorByIndex(index: number, color: string): void;
|
|
22
|
+
setOpacityByIndex(index: number, opacity: number): void;
|
|
23
|
+
setMatrixByIndex(index: number, matrix: Matrix4): void;
|
|
24
|
+
setMaxZByIndex(index: number, maxZ: number): void;
|
|
25
|
+
setColorById(id: string, color: string): void;
|
|
26
|
+
setOpacityById(id: string, opacity: number): void;
|
|
27
|
+
setMatrixById(id: string, matrix: Matrix4): void;
|
|
28
|
+
setMaxZById(id: string, maxZ: number): void;
|
|
29
|
+
setOpacity(opacity: number, force?: boolean): void;
|
|
30
|
+
pushElements(elements: InstancedGraphicConfig): void;
|
|
31
|
+
removeInstanceById(id: string): void;
|
|
32
|
+
refesh(): void;
|
|
33
|
+
dispose(): void;
|
|
34
|
+
}
|
|
@@ -14,7 +14,7 @@ export declare class InstancedParkingSpace extends Object3D {
|
|
|
14
14
|
originOpacity: number[];
|
|
15
15
|
lineOriginOpacity: number[];
|
|
16
16
|
constructor(context: Context, options: GraphicOptionsParam[]);
|
|
17
|
-
|
|
17
|
+
setColorByIndex(index: number, color: string): void;
|
|
18
18
|
init(): Promise<void>;
|
|
19
19
|
initMaterial(): void;
|
|
20
20
|
initLineMaterial(): void;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Object3D, ShaderMaterial, BoxGeometry, InstancedMesh } from "three";
|
|
2
|
+
import { Context } from "../context";
|
|
3
|
+
export interface InstancedWallConfig {
|
|
4
|
+
size: number;
|
|
5
|
+
matrixes: number[];
|
|
6
|
+
ids: string[];
|
|
7
|
+
colors: number[];
|
|
8
|
+
opacities: number[];
|
|
9
|
+
maxZs: number[];
|
|
10
|
+
minZs: number[];
|
|
11
|
+
}
|
|
12
|
+
export declare class InstancedWall extends Object3D {
|
|
13
|
+
geometry: BoxGeometry;
|
|
14
|
+
material: ShaderMaterial | null;
|
|
15
|
+
mesh?: InstancedMesh;
|
|
16
|
+
elements: InstancedWallConfig | null;
|
|
17
|
+
originOpacities: number[];
|
|
18
|
+
constructor(context: Context, elements: InstancedWallConfig);
|
|
19
|
+
init(): Promise<void>;
|
|
20
|
+
initMaterial(): void;
|
|
21
|
+
initMesh(): void;
|
|
22
|
+
setOpacityByIndex(index: number, opacity: number): void;
|
|
23
|
+
setOpacity(opacity: number, force?: boolean): void;
|
|
24
|
+
dispose(): void;
|
|
25
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Object3D, BufferGeometry, LineSegments, ShaderMaterial, ObjectLoader } from "three";
|
|
2
|
+
import { Context } from "../context/context";
|
|
3
|
+
export declare class MergedAttributeGraphicLine extends Object3D {
|
|
4
|
+
private context;
|
|
5
|
+
line?: LineSegments;
|
|
6
|
+
lineMaterial?: ShaderMaterial | null;
|
|
7
|
+
lineGeometry?: BufferGeometry;
|
|
8
|
+
options: Record<any, any> | null;
|
|
9
|
+
loader: ObjectLoader;
|
|
10
|
+
constructor(context: Context, options: Record<any, any> | null);
|
|
11
|
+
init(): Promise<void>;
|
|
12
|
+
initLineMaterial(): ShaderMaterial;
|
|
13
|
+
initLineGeometry(): void;
|
|
14
|
+
createBorder(): LineSegments<BufferGeometry<import("three").NormalBufferAttributes>, ShaderMaterial, import("three").Object3DEventMap>;
|
|
15
|
+
dispose(): void;
|
|
16
|
+
}
|
|
@@ -39,7 +39,8 @@ export declare class MaterialFactory {
|
|
|
39
39
|
private static mergeAttributeGraphicMaterial;
|
|
40
40
|
private static mergeAttributeWallMaterial;
|
|
41
41
|
private static mergeAttributeGraphicLineMaterial;
|
|
42
|
-
private static
|
|
42
|
+
private static instancedGraphicMaterial;
|
|
43
|
+
private static instancedWallMaterial;
|
|
43
44
|
static generateLineMaterialKey({ color, opacity }: LineMaterialOptions): string;
|
|
44
45
|
static createLineMaterial({ color, opacity, vertexColors }: LineMaterialOptions): LineBasicMaterial;
|
|
45
46
|
static createMeshStandardMaterial({ color, opacity }: MeshStandardMaterialOptions): MeshStandardMaterial;
|
|
@@ -57,7 +58,8 @@ export declare class MaterialFactory {
|
|
|
57
58
|
static GetMergeAttributeGraphicMaterial(): ShaderMaterial;
|
|
58
59
|
static GetMergeAttributeWallMaterial(): ShaderMaterial;
|
|
59
60
|
static GetMergeAttributeGraphicLineMaterial(): ShaderMaterial;
|
|
60
|
-
static
|
|
61
|
+
static GetInstancedGraphicMaterial(): ShaderMaterial;
|
|
62
|
+
static GetInstancedWallMaterial(): ShaderMaterial;
|
|
61
63
|
static dispose(): void;
|
|
62
64
|
}
|
|
63
65
|
export {};
|
|
@@ -20,5 +20,6 @@ export declare class MergeGeometryFacility {
|
|
|
20
20
|
}[]): Promise<BufferGeometry<import("three").NormalBufferAttributes>>;
|
|
21
21
|
static GetBufferGeometryByData(data: any): BufferGeometry<import("three").NormalBufferAttributes>;
|
|
22
22
|
static GetMergedGeometry(elements: GraphicOptions[]): Promise<any>;
|
|
23
|
+
static GetMergedGeometryLine(elements: GraphicOptions[]): Promise<any>;
|
|
23
24
|
static dispose(): void;
|
|
24
25
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Graphic, GraphicOptionsParam } from "../elements";
|
|
1
|
+
import { Graphic, GraphicOptionsParam, InstancedGraphic, InstancedGraphicConfig } from "../elements";
|
|
2
2
|
import { Group, Vector3 } from "three";
|
|
3
3
|
import { Layer } from "./layer";
|
|
4
4
|
import { Context } from "../context/context";
|
|
@@ -6,17 +6,25 @@ import { GraphicOptions } from "../types";
|
|
|
6
6
|
import { AibeeGraphicLayer } from "src/loader/AibeeLoader/type";
|
|
7
7
|
export declare class MergedGraphicLayer extends Layer {
|
|
8
8
|
graphicMap: Map<string, Graphic>;
|
|
9
|
-
|
|
9
|
+
mergedGraphicGroup: Group<import("three").Object3DEventMap>;
|
|
10
|
+
mergedLineGroup: Group<import("three").Object3DEventMap>;
|
|
10
11
|
graphicDataMap: Map<string, GraphicOptions>;
|
|
11
12
|
graphicOriginOptionMap: Map<string, Pick<GraphicOptions, "strokeOpacity" | "fillOpacity">>;
|
|
13
|
+
instancedGraphic: InstancedGraphic | null;
|
|
14
|
+
instancedGraphicConfig: InstancedGraphicConfig | null;
|
|
12
15
|
constructor(context: Context);
|
|
13
16
|
getCenter(): Vector3;
|
|
17
|
+
addInstancedGraphic(instancedGraphic: InstancedGraphicConfig): void;
|
|
18
|
+
refeshInstancedGraphic(): void;
|
|
14
19
|
addGraphics(graphicOptions: GraphicOptions[], mergedElement?: AibeeGraphicLayer['mergedElements']): void;
|
|
15
20
|
createGraphic(graphicOptions: GraphicOptions[]): Promise<void>;
|
|
16
|
-
|
|
21
|
+
createLine(graphicOptions: GraphicOptions[]): Promise<void>;
|
|
22
|
+
refreshMergeGraphic(): void;
|
|
23
|
+
refreshLine(): void;
|
|
17
24
|
removeGraphicById(id: string): void;
|
|
18
25
|
getGraphicDataByNodeId(id: string): Graphic | null;
|
|
19
26
|
setGraphicOptions(id: string, options: (GraphicOptionsParam | ((options: GraphicOptions) => GraphicOptions))): void;
|
|
20
27
|
getGraphicPosition(nodeId: string): number[] | null;
|
|
21
28
|
setOpacity(opacity: number, force?: boolean): void;
|
|
29
|
+
dispose(): void;
|
|
22
30
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Graphic,
|
|
1
|
+
import { Graphic, InstancedGraphic, InstancedParkingSpace } from "../elements";
|
|
2
2
|
import { ParkingOption } from "../types";
|
|
3
3
|
import { Layer } from "./layer";
|
|
4
4
|
import { Context } from "../context";
|
|
@@ -12,7 +12,7 @@ export declare class ParkingLayer extends Layer {
|
|
|
12
12
|
merged: boolean;
|
|
13
13
|
parkingNoIndexMap: Map<string, number>;
|
|
14
14
|
nodeIdIndexMap: Map<string, number>;
|
|
15
|
-
mergedParkingSpace:
|
|
15
|
+
mergedParkingSpace: InstancedGraphic | InstancedParkingSpace | null;
|
|
16
16
|
constructor(context: Context);
|
|
17
17
|
createParkings(parkingOptions: ParkingOption[], merge?: boolean, mergedElement?: MergedElements): void;
|
|
18
18
|
load(layer: AibeeParkingSpaceLayer, merged?: boolean): void;
|
|
@@ -25,8 +25,17 @@ export interface AibeeGraphicLayer {
|
|
|
25
25
|
userData: Record<string, any>;
|
|
26
26
|
}[];
|
|
27
27
|
mergedElements: (AibeeGraphicLayer['elements'][0] & {
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
instancedGeometry: {
|
|
29
|
+
size: number;
|
|
30
|
+
matrixes: number[];
|
|
31
|
+
ids: string[];
|
|
32
|
+
colors: number[];
|
|
33
|
+
opacities: number[];
|
|
34
|
+
maxZs: number[];
|
|
35
|
+
minZs: number[];
|
|
36
|
+
} | null;
|
|
37
|
+
mergedGeometry: Record<any, any> | null;
|
|
38
|
+
lineGeometry: Record<any, any> | null;
|
|
30
39
|
})[];
|
|
31
40
|
}
|
|
32
41
|
export interface AibeeRangeLayer {
|
|
@@ -43,7 +52,6 @@ export interface AibeeGroundLayer {
|
|
|
43
52
|
name: string;
|
|
44
53
|
l_type: "ground";
|
|
45
54
|
elements: AibeeGraphicLayer["elements"];
|
|
46
|
-
mergedElements: AibeeGraphicLayer["mergedElements"];
|
|
47
55
|
}
|
|
48
56
|
export interface AibeeWallLayer {
|
|
49
57
|
name: string;
|
|
@@ -182,9 +190,10 @@ export interface AibeeParkingSpaceLayer {
|
|
|
182
190
|
mergedElements: {
|
|
183
191
|
size: number;
|
|
184
192
|
opacities: number[];
|
|
185
|
-
|
|
193
|
+
maxZs: number[];
|
|
186
194
|
matrixes: number[];
|
|
187
195
|
colors: number[];
|
|
196
|
+
ids: string[];
|
|
188
197
|
lineGeometry?: Record<any, any> | null;
|
|
189
198
|
};
|
|
190
199
|
mergedParkingTexture?: AibeeTexture2dLayer['mergedMatrixes'];
|
|
@@ -23,6 +23,7 @@ export interface NavigationProcessInfo {
|
|
|
23
23
|
reset: boolean;
|
|
24
24
|
imageUrl: string | null;
|
|
25
25
|
nextDir: PathDirection;
|
|
26
|
+
offsetDistance: number;
|
|
26
27
|
}
|
|
27
28
|
interface PositionNavigationEvent {
|
|
28
29
|
"navigation-info": {
|
|
@@ -45,6 +46,7 @@ export declare class PositionNavigation extends EventDispatcher<PositionNavigati
|
|
|
45
46
|
throttleUpdatePosition?: DebouncedFuncLeading<(...args: any[]) => void>;
|
|
46
47
|
roadData: RoadData2[];
|
|
47
48
|
paused: boolean;
|
|
49
|
+
offsetDistance: number;
|
|
48
50
|
constructor(navigation: Navigation, options: Partial<PositionNavigationConfig>, roadData: RoadData2[]);
|
|
49
51
|
get curRoutePath(): PathData2[0] | null;
|
|
50
52
|
get curRoutePathPoints(): [number, number][];
|
package/lib/src/types/index.d.ts
CHANGED
|
@@ -54,8 +54,8 @@ export interface GraphicOptions {
|
|
|
54
54
|
center_coord_x: number;
|
|
55
55
|
center_coord_y: number;
|
|
56
56
|
geometry: PolygonGeometry | PointGeometry;
|
|
57
|
-
mergedGeometry?: Record<any, any
|
|
58
|
-
lineGeometry?: Record<any, any
|
|
57
|
+
mergedGeometry?: Record<any, any> | null;
|
|
58
|
+
lineGeometry?: Record<any, any> | null;
|
|
59
59
|
layerType: string;
|
|
60
60
|
zIndex: number;
|
|
61
61
|
transformToBuildingGround?: boolean;
|
|
@@ -1,14 +1,24 @@
|
|
|
1
1
|
import { BufferGeometry, Vector3 } from "three";
|
|
2
|
-
import { GraphicOptions } from "../types";
|
|
2
|
+
import { Coordinate, GraphicOptions } from "../types";
|
|
3
3
|
interface MergeGeometryResult {
|
|
4
4
|
geometry: BufferGeometry;
|
|
5
5
|
lineGeometry?: BufferGeometry;
|
|
6
6
|
}
|
|
7
7
|
export declare function mergeGraphicGeometries(elements: GraphicOptions[], needBorder?: boolean, needMinZ?: boolean): MergeGeometryResult | null;
|
|
8
|
+
export declare function instancedGeometiesAttributes(elements: GraphicOptions[]): {
|
|
9
|
+
size: number;
|
|
10
|
+
ids: string[];
|
|
11
|
+
matrixes: number[];
|
|
12
|
+
colors: number[];
|
|
13
|
+
opacities: number[];
|
|
14
|
+
maxZs: number[];
|
|
15
|
+
minZs: number[];
|
|
16
|
+
} | null;
|
|
8
17
|
export declare function mergeGraphicLineGeometries(elements: GraphicOptions[]): BufferGeometry<import("three").NormalBufferAttributes> | null;
|
|
9
18
|
export declare function getBorderPoints(options: GraphicOptions[]): {
|
|
10
19
|
points: Vector3[];
|
|
11
20
|
colors: number[];
|
|
12
21
|
opacities: number[];
|
|
13
22
|
};
|
|
23
|
+
export declare function isRectangle(coords: Coordinate[][]): boolean;
|
|
14
24
|
export {};
|