@realsee/dnalogel 2.0.0-alpha.8 → 2.0.0-alpha.9
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/CHANGELOG.md +3 -0
- package/dist/CSS3DRenderPlugin/index.d.ts +49 -0
- package/dist/CSS3DRenderPlugin/index.js +233 -0
- package/dist/CSS3DRenderPlugin/utils/createResizeObserver.d.ts +7 -0
- package/dist/CameraMovementPlugin/index.d.ts +7 -0
- package/dist/CameraMovementPlugin/index.js +302 -0
- package/dist/CameraMovementPlugin/typing.d.ts +68 -0
- package/dist/ModelChassisCompassPlugin/index.d.ts +19 -0
- package/dist/ModelChassisCompassPlugin/index.js +142 -0
- package/dist/ModelEntryDoorGuidePlugin/index.d.ts +26 -0
- package/dist/ModelEntryDoorGuidePlugin/index.js +196 -0
- package/dist/ModelRoomLabelPlugin/Assets/roomLabelBg.d.ts +1 -0
- package/dist/ModelRoomLabelPlugin/Controller.d.ts +36 -0
- package/dist/ModelRoomLabelPlugin/index.d.ts +12 -0
- package/dist/ModelRoomLabelPlugin/index.js +461 -0
- package/dist/ModelRoomLabelPlugin/typings.d.ts +35 -0
- package/dist/ModelRoomLabelPlugin/utils/parseData.d.ts +3 -0
- package/dist/ModelViewPlugin/index.d.ts +17 -0
- package/dist/ModelViewPlugin/index.js +187 -0
- package/dist/PanoCompassPlugin/Assets/roomInfoIcon.d.ts +1 -0
- package/dist/PanoCompassPlugin/getRoomInfoInstance.d.ts +8 -0
- package/dist/PanoCompassPlugin/index.d.ts +51 -0
- package/dist/PanoCompassPlugin/index.js +523 -0
- package/dist/PanoCursorRaycasterPlugin/index.d.ts +48 -0
- package/dist/PanoCursorRaycasterPlugin/index.js +88 -0
- package/dist/PanoMeasurePlugin/Controller/BaseController.d.ts +36 -0
- package/dist/PanoMeasurePlugin/Controller/EditController.d.ts +52 -0
- package/dist/PanoMeasurePlugin/Controller/ShortcutKeyController.d.ts +12 -0
- package/dist/PanoMeasurePlugin/Controller/WatchController.d.ts +25 -0
- package/dist/PanoMeasurePlugin/Controller/index.d.ts +61 -0
- package/dist/PanoMeasurePlugin/Model/index.d.ts +38 -0
- package/dist/PanoMeasurePlugin/Model/line.d.ts +30 -0
- package/dist/PanoMeasurePlugin/Model/point.d.ts +16 -0
- package/dist/PanoMeasurePlugin/Model/polyline.d.ts +16 -0
- package/dist/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete.svg.d.ts +2 -0
- package/dist/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_bg.png.d.ts +2 -0
- package/dist/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_hover_bg.png.d.ts +2 -0
- package/dist/PanoMeasurePlugin/Modules/DeleteDom/index.d.ts +22 -0
- package/dist/PanoMeasurePlugin/Modules/FiveHelper.d.ts +11 -0
- package/dist/PanoMeasurePlugin/Modules/GuideController.d.ts +18 -0
- package/dist/PanoMeasurePlugin/Modules/Magnifier.d.ts +24 -0
- package/dist/PanoMeasurePlugin/Modules/UIController/HTML.d.ts +6 -0
- package/dist/PanoMeasurePlugin/Modules/UIController/MainBtnController.d.ts +18 -0
- package/dist/PanoMeasurePlugin/Modules/UIController/Revoke/index.d.ts +12 -0
- package/dist/PanoMeasurePlugin/Modules/UIController/index.d.ts +16 -0
- package/dist/PanoMeasurePlugin/Modules/UIController/style.d.ts +17 -0
- package/dist/PanoMeasurePlugin/index.d.ts +7 -0
- package/dist/PanoMeasurePlugin/index.js +4789 -0
- package/dist/PanoMeasurePlugin/typings/data.d.ts +28 -0
- package/dist/PanoMeasurePlugin/typings/event.type.d.ts +28 -0
- package/dist/PanoMeasurePlugin/typings/utils.type.d.ts +1 -0
- package/dist/PanoMeasurePlugin/utils/clearGroup.d.ts +2 -0
- package/dist/PanoMeasurePlugin/utils/constants.d.ts +4 -0
- package/dist/PanoMeasurePlugin/utils/distanceDom.d.ts +28 -0
- package/dist/PanoMeasurePlugin/utils/findAssociatedLines.d.ts +2 -0
- package/dist/PanoMeasurePlugin/utils/findClosestPoint.d.ts +10 -0
- package/dist/PanoMeasurePlugin/utils/getIntersectionFromEvent.d.ts +4 -0
- package/dist/PanoMeasurePlugin/utils/getPointFromHammerEvent.d.ts +10 -0
- package/dist/PanoMeasurePlugin/utils/ironbox.d.ts +1 -0
- package/dist/PanoMeasurePlugin/utils/isNDCPointInScreen.d.ts +2 -0
- package/dist/PanoMeasurePlugin/utils/line.d.ts +17 -0
- package/dist/PanoMeasurePlugin/utils/math.d.ts +17 -0
- package/dist/PanoMeasurePlugin/utils/mouseGroup.d.ts +2 -0
- package/dist/PanoMeasurePlugin/utils/ndc2Screen.d.ts +5 -0
- package/dist/PanoRulerPlugin/index.d.ts +31 -0
- package/dist/PanoRulerPlugin/index.js +610 -0
- package/dist/PanoRulerPlugin/style.d.ts +2 -0
- package/dist/PanoRulerPlugin/typings.d.ts +21 -0
- package/dist/floorplan/Assets/camera.d.ts +1 -0
- package/dist/floorplan/Assets/floorplanExtraObject.d.ts +1 -0
- package/dist/floorplan/ModelFloorplanPlugin/Assets/compass.d.ts +1 -0
- package/dist/floorplan/ModelFloorplanPlugin/Controller.d.ts +104 -0
- package/dist/floorplan/ModelFloorplanPlugin/index.d.ts +9 -0
- package/dist/floorplan/ModelFloorplanPlugin/index.js +3827 -0
- package/dist/floorplan/ModelFloorplanPlugin/typings/events.type.d.ts +23 -0
- package/dist/floorplan/ModelFloorplanPlugin/utils/constant.d.ts +15 -0
- package/dist/floorplan/ModelFloorplanPlugin/utils/correctFiveState.d.ts +14 -0
- package/dist/floorplan/PanoFloorplanRadarPlugin/Controller.d.ts +28 -0
- package/dist/floorplan/PanoFloorplanRadarPlugin/index.d.ts +8 -0
- package/dist/floorplan/PanoFloorplanRadarPlugin/index.js +1673 -0
- package/dist/floorplan/TopviewFloorplanPlugin/Controller.d.ts +61 -0
- package/dist/floorplan/TopviewFloorplanPlugin/index.d.ts +5 -0
- package/dist/floorplan/TopviewFloorplanPlugin/index.js +3466 -0
- package/dist/floorplan/TopviewFloorplanPlugin/style.d.ts +1 -0
- package/dist/floorplan/constant.d.ts +5 -0
- package/dist/floorplan/typings/floorplanData.d.ts +137 -0
- package/dist/floorplan/typings/floorplanServerData.d.ts +131 -0
- package/dist/floorplan/typings/utility.d.ts +2 -0
- package/dist/floorplan/utils/formatData.d.ts +5 -0
- package/dist/floorplan/utils/formatPosition.d.ts +36 -0
- package/dist/index.d.ts +24 -0
- package/dist/index.es.js +11887 -0
- package/dist/index.js +11925 -0
- package/dist/index.umd.js +11920 -0
- package/dist/shared-utils/Preloader.d.ts +6 -0
- package/dist/shared-utils/Subscribe.d.ts +45 -0
- package/dist/shared-utils/animationFrame/BetterTween.d.ts +11 -0
- package/dist/shared-utils/animationFrame/calculateProgress.d.ts +8 -0
- package/dist/shared-utils/animationFrame/formatRad.d.ts +15 -0
- package/dist/shared-utils/animationFrame/index.d.ts +15 -0
- package/dist/shared-utils/animationFrame/tween.d.ts +75 -0
- package/dist/shared-utils/changeModelCanvasOpacity.d.ts +2 -0
- package/dist/shared-utils/createCanvasTextTexture.d.ts +8 -0
- package/dist/shared-utils/createLine/index.d.ts +3 -0
- package/dist/shared-utils/debounce.d.ts +6 -0
- package/dist/shared-utils/equal.d.ts +11 -0
- package/dist/shared-utils/filter.d.ts +27 -0
- package/dist/shared-utils/five/changeMode.d.ts +2 -0
- package/dist/shared-utils/five/useFivePlugin.d.ts +1 -0
- package/dist/shared-utils/formatRad.d.ts +7 -0
- package/dist/shared-utils/getPxmm.d.ts +11 -0
- package/dist/shared-utils/getRandomColor.d.ts +1 -0
- package/dist/shared-utils/isNil.d.ts +10 -0
- package/dist/shared-utils/isTruelyObject.d.ts +18 -0
- package/dist/shared-utils/math/evenNumber.d.ts +3 -0
- package/dist/shared-utils/math/planimetry.d.ts +116 -0
- package/dist/shared-utils/math/rad2Deg.d.ts +1 -0
- package/dist/shared-utils/nearlyEqual.d.ts +7 -0
- package/dist/shared-utils/nextFrame.d.ts +1 -0
- package/dist/shared-utils/noop.d.ts +5 -0
- package/dist/shared-utils/object3d2LocalMatrix.d.ts +12 -0
- package/dist/shared-utils/px2rem.d.ts +1 -0
- package/dist/shared-utils/removeArrayItem.d.ts +7 -0
- package/dist/shared-utils/tap.d.ts +8 -0
- package/dist/shared-utils/three/centerPoint.d.ts +2 -0
- package/dist/shared-utils/three/getExtraModelLoader.d.ts +6 -0
- package/dist/shared-utils/three/getNormal.d.ts +2 -0
- package/dist/shared-utils/three/getTextureLoader.d.ts +6 -0
- package/dist/shared-utils/three/loadFbxObj.d.ts +2 -0
- package/dist/shared-utils/three/loadTexture.d.ts +2 -0
- package/dist/shared-utils/three/transformPositionToVector3.d.ts +7 -0
- package/dist/shared-utils/three/transfromToMeshBasicMaterial.d.ts +2 -0
- package/dist/shared-utils/throttle.d.ts +7 -0
- package/dist/shared-utils/to.d.ts +8 -0
- package/dist/shared-utils/useDebounce.d.ts +8 -0
- package/dist/shared-utils/useThrottle.d.ts +8 -0
- package/dist/shared-utils/uuid.d.ts +4 -0
- package/dist/shared-utils/vectorTocoordinates.d.ts +7 -0
- package/dist/typings/math.type.d.ts +44 -0
- package/dist/typings/utils.type.d.ts +2 -0
- package/docs/classes/ModelRoomLabelController.html +6 -6
- package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +1 -1
- package/docs/enums/ModelFloorplanErrorType.html +1 -1
- package/docs/interfaces/LineJson.html +1 -1
- package/docs/interfaces/ModelChassisCompassPluginData.html +1 -1
- package/docs/interfaces/ModelChassisCompassPluginExportType.html +1 -1
- package/docs/interfaces/ModelChassisCompassPluginParameterType.html +1 -1
- package/docs/interfaces/ModelEntryDoorGuidePluginData.html +1 -1
- package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +1 -1
- package/docs/interfaces/ModelFloorplanParameterType.html +1 -1
- package/docs/interfaces/ModelFloorplanViewEvent.html +2 -2
- package/docs/interfaces/ModelRoomLabelPluginData.html +1 -1
- package/docs/interfaces/PanoCompassPluginData.html +1 -1
- package/docs/interfaces/PanoCompassPluginParameterType.html +1 -1
- package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +6 -6
- package/docs/interfaces/PanoRulerPluginExportType.html +1 -1
- package/docs/interfaces/PanoRulerPluginOptions.html +1 -1
- package/docs/interfaces/PanoRulerPluginParameterType.html +1 -1
- package/docs/interfaces/PointJson.html +1 -1
- package/docs/interfaces/RoomLabel.html +7 -7
- package/docs/interfaces/TopviewFloorplanPluginParameterType.html +1 -1
- package/docs/modules.html +11 -11
- package/libs/ModelRoomLabelPlugin/Controller.js +2 -2
- package/libs/ModelRoomLabelPlugin/RoomLabelItem.js +121 -0
- package/libs/ModelRoomLabelPlugin/RoomLabelItems.js +253 -0
- package/libs/PanoMeasurePlugin/Controller/EditController.js +1 -1
- package/libs/floorplan/Components/BaseImage.js +217 -0
- package/libs/floorplan/Components/Normalmage.js +63 -0
- package/libs/floorplan/Components/RoomHighlight/Room.js +70 -0
- package/libs/floorplan/Components/RoomHighlight/RoomHighlight.js +289 -0
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial.js +328 -0
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_0.js +64 -0
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_1.js +103 -0
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_2.js +140 -0
- package/libs/floorplan/Components/SvgImage.js +83 -0
- package/libs/floorplan/ModelFloorplanPlugin/Components/Camera.js +120 -0
- package/libs/floorplan/ModelFloorplanPlugin/Components/Compass.js +106 -0
- package/libs/floorplan/ModelFloorplanPlugin/Components/CurrentFloor/CurrentFloor.js +463 -0
- package/libs/floorplan/ModelFloorplanPlugin/Components/Main.js +375 -0
- package/libs/floorplan/ModelFloorplanPlugin/Components/RoomLabels/RoomLabel.js +171 -0
- package/libs/floorplan/ModelFloorplanPlugin/Components/RoomLabels/RoomLabels.js +265 -0
- package/libs/floorplan/ModelFloorplanPlugin/Components/RuleLabels/RuleItem.js +301 -0
- package/libs/floorplan/ModelFloorplanPlugin/Components/RuleLabels/RuleLabels.js +219 -0
- package/libs/floorplan/ModelFloorplanPlugin/Controller.js +1 -1
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Camera.js +152 -0
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/CurrentFloor.js +248 -0
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/ExtraObjects.js +154 -0
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Main.js +312 -0
- package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +1 -1
- package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +1 -1
- package/package.json +18 -10
- package/dist/dnalogel.cjs.js +0 -7
- package/dist/dnalogel.es.js +0 -41280
- package/dist/dnalogel.umd.js +0 -7
- package/dist/style.css +0 -1
- package/libs/ModelRoomLabelPlugin/RoomLabelItem.svelte +0 -63
- package/libs/ModelRoomLabelPlugin/RoomLabelItem.svelte.map +0 -1
- package/libs/ModelRoomLabelPlugin/RoomLabelItems.svelte +0 -80
- package/libs/ModelRoomLabelPlugin/RoomLabelItems.svelte.map +0 -1
- package/libs/floorplan/Components/BaseImage.svelte +0 -25
- package/libs/floorplan/Components/BaseImage.svelte.map +0 -1
- package/libs/floorplan/Components/Normalmage.svelte +0 -11
- package/libs/floorplan/Components/Normalmage.svelte.map +0 -1
- package/libs/floorplan/Components/RoomHighlight/Room.svelte +0 -21
- package/libs/floorplan/Components/RoomHighlight/Room.svelte.map +0 -1
- package/libs/floorplan/Components/RoomHighlight/RoomHighlight.svelte +0 -60
- package/libs/floorplan/Components/RoomHighlight/RoomHighlight.svelte.map +0 -1
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial.svelte +0 -35
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial.svelte.map +0 -1
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_0.svelte +0 -7
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_0.svelte.map +0 -1
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_1.svelte +0 -16
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_1.svelte.map +0 -1
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_2.svelte +0 -17
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_2.svelte.map +0 -1
- package/libs/floorplan/Components/SvgImage.svelte +0 -25
- package/libs/floorplan/Components/SvgImage.svelte.map +0 -1
- package/libs/floorplan/ModelFloorplanPlugin/Components/Camera.svelte +0 -46
- package/libs/floorplan/ModelFloorplanPlugin/Components/Camera.svelte.map +0 -1
- package/libs/floorplan/ModelFloorplanPlugin/Components/Compass.svelte +0 -48
- package/libs/floorplan/ModelFloorplanPlugin/Components/Compass.svelte.map +0 -1
- package/libs/floorplan/ModelFloorplanPlugin/Components/CurrentFloor/CurrentFloor.svelte +0 -37
- package/libs/floorplan/ModelFloorplanPlugin/Components/CurrentFloor/CurrentFloor.svelte.map +0 -1
- package/libs/floorplan/ModelFloorplanPlugin/Components/Main.svelte +0 -50
- package/libs/floorplan/ModelFloorplanPlugin/Components/Main.svelte.map +0 -1
- package/libs/floorplan/ModelFloorplanPlugin/Components/RoomLabels/RoomLabel.svelte +0 -41
- package/libs/floorplan/ModelFloorplanPlugin/Components/RoomLabels/RoomLabel.svelte.map +0 -1
- package/libs/floorplan/ModelFloorplanPlugin/Components/RoomLabels/RoomLabels.svelte +0 -25
- package/libs/floorplan/ModelFloorplanPlugin/Components/RoomLabels/RoomLabels.svelte.map +0 -1
- package/libs/floorplan/ModelFloorplanPlugin/Components/RuleLabels/RuleItem.svelte +0 -148
- package/libs/floorplan/ModelFloorplanPlugin/Components/RuleLabels/RuleItem.svelte.map +0 -1
- package/libs/floorplan/ModelFloorplanPlugin/Components/RuleLabels/RuleLabels.svelte +0 -15
- package/libs/floorplan/ModelFloorplanPlugin/Components/RuleLabels/RuleLabels.svelte.map +0 -1
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Camera.svelte +0 -84
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Camera.svelte.map +0 -1
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/CurrentFloor.svelte +0 -18
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/CurrentFloor.svelte.map +0 -1
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/ExtraObjects.svelte +0 -40
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/ExtraObjects.svelte.map +0 -1
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Main.svelte +0 -61
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Main.svelte.map +0 -1
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
declare const __EVENT__ = "__events__";
|
|
2
|
+
/**
|
|
3
|
+
* 订阅类。
|
|
4
|
+
* 观察者模式(供前端使用),Node端推荐<a href="https://nodejs.org/api/events.html#events_class_eventemitter">EventEmitter</a>。
|
|
5
|
+
*/
|
|
6
|
+
export default class Subscribe {
|
|
7
|
+
private [__EVENT__];
|
|
8
|
+
constructor();
|
|
9
|
+
/**
|
|
10
|
+
* 判断是否注册时事件
|
|
11
|
+
* @param {string|[string]} name 事件类型
|
|
12
|
+
*/
|
|
13
|
+
hasListener(name: string): any;
|
|
14
|
+
/**
|
|
15
|
+
* 注册事件
|
|
16
|
+
* @param {string|[string]} names 事件类型
|
|
17
|
+
* @param {function} callback 事件回调函数
|
|
18
|
+
* @param {any} context 事件回调函数调用的上下文
|
|
19
|
+
* @param {boolean} once 是否只执行一次
|
|
20
|
+
*/
|
|
21
|
+
on(names: string | string[], callback: (...args: any[]) => void, context?: any, once?: boolean): () => this;
|
|
22
|
+
/**
|
|
23
|
+
* 注册事件(是否只执行一次)
|
|
24
|
+
* @param {string|[string]} names 事件类型
|
|
25
|
+
* @param {function} callback 事件回调函数
|
|
26
|
+
* @param {any} context 事件回调函数调用的上下文
|
|
27
|
+
*/
|
|
28
|
+
once(names: string | string[], callback: (...args: any[]) => void, context?: any): () => this;
|
|
29
|
+
/**
|
|
30
|
+
* 解除事件
|
|
31
|
+
* @param {string|[string]} names 事件类型
|
|
32
|
+
* @param {function} callback 事件回调函数
|
|
33
|
+
*
|
|
34
|
+
* 如果 name 不传的话解除对应所有事件
|
|
35
|
+
* 如果 name, callback 不传的话解除所有name的所有事件
|
|
36
|
+
*/
|
|
37
|
+
off(names?: string | string[], callback?: (...args: any[]) => void): this;
|
|
38
|
+
/**
|
|
39
|
+
* 触发事件
|
|
40
|
+
* @param {string|[string]} name 事件类型
|
|
41
|
+
* @param {...any} data 触发事件的数据
|
|
42
|
+
*/
|
|
43
|
+
emit(name: string, ...data: any[]): boolean;
|
|
44
|
+
}
|
|
45
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import TWEEN from '@tweenjs/tween.js';
|
|
2
|
+
export declare class BetterTween<G> extends TWEEN.Tween<G> {
|
|
3
|
+
private disposeMethods;
|
|
4
|
+
private animationFrameDisposer?;
|
|
5
|
+
onDispose: (callback: () => void) => this;
|
|
6
|
+
play: () => this;
|
|
7
|
+
dispose: () => void;
|
|
8
|
+
}
|
|
9
|
+
export declare function tweenProgress(duration?: number, easing?: (amount: number) => number): BetterTween<{
|
|
10
|
+
progress: number;
|
|
11
|
+
}>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 把一个任意角度的弧度值转换为一个 [0, 2PI] 的弧度值
|
|
3
|
+
* @param rad 弧度值
|
|
4
|
+
*/
|
|
5
|
+
export declare function formatLongitude(rad: number): number;
|
|
6
|
+
/**
|
|
7
|
+
* 把一个任意角度的弧度值转换为一个 [-2PI, 2PI] 的弧度值
|
|
8
|
+
* @param rad 弧度值
|
|
9
|
+
*/
|
|
10
|
+
export declare function formatLatitude(rad: number): number;
|
|
11
|
+
/**
|
|
12
|
+
* 把一个任意角度的弧度值转换为一个 [0, 2PI] 的弧度值
|
|
13
|
+
* @param rad 弧度值
|
|
14
|
+
*/
|
|
15
|
+
export declare const formatRad: typeof formatLongitude;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
declare const _requestAnimationFrame: ((callback: FrameRequestCallback) => number) & typeof requestAnimationFrame;
|
|
2
|
+
export default _requestAnimationFrame;
|
|
3
|
+
export declare function nextFrame(fn: FrameRequestCallback, delay?: number): void;
|
|
4
|
+
/**
|
|
5
|
+
* 在每个 AnimationFrame 中调用传入的函数
|
|
6
|
+
* @param callback 每次 AnimationFrame 中调用的函数
|
|
7
|
+
* @param frame 每秒运行多少次
|
|
8
|
+
* @returns 返回一个函数,调用可以停止 AnimationFrameLoop
|
|
9
|
+
*/
|
|
10
|
+
export declare function requestAnimationFrameInterval(callback?: (time: number) => any, frame?: number): () => void;
|
|
11
|
+
/**
|
|
12
|
+
* 获取两个 AnimationFrame 间隔的时间
|
|
13
|
+
* @returns 返回一个 Promise,resolve 的结果是两个 AnimationFrame 间隔的时间
|
|
14
|
+
*/
|
|
15
|
+
export declare function getFrameTime(): Promise<unknown>;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import * as TWEEN from '@tweenjs/tween.js';
|
|
2
|
+
export declare const Easing: {
|
|
3
|
+
Linear: {
|
|
4
|
+
None: (amount: number) => number;
|
|
5
|
+
};
|
|
6
|
+
Quadratic: {
|
|
7
|
+
In: (amount: number) => number;
|
|
8
|
+
Out: (amount: number) => number;
|
|
9
|
+
InOut: (amount: number) => number;
|
|
10
|
+
};
|
|
11
|
+
Cubic: {
|
|
12
|
+
In: (amount: number) => number;
|
|
13
|
+
Out: (amount: number) => number;
|
|
14
|
+
InOut: (amount: number) => number;
|
|
15
|
+
};
|
|
16
|
+
Quartic: {
|
|
17
|
+
In: (amount: number) => number;
|
|
18
|
+
Out: (amount: number) => number;
|
|
19
|
+
InOut: (amount: number) => number;
|
|
20
|
+
};
|
|
21
|
+
Quintic: {
|
|
22
|
+
In: (amount: number) => number;
|
|
23
|
+
Out: (amount: number) => number;
|
|
24
|
+
InOut: (amount: number) => number;
|
|
25
|
+
};
|
|
26
|
+
Sinusoidal: {
|
|
27
|
+
In: (amount: number) => number;
|
|
28
|
+
Out: (amount: number) => number;
|
|
29
|
+
InOut: (amount: number) => number;
|
|
30
|
+
};
|
|
31
|
+
Exponential: {
|
|
32
|
+
In: (amount: number) => number;
|
|
33
|
+
Out: (amount: number) => number;
|
|
34
|
+
InOut: (amount: number) => number;
|
|
35
|
+
};
|
|
36
|
+
Circular: {
|
|
37
|
+
In: (amount: number) => number;
|
|
38
|
+
Out: (amount: number) => number;
|
|
39
|
+
InOut: (amount: number) => number;
|
|
40
|
+
};
|
|
41
|
+
Elastic: {
|
|
42
|
+
In: (amount: number) => number;
|
|
43
|
+
Out: (amount: number) => number;
|
|
44
|
+
InOut: (amount: number) => number;
|
|
45
|
+
};
|
|
46
|
+
Back: {
|
|
47
|
+
In: (amount: number) => number;
|
|
48
|
+
Out: (amount: number) => number;
|
|
49
|
+
InOut: (amount: number) => number;
|
|
50
|
+
};
|
|
51
|
+
Bounce: {
|
|
52
|
+
In: (amount: number) => number;
|
|
53
|
+
Out: (amount: number) => number;
|
|
54
|
+
InOut: (amount: number) => number;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
interface ITween<T> extends TWEEN.Tween<T> {
|
|
58
|
+
onDestroy: (fn: () => void) => TWEEN.Tween<T>;
|
|
59
|
+
destroy: () => void;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* 对象变化的补间动画
|
|
63
|
+
* 1. 应用 requestAnimationFrameInterval 做 update
|
|
64
|
+
* 2. 在原生 tween 上新增 destroy 方法和 onDestroy 监听
|
|
65
|
+
* DOC: https://github.com/tweenjs/tween.js
|
|
66
|
+
* @param from 对象起始状态
|
|
67
|
+
* @param to 对象末尾状态
|
|
68
|
+
* @param duration 经历时间(s)
|
|
69
|
+
* @param easing 过程动画,默认是 Easing.Linear.None
|
|
70
|
+
*/
|
|
71
|
+
export default function tween<T>(from: T, to: T, duration: number, easing?: (amount: number) => number): ITween<T>;
|
|
72
|
+
export declare function tweenProgress(duration: number, easing: typeof Easing.Linear.None): ITween<{
|
|
73
|
+
progress: number;
|
|
74
|
+
}>;
|
|
75
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 对象比较
|
|
3
|
+
* @param {*} value 第一个比较的值
|
|
4
|
+
* @param {*} other 第二个比较的值
|
|
5
|
+
* @param {Object} options 可选参数,可选项包括:<br />
|
|
6
|
+
* deep {Boolean} 是否深比较<br />
|
|
7
|
+
* @returns {boolean} 是否相等
|
|
8
|
+
*/
|
|
9
|
+
export default function equal(value: any, other: any, opt?: {
|
|
10
|
+
deep: boolean;
|
|
11
|
+
}): boolean;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 对象属性筛选函数。
|
|
3
|
+
* 基于已有对象生成一个满足条件(属性)新的对象。
|
|
4
|
+
* @param {object} object
|
|
5
|
+
* @param {Function} check
|
|
6
|
+
*/
|
|
7
|
+
export declare function filter<T, K extends keyof T>(object: T, check: (key: K, value: T[K]) => boolean): Record<K, T[K]>;
|
|
8
|
+
/**
|
|
9
|
+
* 对象镜子函数。
|
|
10
|
+
* 生成一个"镜子"对象:对象的属性名与其值相同。
|
|
11
|
+
* @param {string[]} strings 对象属性
|
|
12
|
+
*/
|
|
13
|
+
export declare function mirror(strings: string[]): Record<string, string>;
|
|
14
|
+
/**
|
|
15
|
+
* 过滤掉不需要的对象字段函数:实现从一个对象中排除某些指定属性后生成的新对象。
|
|
16
|
+
* @param object
|
|
17
|
+
* @param props 排除的属性
|
|
18
|
+
* @return
|
|
19
|
+
*/
|
|
20
|
+
export declare function omit<T, K extends keyof T>(object: T, props: Extract<K[], string[]>): Omit<T, K>;
|
|
21
|
+
/**
|
|
22
|
+
* 筛选需要的对象字段:实现从一个对象中选择某些指定属性生成新的对象(与`omit()`功能相反)。
|
|
23
|
+
* @param {object} object
|
|
24
|
+
* @param {string[]} props
|
|
25
|
+
* @return {object}
|
|
26
|
+
*/
|
|
27
|
+
export declare function pick<T, K extends keyof T>(object: T, props: K[]): Pick<T, K>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useFivePlugin<T extends (...args: any) => any>(name: string): ReturnType<T>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Five } from '@realsee/five';
|
|
2
|
+
import { FLOOR_PLAN_ATTACHED_TO } from '../floorplan/constant';
|
|
3
|
+
interface GetPxmmOption {
|
|
4
|
+
attachedTo: FLOOR_PLAN_ATTACHED_TO;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* 获取「在俯视图」状态下,模型 mm 与屏幕像素 px 的对应关系,即每 mm 对应多少 px
|
|
8
|
+
* @param five five
|
|
9
|
+
*/
|
|
10
|
+
export default function getPxmm(five: Five, container: Element, floorIndex: number, options?: GetPxmmOption): number;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function getRandomColor(): string;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 判断对象是否为`null`或`undefined`。
|
|
3
|
+
* @param
|
|
4
|
+
* @return
|
|
5
|
+
*/
|
|
6
|
+
export declare function isNil<T>(value: T): value is Extract<T, undefined | null>;
|
|
7
|
+
/**
|
|
8
|
+
* 判断对象不为`null`或`undefined`。
|
|
9
|
+
*/
|
|
10
|
+
export declare function notNil<T>(value: T | null | undefined): value is T;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 检查一个值是否是狭义上的对象
|
|
3
|
+
* @param {any} value 要检查的值
|
|
4
|
+
*
|
|
5
|
+
* isTruelyObject({})
|
|
6
|
+
* // => true
|
|
7
|
+
*
|
|
8
|
+
* isObjectLike([1, 2, 3])
|
|
9
|
+
* // => false
|
|
10
|
+
*
|
|
11
|
+
* isObjectLike(Function)
|
|
12
|
+
* // => false
|
|
13
|
+
*
|
|
14
|
+
* isObjectLike(null)
|
|
15
|
+
* // => false
|
|
16
|
+
*
|
|
17
|
+
*/
|
|
18
|
+
export default function isTruelyObject(value: any): boolean;
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 平面几何相关数学函数
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* 平面点坐标。
|
|
6
|
+
*/
|
|
7
|
+
export interface Point {
|
|
8
|
+
x: number;
|
|
9
|
+
y: number;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* 检查两个点是否位置相同
|
|
13
|
+
* @param point1
|
|
14
|
+
* @param point2
|
|
15
|
+
* @return
|
|
16
|
+
*/
|
|
17
|
+
export declare function samePointAt(point1: Point, point2: Point): boolean;
|
|
18
|
+
/**
|
|
19
|
+
* 计算两个点之间的位置
|
|
20
|
+
* @param {point} point1
|
|
21
|
+
* @param {point} point2
|
|
22
|
+
* @return {number}
|
|
23
|
+
*/
|
|
24
|
+
export declare function distance(point1: Point, point2: Point): number;
|
|
25
|
+
/**
|
|
26
|
+
* 两个计算的斜率是否相同
|
|
27
|
+
* @param {number} k1
|
|
28
|
+
* @param {number} k2
|
|
29
|
+
* @return
|
|
30
|
+
*/
|
|
31
|
+
export declare function sameK(k1: number, k2: number): boolean;
|
|
32
|
+
/**
|
|
33
|
+
* 获取两点之间的斜率
|
|
34
|
+
* @param {point} point1
|
|
35
|
+
* @param {point} point2
|
|
36
|
+
* @return {number}
|
|
37
|
+
*/
|
|
38
|
+
export declare function getK(point1: Point, point2: Point): number;
|
|
39
|
+
/**
|
|
40
|
+
* 获取一点对于线段上最近的一点,
|
|
41
|
+
* 如果可以是过直线垂线的垂足,不行的话取线段的两端
|
|
42
|
+
* @param {point} point1
|
|
43
|
+
* @param {linePoints} linePoints
|
|
44
|
+
* @return {point}
|
|
45
|
+
*/
|
|
46
|
+
export declare function closestPointOnLine(point: Point, linePoints: Point[]): {
|
|
47
|
+
x: any;
|
|
48
|
+
y: any;
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* 点到线段的距离,
|
|
52
|
+
* 如果可以是过直线垂线的垂足的距离,不行的话取线段的两端的距离
|
|
53
|
+
* @param {point} point1
|
|
54
|
+
* @param {linePoints} linePoints
|
|
55
|
+
* @return {number}
|
|
56
|
+
*/
|
|
57
|
+
export declare function pointDistanceFromLine(point: Point, linePoints: Point[]): number;
|
|
58
|
+
/**
|
|
59
|
+
* 做线段的距离一定值的平行线段
|
|
60
|
+
* @param {number} distanceOfLine
|
|
61
|
+
* @param {linePoints} linePoints
|
|
62
|
+
* @return {[linePoints, linePoints]}
|
|
63
|
+
*/
|
|
64
|
+
export declare function linesWithDistanceOfLine(distanceOfLine: number, linePoints: Point[]): {
|
|
65
|
+
x: any;
|
|
66
|
+
y: any;
|
|
67
|
+
}[][];
|
|
68
|
+
/**
|
|
69
|
+
* 做线段的距离一定值的平行线段 (如果线段是弧形的)
|
|
70
|
+
* @param {number} distanceOfLine
|
|
71
|
+
* @param {linePoints} linePoints
|
|
72
|
+
* @param {number} 弧形定点到线段的距离
|
|
73
|
+
* @return {[linePoints, linePoints]}
|
|
74
|
+
*/
|
|
75
|
+
export declare function linesWithDistanceOfLineWithCurve(distanceOfLine: number, linePoints: Point[], curve: number): {
|
|
76
|
+
x: number;
|
|
77
|
+
y: number;
|
|
78
|
+
}[][];
|
|
79
|
+
/**
|
|
80
|
+
* 两条线段(包括延长线)的交点点
|
|
81
|
+
* @param {linePoints} linePoints1
|
|
82
|
+
* @param {linePoints} linePoints2
|
|
83
|
+
* @param needIntersectionInLine 是否是延长线的相交
|
|
84
|
+
* @return {point || false}
|
|
85
|
+
*/
|
|
86
|
+
export declare function intersectionOfLine(linePoints1: Point[], linePoints2: Point[], needIntersectionInLine: boolean): false | Point;
|
|
87
|
+
/**
|
|
88
|
+
* 是否点在线段上
|
|
89
|
+
* @param {point} point
|
|
90
|
+
* @param {linePoints} linePoints
|
|
91
|
+
* @return
|
|
92
|
+
*/
|
|
93
|
+
export declare function pointOnLine(point: Point, linePoints: Point[]): boolean;
|
|
94
|
+
/**
|
|
95
|
+
* 让点按照另一个点为圆心,一定弧度的情况下转动得到下一个点
|
|
96
|
+
* @param {point} point
|
|
97
|
+
* @param {point} centerPoint
|
|
98
|
+
* @param {number} rad
|
|
99
|
+
* @return {point}
|
|
100
|
+
*/
|
|
101
|
+
export declare function pointRotateByCenterPoint(point: Point, centerPoint: Point, rad: number): {
|
|
102
|
+
x: number;
|
|
103
|
+
y: number;
|
|
104
|
+
};
|
|
105
|
+
/**
|
|
106
|
+
* 获取一些点的中心点
|
|
107
|
+
* @param {points} point
|
|
108
|
+
* @return {point}
|
|
109
|
+
*/
|
|
110
|
+
export declare function getCenterPointOfPoints(points: Point[]): {
|
|
111
|
+
x: number;
|
|
112
|
+
y: number;
|
|
113
|
+
};
|
|
114
|
+
export declare function isIntersect(linePoints1: Point[], linePoints2: Point[]): 1 | 0;
|
|
115
|
+
export declare function getAreaSize(points: Point[]): number;
|
|
116
|
+
export declare function getAreaSizeWithoutLine(points: Point[]): number;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function rad2Deg(rad: number): number;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function nextFrame(fn: () => void, delay?: number): void;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as THREE from 'three';
|
|
2
|
+
export declare const genRotationMatrix: (x: number, y: number, z: number) => THREE.Matrix4;
|
|
3
|
+
declare const bject3d2LocalMatrix: (mesh: THREE.Object3D, { scale, rotation, position, }: {
|
|
4
|
+
scale: number;
|
|
5
|
+
rotation: number[];
|
|
6
|
+
position: {
|
|
7
|
+
x: number;
|
|
8
|
+
y: number;
|
|
9
|
+
z: number;
|
|
10
|
+
};
|
|
11
|
+
}) => THREE.Object3D;
|
|
12
|
+
export default bject3d2LocalMatrix;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function px2rem(_px: number | string, precision?: number): string;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 函数防抖:指触发事件后,在 `n` 秒内函数只能执行一次,如果触发事件后在 `n` 秒内又触发了事件,则会重新计算函数延执行时间。
|
|
3
|
+
* @param callback 回调函数
|
|
4
|
+
* @param waitFor 等待时间
|
|
5
|
+
* @returns
|
|
6
|
+
*/
|
|
7
|
+
export declare const useDebounce: <F extends (...args: any) => any>(callback: F, waitFor?: number) => (...args: Parameters<F>) => ReturnType<F>;
|
|
8
|
+
export default useDebounce;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 函数节流:控制频率,限制在 `n` 秒时间。
|
|
3
|
+
* @param callback 回调函数
|
|
4
|
+
* @param waitFor 等待时间
|
|
5
|
+
* @returns
|
|
6
|
+
*/
|
|
7
|
+
export declare const useThrottle: <F extends (...args: any) => any>(callback: F, waitFor: number) => (...args: Parameters<F>) => ReturnType<F>;
|
|
8
|
+
export default useThrottle;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 三维向量
|
|
3
|
+
*/
|
|
4
|
+
export interface Vector3Position {
|
|
5
|
+
x: number;
|
|
6
|
+
y: number;
|
|
7
|
+
z: number;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* 三维向量数组表示
|
|
11
|
+
*/
|
|
12
|
+
export declare type Vector3WithArray = [number, number, number];
|
|
13
|
+
/**
|
|
14
|
+
* 二维向量
|
|
15
|
+
*/
|
|
16
|
+
export interface Vector2Position {
|
|
17
|
+
x: number;
|
|
18
|
+
y: number;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* 二维向量数组展示
|
|
22
|
+
*/
|
|
23
|
+
export declare type Vector2WithArray = [number, number];
|
|
24
|
+
/**
|
|
25
|
+
* 4 * 4 矩阵数组表示
|
|
26
|
+
*/
|
|
27
|
+
export declare type Matrix4_4 = [
|
|
28
|
+
number,
|
|
29
|
+
number,
|
|
30
|
+
number,
|
|
31
|
+
number,
|
|
32
|
+
number,
|
|
33
|
+
number,
|
|
34
|
+
number,
|
|
35
|
+
number,
|
|
36
|
+
number,
|
|
37
|
+
number,
|
|
38
|
+
number,
|
|
39
|
+
number,
|
|
40
|
+
number,
|
|
41
|
+
number,
|
|
42
|
+
number,
|
|
43
|
+
number
|
|
44
|
+
];
|