@aibee/crc-bmap 0.0.49 → 0.0.51
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/example/src/main.ts +40 -12
- package/lib/bmap.cjs.min.js +1 -1
- package/lib/bmap.cjs.min.js.map +3 -3
- package/lib/bmap.esm.js +79 -53
- package/lib/bmap.esm.js.map +3 -3
- package/lib/bmap.esm.min.js +1 -1
- package/lib/bmap.esm.min.js.map +3 -3
- package/lib/bmap.min.js +1 -1
- package/lib/bmap.min.js.map +3 -3
- package/lib/src/bmap.d.ts +5 -2
- package/lib/src/context.d.ts +1 -1
- package/lib/src/elements/poi.d.ts +6 -3
- package/lib/src/layer/poi-layer.d.ts +1 -1
- package/lib/src/utils/sleep.d.ts +1 -0
- package/package.json +1 -1
package/lib/src/bmap.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EventDispatcher, Object3D } from "three";
|
|
1
|
+
import { EventDispatcher, Object3D, Vector3 } from "three";
|
|
2
2
|
import { Context } from "./context";
|
|
3
3
|
import { Config } from './config';
|
|
4
4
|
import { Graphic, HeatmapDataParam, PoiOptionsParam } from "./elements";
|
|
@@ -60,7 +60,9 @@ export declare class BMap extends EventDispatcher<BmapEventMap> {
|
|
|
60
60
|
* @param ele { Graphic | Poi }
|
|
61
61
|
* @param duration
|
|
62
62
|
*/
|
|
63
|
-
translateElementToCenter(ele:
|
|
63
|
+
translateElementToCenter(ele: {
|
|
64
|
+
getPosition: () => Vector3;
|
|
65
|
+
}, duration?: number): Promise<unknown>;
|
|
64
66
|
/**
|
|
65
67
|
* 获取物体的屏幕坐标
|
|
66
68
|
*/
|
|
@@ -128,6 +130,7 @@ export declare class BMap extends EventDispatcher<BmapEventMap> {
|
|
|
128
130
|
getPois(): import("./elements").Poi[];
|
|
129
131
|
clearPoi(): void;
|
|
130
132
|
removeSelectGraphic(graphic: Graphic): void;
|
|
133
|
+
resize(): void;
|
|
131
134
|
dispose(): void;
|
|
132
135
|
}
|
|
133
136
|
export {};
|
package/lib/src/context.d.ts
CHANGED
|
@@ -84,7 +84,7 @@ export declare class Context extends EventDispatcher<ContextEventMap> {
|
|
|
84
84
|
* @param y
|
|
85
85
|
* @returns
|
|
86
86
|
*/
|
|
87
|
-
getPoisByDeviceXy(x: number, y: number):
|
|
87
|
+
getPoisByDeviceXy(x: number, y: number): Poi[];
|
|
88
88
|
onPointerover: (e: PointerEvent) => void;
|
|
89
89
|
onPointermove: (e: PointerEvent) => void;
|
|
90
90
|
onPointerleave: () => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EventDispatcher, Object3DEventMap, Vector3 } from 'three';
|
|
2
2
|
import { Context } from '../context';
|
|
3
3
|
export interface PoiOptions {
|
|
4
4
|
texts: {
|
|
@@ -25,8 +25,9 @@ type PoiEventMap = {
|
|
|
25
25
|
};
|
|
26
26
|
} & Object3DEventMap;
|
|
27
27
|
export type PoiOptionsParam = Partial<PoiOptions>;
|
|
28
|
-
export declare class Poi extends
|
|
28
|
+
export declare class Poi extends EventDispatcher<PoiEventMap> {
|
|
29
29
|
private context;
|
|
30
|
+
private div;
|
|
30
31
|
private textDiv;
|
|
31
32
|
private img?;
|
|
32
33
|
private overlay;
|
|
@@ -35,15 +36,17 @@ export declare class Poi extends Object3D<PoiEventMap> {
|
|
|
35
36
|
width: number;
|
|
36
37
|
height: number;
|
|
37
38
|
};
|
|
39
|
+
position: Vector3;
|
|
38
40
|
constructor(context: Context, options: PoiOptionsParam);
|
|
39
41
|
get withinDisplayRange(): boolean;
|
|
40
42
|
resetSize(): Promise<void>;
|
|
43
|
+
renderHelperBox(): void;
|
|
41
44
|
get clientPos(): {
|
|
42
45
|
x: number;
|
|
43
46
|
y: number;
|
|
44
47
|
};
|
|
45
48
|
initDiv(): HTMLDivElement;
|
|
46
|
-
getPosition():
|
|
49
|
+
getPosition(): Vector3;
|
|
47
50
|
initText(): HTMLDivElement;
|
|
48
51
|
createTextFragment(): DocumentFragment;
|
|
49
52
|
initIcon(): HTMLImageElement;
|
|
@@ -18,7 +18,7 @@ export declare class PoiLayer extends Layer {
|
|
|
18
18
|
* @param poi
|
|
19
19
|
*/
|
|
20
20
|
pushPoi(poi: Poi): void;
|
|
21
|
-
getPoiByDeviceXy(x: number, y: number):
|
|
21
|
+
getPoiByDeviceXy(x: number, y: number): Poi[];
|
|
22
22
|
onUpdate: () => void;
|
|
23
23
|
/**
|
|
24
24
|
* 碰撞检测
|
package/lib/src/utils/sleep.d.ts
CHANGED