@realsee/five-webgpu 1.0.0-alpha.5 → 1.0.0-alpha.6
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/ai_guides/api.md +9 -8
- package/ai_guides/features/camera-animation.md +1 -1
- package/ai_guides/features/event.md +0 -1
- package/ai_guides/features/five.md +8 -8
- package/ai_guides/features/gesture.md +1 -1
- package/ai_guides/features/load-external-model.md +6 -6
- package/ai_guides/features/load-progress.md +2 -2
- package/ai_guides/features/mode.md +3 -23
- package/ai_guides/features/model.md +1 -1
- package/ai_guides/features/state.md +2 -2
- package/ai_guides/features/ultra-hdr.md +41 -32
- package/ai_guides/quick-start.md +2 -2
- package/ai_guides/release_notes/6.8.md +2 -2
- package/ai_guides/support.md +0 -4
- package/docs/assets/hierarchy.js +1 -1
- package/docs/assets/navigation.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/classes/index.AdaptiveLuminancePass.html +1 -1
- package/docs/classes/index.BoundingMesh.html +1 -1
- package/docs/classes/index.EffectComposer.html +1 -1
- package/docs/classes/index.EyeDomeLightingPass.html +1 -1
- package/docs/classes/index.Five.html +68 -67
- package/docs/classes/index.FivePass.html +1 -1
- package/docs/classes/index.FlowingFireworks3DPass.html +1 -1
- package/docs/classes/index.FlowingLight2DPass.html +1 -1
- package/docs/classes/index.FlowingLight3DPass.html +1 -1
- package/docs/classes/index.GaussianBlurPass.html +1 -1
- package/docs/classes/index.InternalWebGPURenderer.html +4 -4
- package/docs/classes/index.Model.html +1 -1
- package/docs/classes/index.ModelScene.html +1 -1
- package/docs/classes/index.NetworkSubscribe.html +1 -1
- package/docs/classes/index.PBMCustomNode.html +8 -8
- package/docs/classes/index.PBMGaussianSplattingNodeMaterial.html +8 -6
- package/docs/classes/index.PBMGaussianSplattingObject.html +10 -4
- package/docs/classes/index.PBMGaussianSplattingRenderMesh.html +26 -15
- package/docs/classes/index.PBMGroup.html +1 -1
- package/docs/classes/index.PBMMesh.html +1 -1
- package/docs/classes/index.PBMMeshBasicMaterial.html +11 -7
- package/docs/classes/index.PBMMeshBasicNodeMaterial.html +11 -7
- package/docs/classes/index.PBMMeshPanoOnlyMaterial.html +11 -7
- package/docs/classes/index.PBMMeshPanoOnlyNodeMaterial.html +11 -7
- package/docs/classes/index.PBMMeshPhongMaterial.html +11 -7
- package/docs/classes/index.PBMMeshPhongNodeMaterial.html +11 -7
- package/docs/classes/index.PBMMeshPhysicalMaterial.html +11 -7
- package/docs/classes/index.PBMMeshPhysicalNodeMaterial.html +11 -7
- package/docs/classes/index.PBMPanoFilter.html +8 -8
- package/docs/classes/index.PBMPointCloud.html +1 -1
- package/docs/classes/index.PBMSkinnedMesh.html +1 -1
- package/docs/classes/index.PBMUpdateable.html +1 -1
- package/docs/classes/index.PanoCircleMesh.html +1 -1
- package/docs/classes/index.PanoCircleMeshCustom.html +5 -5
- package/docs/classes/index.PanoCircleMeshSolid.html +1 -1
- package/docs/classes/index.Parameter.html +1 -1
- package/docs/classes/index.Subscribe.html +1 -1
- package/docs/classes/index.TextureLoader.html +4 -1
- package/docs/classes/index.Tile3D.html +23 -21
- package/docs/classes/index.TileNode.html +1 -1
- package/docs/classes/index.Tileset.html +4 -4
- package/docs/classes/index.TrajectoryNode.html +3 -3
- package/docs/classes/index.Work.html +20 -18
- package/docs/classes/index.WorkResolvedObserver.html +22 -22
- package/docs/documents/api.html +11 -10
- package/docs/documents/features_camera-animation.html +1 -1
- package/docs/documents/features_event.html +0 -1
- package/docs/documents/features_five.html +7 -7
- package/docs/documents/features_gesture.html +1 -1
- package/docs/documents/features_load-external-model.html +6 -6
- package/docs/documents/features_load-progress.html +1 -1
- package/docs/documents/features_mode.html +5 -15
- package/docs/documents/features_model.html +1 -1
- package/docs/documents/features_state.html +1 -1
- package/docs/documents/features_ultra-hdr.html +50 -44
- package/docs/documents/quick-start.html +1 -1
- package/docs/documents/release_notes_6.8.html +2 -2
- package/docs/documents/support.html +1 -3
- package/docs/functions/index.customNodesCacheKey.html +1 -1
- package/docs/functions/index.parseWork.html +1 -1
- package/docs/functions/index.workToJson.html +1 -1
- package/docs/hierarchy.html +1 -1
- package/docs/interfaces/index.AddableObject.html +1 -1
- package/docs/interfaces/index.AjaxOptions.html +1 -1
- package/docs/interfaces/index.BaseEvent.html +2 -2
- package/docs/interfaces/index.Clock.html +24 -0
- package/docs/interfaces/index.EventCallback.html +49 -47
- package/docs/interfaces/index.FiveInitArgs.html +49 -40
- package/docs/interfaces/index.GainmapCfgData.html +15 -0
- package/docs/interfaces/index.GestureEvent.html +2 -2
- package/docs/interfaces/index.IPBMMaterial.html +10 -6
- package/docs/interfaces/index.ImageOptions.html +1 -1
- package/docs/interfaces/index.IntersectEvent.html +2 -2
- package/docs/interfaces/index.IntersectMesh.html +1 -1
- package/docs/interfaces/index.IntersectMeshInterface.html +1 -1
- package/docs/interfaces/index.Intersection.html +1 -1
- package/docs/interfaces/index.LoosePanoWork.html +2 -2
- package/docs/interfaces/index.LooseWork.html +2 -2
- package/docs/interfaces/index.LooseWorkInitial.html +2 -2
- package/docs/interfaces/index.LooseWorkModel.html +2 -2
- package/docs/interfaces/index.LooseWorkObserver.html +2 -2
- package/docs/interfaces/index.LooseWorkPanorama.html +4 -3
- package/docs/interfaces/index.LooseWorkWithExtrinsics.html +15 -9
- package/docs/interfaces/index.ModeChangeEvent.html +2 -2
- package/docs/interfaces/index.ModelControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/index.ModelEvent.html +2 -2
- package/docs/interfaces/index.ModelSceneEvent.html +2 -2
- package/docs/interfaces/index.ModelTileEvent.html +2 -2
- package/docs/interfaces/index.MovePanoOptions.html +1 -1
- package/docs/interfaces/index.NetworkAbortError.html +1 -1
- package/docs/interfaces/index.NetworkFirbiddenError.html +1 -1
- package/docs/interfaces/index.NetworkOptions.html +1 -1
- package/docs/interfaces/index.NetworkProxyError.html +1 -1
- package/docs/interfaces/index.NetworkResourceEvent.html +2 -2
- package/docs/interfaces/index.NetworkResponseError.html +1 -1
- package/docs/interfaces/index.NetworkTimeoutError.html +1 -1
- package/docs/interfaces/index.ObjectEvent.html +2 -2
- package/docs/interfaces/index.PBMClipperParameter.html +2 -2
- package/docs/interfaces/index.PBMCustomNodeContext.html +60 -12
- package/docs/interfaces/index.PBMCustomNodeOptions.html +4 -4
- package/docs/interfaces/index.PBMCustomNodePanoContext.html +12 -5
- package/docs/interfaces/index.PBMCustomNodeSlots.html +6 -6
- package/docs/interfaces/index.PBMPanoDepth.html +5 -5
- package/docs/interfaces/index.PBMPanoFilterValue.html +2 -2
- package/docs/interfaces/index.PBMPanoGainmap.html +6 -0
- package/docs/interfaces/index.PBMPanoPicture.html +9 -8
- package/docs/interfaces/index.PBMRefinedScreen.html +2 -2
- package/docs/interfaces/index.PanoCircleMeshCustomOptions.html +2 -2
- package/docs/interfaces/index.PanoCircleMeshInterface.html +1 -1
- package/docs/interfaces/index.PanoEvent.html +2 -2
- package/docs/interfaces/index.PanoTextureEvent.html +2 -2
- package/docs/interfaces/index.PanoramaControllerCustomInitArgs.html +9 -9
- package/docs/interfaces/index.PanoramaLikeControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/index.ParameterMaterialValue.html +1 -1
- package/docs/interfaces/index.ParameterTilesetValue.html +1 -1
- package/docs/interfaces/index.ParameterValue.html +1 -1
- package/docs/interfaces/index.Pose.html +1 -1
- package/docs/interfaces/index.RenderEvent.html +2 -2
- package/docs/interfaces/index.ResolvedParameterValue.html +1 -1
- package/docs/interfaces/index.State.html +1 -1
- package/docs/interfaces/index.StateEvent.html +2 -2
- package/docs/interfaces/index.TextureOptions.html +1 -1
- package/docs/interfaces/index.TilesetOptions.html +7 -2
- package/docs/interfaces/index.TopviewControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/index.VRPanoramaControllerCustomInitArgs.html +37 -0
- package/docs/interfaces/index.ViewLayer.html +23 -21
- package/docs/interfaces/index.WorkCubeHdrGainmapImage.html +10 -0
- package/docs/interfaces/index.WorkCubeImage.html +5 -9
- package/docs/interfaces/index.WorkImage.html +8 -12
- package/docs/interfaces/index.WorkInitial.html +8 -8
- package/docs/interfaces/index.WorkModel.html +8 -8
- package/docs/interfaces/index.WorkModelLayer.html +6 -6
- package/docs/interfaces/index.WorkObserver.html +23 -23
- package/docs/interfaces/index.WorkPanoramaJson.html +3 -2
- package/docs/interfaces/index.WorkTile.html +8 -12
- package/docs/interfaces/index.WorksEvent.html +2 -2
- package/docs/interfaces/index.XRControllerEvent.html +2 -2
- package/docs/interfaces/index.XRGestureEvent.html +2 -2
- package/docs/interfaces/index.XRSessionEvent.html +2 -2
- package/docs/modules/index.html +1 -1
- package/docs/types/index.ControllerCustomInitTypes.html +3 -2
- package/docs/types/index.ControllerEventTypes.html +25 -23
- package/docs/types/index.EventTypes.html +26 -26
- package/docs/types/index.Mode.html +2 -1
- package/docs/types/index.ParseOptions.html +14 -8
- package/docs/variables/index.GSPLAT_PIPELINE_AUTO.html +2 -0
- package/docs/variables/index.GSPLAT_PIPELINE_RASTER_CPU_SORT.html +2 -0
- package/docs/variables/index.GSPLAT_PIPELINE_RASTER_GPU_SORT.html +2 -0
- package/docs/variables/index.PROXY_CONTROLLER_EVENT_NAMES.html +1 -1
- package/docs/variables/index.controllersDefaultInitArgs.html +1 -1
- package/five/application/controllers.d.ts +4 -0
- package/five/application/events.d.ts +1 -1
- package/five/application/five.d.ts +4 -1
- package/five/application/fiveInitArgs.d.ts +13 -0
- package/five/application/mode.d.ts +2 -0
- package/five/cardboard/helper.d.ts +2 -0
- package/five/cardboard/index.d.ts +13 -0
- package/five/cardboard/sensor.d.ts +158 -0
- package/five/controllers/base.d.ts +3 -0
- package/five/controllers/events.d.ts +5 -3
- package/five/controllers/panorama.d.ts +2 -2
- package/five/controllers/vrPanorama.d.ts +56 -0
- package/five/core/panoVideo.d.ts +4 -1
- package/five/core/tiling.d.ts +25 -11
- package/five/gaussian-splatting/gpu-sort/prefixSumKernel.d.ts +65 -0
- package/five/gaussian-splatting/gpu-sort/radixSortModule.d.ts +128 -0
- package/five/gaussian-splatting/gpu-sort/shaders/prefixSum.d.ts +2 -0
- package/five/gaussian-splatting/gpu-sort/shaders/radixHistogram.d.ts +2 -0
- package/five/gaussian-splatting/gpu-sort/shaders/radixReorder.d.ts +2 -0
- package/five/gaussian-splatting/gpu-sort/shaders/sortKeygen.d.ts +2 -0
- package/five/gaussian-splatting/gpu-sort/sortAdapter.d.ts +234 -0
- package/five/gaussian-splatting/pipelines/cpuSortPipeline.d.ts +159 -0
- package/five/gaussian-splatting/pipelines/gpuSortPipeline.d.ts +98 -0
- package/five/gaussian-splatting/pipelines/gsplatPipeline.d.ts +104 -0
- package/five/gaussian-splatting/pipelines/pipelineMode.d.ts +42 -0
- package/five/gaussian-splatting/pipelines/sortThrottle.d.ts +45 -0
- package/five/index.d.ts +4 -1
- package/five/index.js +272 -269
- package/five/index.mjs +6979 -4610
- package/five/meshes/panoCircleMeshCustom.d.ts +1 -0
- package/five/model/index.d.ts +1 -1
- package/five/model/materials/pbmGaussianSplattingNodeMaterial.d.ts +4 -0
- package/five/model/materials/pbmMaterial.d.ts +113 -18
- package/five/model/materials/tsl/defines.d.ts +6 -1
- package/five/model/materials/tsl/outputBuilder.d.ts +1 -12
- package/five/model/materials/tsl/panoColor.d.ts +8 -2
- package/five/model/materials/tsl/utils.d.ts +13 -0
- package/five/model/objects/pbmGaussianSplattingObject.d.ts +9 -0
- package/five/model/objects/pbmGaussianSplattingRenderMesh.d.ts +67 -101
- package/five/model/tile3d/index.d.ts +2 -0
- package/five/model/tile3d/tileset.d.ts +5 -0
- package/five/model/tile3d/trajectory-content.d.ts +53 -0
- package/five/texture/loader.d.ts +6 -0
- package/five/types/cube.d.ts +0 -1
- package/five/utils/detector.d.ts +11 -1
- package/five/utils/error.d.ts +1 -0
- package/five/utils/event.d.ts +17 -1
- package/five/utils/gainmap-data.d.ts +23 -0
- package/five/work/index.d.ts +1 -1
- package/five/work/looseWorkType.d.ts +2 -1
- package/five/work/work.d.ts +30 -7
- package/five/work/workJsonType.d.ts +2 -1
- package/gltf-loader/gltf-object.d.ts +17 -0
- package/gltf-loader/index.d.ts +45 -0
- package/gltf-loader/index.js +255 -0
- package/gltf-loader/index.mjs +302 -0
- package/package.json +6 -1
- package/plugins/BackgroundPlugin/Controller.d.ts +20 -0
- package/plugins/BackgroundPlugin/index.d.ts +5 -0
- package/plugins/BackgroundPlugin/typings.d.ts +44 -0
- package/plugins/CSS2DPlugin/Controller.d.ts +59 -0
- package/plugins/CSS2DPlugin/index.d.ts +5 -0
- package/plugins/CSS2DPlugin/typing.d.ts +31 -0
- package/plugins/CSS3DPlugin/Controller.d.ts +64 -0
- package/plugins/CSS3DPlugin/index.d.ts +5 -0
- package/plugins/CSS3DPlugin/typing.d.ts +33 -0
- package/plugins/FloorplanPlugin/Controller.d.ts +100 -0
- package/plugins/FloorplanPlugin/index.d.ts +5 -0
- package/plugins/FloorplanPlugin/render/assets.d.ts +9 -0
- package/plugins/FloorplanPlugin/render/index.d.ts +35 -0
- package/plugins/FloorplanPlugin/render/isPointInPolygon.d.ts +5 -0
- package/plugins/FloorplanPlugin/render/renderFloor.d.ts +22 -0
- package/plugins/FloorplanPlugin/render/roomLabelVisibility.d.ts +10 -0
- package/plugins/FloorplanPlugin/typing.d.ts +156 -0
- package/plugins/FloorplanPlugin/typings/floorplanData.d.ts +112 -0
- package/plugins/FloorplanPlugin/typings/floorplanServerData.d.ts +78 -0
- package/plugins/FloorplanPlugin/typings/index.d.ts +2 -0
- package/plugins/FloorplanPlugin/utils/changeMode.d.ts +5 -0
- package/plugins/FloorplanPlugin/utils/changeModelCanvasOpacity.d.ts +6 -0
- package/plugins/FloorplanPlugin/utils/correctFiveState.d.ts +11 -0
- package/plugins/FloorplanPlugin/utils/equal.d.ts +9 -0
- package/plugins/FloorplanPlugin/utils/filter.d.ts +8 -0
- package/plugins/FloorplanPlugin/utils/fiveModelLoad.d.ts +6 -0
- package/plugins/FloorplanPlugin/utils/formatData.d.ts +6 -0
- package/plugins/FloorplanPlugin/utils/formatPosition.d.ts +33 -0
- package/plugins/FloorplanPlugin/utils/getDistanceFromModel.d.ts +6 -0
- package/plugins/FloorplanPlugin/utils/getPxmm.d.ts +19 -0
- package/plugins/FloorplanPlugin/utils/isTruelyObject.d.ts +4 -0
- package/plugins/FloorplanPlugin/utils/nearlyEqual.d.ts +8 -0
- package/plugins/FloorplanPlugin/utils/to.d.ts +5 -0
- package/plugins/Object3DHelperPlugin/Controller.d.ts +99 -0
- package/plugins/Object3DHelperPlugin/Controllers/BaseController.d.ts +142 -0
- package/plugins/Object3DHelperPlugin/Controllers/BoundingBoxController.d.ts +16 -0
- package/plugins/Object3DHelperPlugin/Controllers/MoveController.d.ts +66 -0
- package/plugins/Object3DHelperPlugin/Controllers/RotateController.d.ts +61 -0
- package/plugins/Object3DHelperPlugin/FiveControllerWrapper.d.ts +17 -0
- package/plugins/Object3DHelperPlugin/Helper/BaseHelper.d.ts +97 -0
- package/plugins/Object3DHelperPlugin/Helper/BoundingBoxHelper.d.ts +16 -0
- package/plugins/Object3DHelperPlugin/Helper/MoveHelper.d.ts +37 -0
- package/plugins/Object3DHelperPlugin/Helper/RotateHelper.d.ts +93 -0
- package/plugins/Object3DHelperPlugin/constant.d.ts +27 -0
- package/plugins/Object3DHelperPlugin/index.d.ts +6 -0
- package/plugins/Object3DHelperPlugin/typing.d.ts +143 -0
- package/plugins/Object3DHelperPlugin/utils/ArrowGroup.d.ts +22 -0
- package/plugins/Object3DHelperPlugin/utils/CenterHandle.d.ts +23 -0
- package/plugins/Object3DHelperPlugin/utils/PlaneHandle.d.ts +19 -0
- package/plugins/Object3DHelperPlugin/utils/calculateScaleByCamera.d.ts +5 -0
- package/plugins/Object3DHelperPlugin/utils/cameraHooks.d.ts +3 -0
- package/plugins/Object3DHelperPlugin/utils/direction.d.ts +14 -0
- package/plugins/Object3DHelperPlugin/utils/getMouseRaycaster.d.ts +5 -0
- package/plugins/Object3DHelperPlugin/utils/getOrthographicCameraDirection.d.ts +8 -0
- package/plugins/Object3DHelperPlugin/utils/setObjectQuaternion.d.ts +8 -0
- package/plugins/Object3DHelperPlugin/utils/solidGuide.d.ts +27 -0
- package/plugins/Object3DHelperPlugin/utils/tipsDom.d.ts +8 -0
- package/plugins/PanoAnimePlugin/Controller.d.ts +49 -0
- package/plugins/PanoAnimePlugin/index.d.ts +5 -0
- package/plugins/PanoAnimePlugin/typing.d.ts +37 -0
- package/plugins/index.d.ts +6 -0
- package/plugins/index.js +393 -3
- package/plugins/index.mjs +3421 -92
- package/plugins/thirdParty/CSS2DRenderer.d.ts +37 -0
- package/plugins/thirdParty/CSS3DRenderer.d.ts +45 -0
- package/plugins/thirdParty/OrbitControls.d.ts +78 -0
- package/plugins/thirdParty/domevents.d.ts +36 -0
- package/plugins/utils/clamp.d.ts +2 -0
- package/plugins/utils/uuid.d.ts +2 -0
- package/react/index.js +2 -2
- package/react/index.mjs +2 -2
- package/umd/five-gltf-loader.js +255 -0
- package/umd/five-plugins.js +461 -3
- package/umd/five-react.js +2 -2
- package/umd/five.js +350 -347
- package/docs/interfaces/index.PBMHDRConfig.html +0 -12
- package/five/gaussian-splatting/worker/dataWorker.d.ts +0 -1
- package/five/three-version-check.d.ts +0 -1
- package/five/utils/hdr-data.d.ts +0 -13
- package/five/utils/shaderContentFix.d.ts +0 -7
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import type { Five } from '@realsee/five-webgpu';
|
|
2
|
+
import { BasePlugin } from '../BasePlugin';
|
|
3
|
+
import type { State, Config, Params, EventMap, PluginData, PluginServerData, ShowState, ShowOptions, HideOptions, HighlightData } from './typing';
|
|
4
|
+
export declare class Controller extends BasePlugin.Controller<State, EventMap, PluginServerData, PluginData> {
|
|
5
|
+
name: string;
|
|
6
|
+
state: State;
|
|
7
|
+
protected data?: PluginData;
|
|
8
|
+
/** 展示户型图时,five 需要处于的相机状态 */
|
|
9
|
+
protected showState: ShowState;
|
|
10
|
+
/** show 动画的公共 Promise */
|
|
11
|
+
protected showPromise?: Promise<void>;
|
|
12
|
+
/** show 过程中的 reject 方法,用于被 hide/disable 打断时抛出 */
|
|
13
|
+
private showRejection?;
|
|
14
|
+
private renderer;
|
|
15
|
+
private styleSheet;
|
|
16
|
+
private panoIndex;
|
|
17
|
+
private floorIndex;
|
|
18
|
+
/** 户型图父容器 */
|
|
19
|
+
private wrapper?;
|
|
20
|
+
/** five.addExtraElement 的解绑函数:户型图 DOM 与 five 画布是兄弟节点而非子节点,
|
|
21
|
+
* wheel/pan/tap 等原生事件不会冒泡到 five 绑定监听的画布元素上,
|
|
22
|
+
* 必须显式注册为 extraElement 才能让 hover 在户型图 DOM(如房间高亮层)上时鼠标滚轮缩放等手势仍然生效 */
|
|
23
|
+
private removeExtraElement?;
|
|
24
|
+
/** 展示户型图前,Five 的 Panorama Longitude(用于相机图标朝向) */
|
|
25
|
+
private lastPanoramaLongitude;
|
|
26
|
+
/** 户型图 DOM 大小 */
|
|
27
|
+
private size;
|
|
28
|
+
/** 是否已经执行过事件监听 */
|
|
29
|
+
private hasAddedEventListener;
|
|
30
|
+
/** 上一次隐藏是否是用户调用了 hide 导致的(用于阻止随后的自动展示) */
|
|
31
|
+
private isHiddenByHideFunc;
|
|
32
|
+
/** 高亮区域 */
|
|
33
|
+
private highlightData;
|
|
34
|
+
/** 当前 hover 的房间,供 handleClick 读取 */
|
|
35
|
+
private store;
|
|
36
|
+
private resizeObserver?;
|
|
37
|
+
constructor(five: Five, params?: Params);
|
|
38
|
+
/** 加载户型图服务端数据 */
|
|
39
|
+
load(serverData: PluginServerData, state?: Partial<State>, userAction?: boolean): Promise<void>;
|
|
40
|
+
/** 把楼层数据里的家具数组填充进 floorDatas[i].items(数据结构与业务约定的家具数据源对齐,此处保留扩展点,调用方自行传入格式化后的数组) */
|
|
41
|
+
loadItems(itemsByFloor: PluginData['floorDatas'][number]['items'][]): void;
|
|
42
|
+
/** 把插件渲染 DOM 挂载到指定容器 */
|
|
43
|
+
appendTo(wrapper: Element): void;
|
|
44
|
+
enable(options?: BasePlugin.BaseOptions): void;
|
|
45
|
+
disable(options?: BasePlugin.BaseOptions): void;
|
|
46
|
+
dispose: () => void;
|
|
47
|
+
/**
|
|
48
|
+
* 展示户型图
|
|
49
|
+
* @description 多次调用只会触发一次 showAnimationEnded;如果参数不一致,上一次 show 的 Promise 会被 reject
|
|
50
|
+
*/
|
|
51
|
+
show: (options?: Omit<Partial<ShowOptions>, "isAutoShow">) => Promise<void>;
|
|
52
|
+
/** 隐藏户型图 */
|
|
53
|
+
hide: (options?: Partial<HideOptions>) => Promise<void>;
|
|
54
|
+
setState(state: Partial<State>, options?: BasePlugin.BaseOptions): void;
|
|
55
|
+
changeConfigs(config: Partial<Config>, userAction?: boolean): void;
|
|
56
|
+
/** 更新户型图展示大小(根据吸附高度换算的 pxmm 计算 DOM 尺寸) */
|
|
57
|
+
updateSize(): boolean;
|
|
58
|
+
/** 更新户型图位置(跟随模型包围盒中心的屏幕投影) */
|
|
59
|
+
updatePosition(): void;
|
|
60
|
+
highlight: (highlightData: HighlightData) => void;
|
|
61
|
+
unhighlight: () => void;
|
|
62
|
+
/** 更新展示状态(longitude/latitude/offset 等),可用于自定义户型图展示角度 */
|
|
63
|
+
updateShowState: (showState: Partial<ShowState>) => void;
|
|
64
|
+
private getPxmmWithRotation;
|
|
65
|
+
private updateState;
|
|
66
|
+
private initContainer;
|
|
67
|
+
private registerExtraElement;
|
|
68
|
+
private observeResize;
|
|
69
|
+
/** 帧节流:把 resize 触发的 updateSize/updatePosition 合并到下一帧执行,避开与 five.refresh() 的调用顺序竞态 */
|
|
70
|
+
private pendingResizeFrame?;
|
|
71
|
+
private scheduleResizeUpdate;
|
|
72
|
+
private renderCurrent;
|
|
73
|
+
private onRoomHover;
|
|
74
|
+
private handleClick;
|
|
75
|
+
private addEventListener;
|
|
76
|
+
private removeEventListener;
|
|
77
|
+
private onFiveModelLoaded;
|
|
78
|
+
/** 模式切换后自动隐藏户型图 */
|
|
79
|
+
private onFiveModeChange;
|
|
80
|
+
/** 惯性结束后,判断能否自动展示户型图 */
|
|
81
|
+
private onFiveInertiaPan;
|
|
82
|
+
private onFivePanoArrived;
|
|
83
|
+
/** 相机变化时判断户型图是否应该自动隐藏 */
|
|
84
|
+
private onFiveCameraUpdate;
|
|
85
|
+
/** 帧节流:把 updatePosition/updateSize 合并到下一帧执行,避免逐帧触发同步重排 */
|
|
86
|
+
private pendingCameraUpdateFrame?;
|
|
87
|
+
private scheduleCameraUpdate;
|
|
88
|
+
private getRelativePose;
|
|
89
|
+
/** 户型图展示中转动模型,结束时自动修复模型状态 */
|
|
90
|
+
private onFiveWantsPanGesture;
|
|
91
|
+
private onFiveWantsTapGesture;
|
|
92
|
+
private onFiveWantsChangeMode;
|
|
93
|
+
/** 模型楼层高亮改变时,自动进行楼层切换 */
|
|
94
|
+
private onModelShownFloorChange;
|
|
95
|
+
private _enable;
|
|
96
|
+
private _disable;
|
|
97
|
+
private _show;
|
|
98
|
+
private _hide;
|
|
99
|
+
private renderWithDuration;
|
|
100
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { Five } from '@realsee/five-webgpu';
|
|
2
|
+
import type * as FloorplanPluginType from './typing';
|
|
3
|
+
import { Controller } from './Controller';
|
|
4
|
+
export declare const FloorplanPlugin: (five: Five, params?: FloorplanPluginType.Params) => Controller;
|
|
5
|
+
export type { FloorplanPluginType, Controller as FloorplanPluginController };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 相机(点位)朝向图标:一个指向朝向的扇形箭头,中心为当前点位
|
|
3
|
+
* 用轻量内联 SVG 代替原 dnalogelSDK 的位图资源,保留相近的视觉语义
|
|
4
|
+
*/
|
|
5
|
+
export declare const CAMERA_IMAGE = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADMAAAAzCAMAAAANf8AYAAAC2VBMVEUAAACCnP+Dn/+Enf+HqP+Gp/+Fof+Gpf+IrP+Lsf+Dof+Cmv+Lsv+Mtf+Eo/+B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vsb85qjbFxHOCprMZaf5qdhlorxwGeTsPIttvPlno0y3GAZfbHp6n3ynGAV0m99u/2J6H3znGAvW4n+J25tdY7xwFey1pvQe6/DlrjOMDLqfXW7N5pbs0YWhxgtpj0rl1uiaHFISzccSWohUCzOIemm0VKChwHOMutKCVwHOA4av/JVi0xtDiRpCRfRcvQ4lBfxSnG0OJc/+xTjKHFyVRMP38iDC0O92lZVRhanO+vcVWGFu9BRWkW7+Z3rapEizdy7ZVm8V5Gtr8AtSnix59eOmYAAAAASUVORK5CYII=";
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { Config, FloorplanData, FloorplanRoomItem, HighlightData } from '../typing';
|
|
2
|
+
export interface RenderProps {
|
|
3
|
+
visible: boolean;
|
|
4
|
+
duration: number;
|
|
5
|
+
panoIndex: number;
|
|
6
|
+
floorIndex: number;
|
|
7
|
+
floorplanData: FloorplanData;
|
|
8
|
+
lastPanoramaLongitude: number;
|
|
9
|
+
config: Config;
|
|
10
|
+
highlightData: HighlightData;
|
|
11
|
+
store: {
|
|
12
|
+
roomOnMouse: FloorplanRoomItem | null;
|
|
13
|
+
};
|
|
14
|
+
onRoomHover: (room: FloorplanRoomItem | null) => void;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* 户型图纯 DOM/SVG 渲染器
|
|
18
|
+
* @description 替代 dnalogelSDK 的 Svelte 版本渲染层,管理每个楼层的 DOM 复用与展示态切换
|
|
19
|
+
*/
|
|
20
|
+
export declare class FloorplanRenderer {
|
|
21
|
+
readonly rootElement: HTMLElement;
|
|
22
|
+
/** floorIndex -> 楼层 DOM,缓存以避免每次 render 都重建整棵树 */
|
|
23
|
+
private floorElements;
|
|
24
|
+
private currentFloorIndex;
|
|
25
|
+
private isVisible;
|
|
26
|
+
constructor();
|
|
27
|
+
/**
|
|
28
|
+
* 根据最新的 props 全量刷新渲染结果
|
|
29
|
+
* @description 楼层 DOM 会被复用(数据没变时不重建),只有当前楼层可见(opacity/pointer-events 切换)
|
|
30
|
+
*/
|
|
31
|
+
render(props: RenderProps): void;
|
|
32
|
+
/** 重新计算当前楼层房间标签的可见性(容器 resize 后调用) */
|
|
33
|
+
updateLabelsVisibility(floorplanData: FloorplanData, floorIndex: number, adaptiveEnable: boolean): void;
|
|
34
|
+
dispose(): void;
|
|
35
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { Config, FloorplanData, FloorplanRoomItem, HighlightData } from '../typing';
|
|
2
|
+
export interface RenderFloorContext {
|
|
3
|
+
floorplanData: FloorplanData;
|
|
4
|
+
floorIndex: number;
|
|
5
|
+
panoIndex: number;
|
|
6
|
+
lastPanoramaLongitude: number;
|
|
7
|
+
config: Config;
|
|
8
|
+
highlightData: HighlightData;
|
|
9
|
+
/** 当前 hover 的房间,供外部(Controller.handleClick)读取 */
|
|
10
|
+
store: {
|
|
11
|
+
roomOnMouse: FloorplanRoomItem | null;
|
|
12
|
+
};
|
|
13
|
+
onRoomHover: (room: FloorplanRoomItem | null) => void;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* 渲染单个楼层的完整 DOM 树(材质 -> 高亮 -> 线框 -> 家具 -> 标签 -> 相机 -> 指北针)
|
|
17
|
+
*/
|
|
18
|
+
export declare function renderFloor(ctx: RenderFloorContext): HTMLElement;
|
|
19
|
+
/**
|
|
20
|
+
* 根据房间标签 DOM 的实际尺寸和 pxmm,更新标签的自适应显隐(需要在 DOM 挂载并有真实宽度后调用)
|
|
21
|
+
*/
|
|
22
|
+
export declare function updateRoomLabelsVisibility(floorEl: HTMLElement, floorplanData: FloorplanData, floorIndex: number, adaptiveEnable: boolean): void;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { FloorplanRoomItem } from '../typings';
|
|
2
|
+
/**
|
|
3
|
+
* 判断房间标签 DOM(给定宽高,中心点对齐 room.roomLabel.position)在 pxmm 缩放下
|
|
4
|
+
* 是否整体落在房间轮廓内(四个角都在多边形内才算通过)
|
|
5
|
+
* @description 与 dnalogelSDK RoomLabel.svelte 的 isLabelInRoomCurry 等价
|
|
6
|
+
*/
|
|
7
|
+
export declare function isLabelInRoom(room: FloorplanRoomItem, labelSize: {
|
|
8
|
+
width: number;
|
|
9
|
+
height: number;
|
|
10
|
+
}, pxmm: number): boolean;
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import type * as THREE from 'three/webgpu';
|
|
2
|
+
import type { BasePlugin } from '../BasePlugin';
|
|
3
|
+
import type { FloorplanData, FloorplanServerData, FloorplanRoomItem, FloorplanItem } from './typings';
|
|
4
|
+
export * from './typings';
|
|
5
|
+
/** 户型图在垂直方向上吸附的高度基准 */
|
|
6
|
+
export declare const enum FLOOR_PLAN_ATTACHED_TO {
|
|
7
|
+
/** 吸附到楼层地面 */
|
|
8
|
+
FLOOR = 1,
|
|
9
|
+
/** 吸附到楼层天花板 */
|
|
10
|
+
CEILING = 2,
|
|
11
|
+
/** 吸附到模型整体包围盒中心高度 */
|
|
12
|
+
BOUNDING_CENTER = 3
|
|
13
|
+
}
|
|
14
|
+
export declare const enum FloorplanErrorType {
|
|
15
|
+
UnknownError = "UnknownError",
|
|
16
|
+
DataNotLoaded = "DataNotLoaded",
|
|
17
|
+
UpdateSizeError = "UpdateSizeError",
|
|
18
|
+
BreakOffByHide = "BreakOffByHide",
|
|
19
|
+
BreakOffByDisable = "BreakOffByDisable",
|
|
20
|
+
ModelNotLoaded = "ModelNotLoaded",
|
|
21
|
+
ChangeModeError = "ChangeModeError",
|
|
22
|
+
UpdateCameraError = "UpdateCameraError"
|
|
23
|
+
}
|
|
24
|
+
export type PluginData = FloorplanData;
|
|
25
|
+
export type PluginServerData = FloorplanServerData | {
|
|
26
|
+
version: number;
|
|
27
|
+
data: FloorplanServerData;
|
|
28
|
+
};
|
|
29
|
+
export type ShowMode = 'Topview' | 'Mapview' | 'Floorplan';
|
|
30
|
+
/** 展示户型图时,需要 five 处于的相机状态 */
|
|
31
|
+
export interface ShowState {
|
|
32
|
+
latitude: number;
|
|
33
|
+
longitude: number;
|
|
34
|
+
fov?: number;
|
|
35
|
+
mode: ShowMode;
|
|
36
|
+
offset?: THREE.Vector3;
|
|
37
|
+
distance?: number;
|
|
38
|
+
}
|
|
39
|
+
export interface MissingFloorConfig {
|
|
40
|
+
imageURL: string;
|
|
41
|
+
imageWidth: number;
|
|
42
|
+
imageHeight: number;
|
|
43
|
+
text: string;
|
|
44
|
+
textFontSize: number;
|
|
45
|
+
}
|
|
46
|
+
export interface Config {
|
|
47
|
+
/** 指北针文字 */
|
|
48
|
+
northDesc: string;
|
|
49
|
+
/** 展示户型图时,模型/全景画面的透明度 */
|
|
50
|
+
modelOpacity: number;
|
|
51
|
+
/** 是否展示相机(点位)图标 */
|
|
52
|
+
cameraEnable: boolean;
|
|
53
|
+
/** 是否允许房间高亮 */
|
|
54
|
+
highlightEnable: boolean;
|
|
55
|
+
/** 鼠标 hover 房间时是否高亮 */
|
|
56
|
+
hoverEnable: boolean;
|
|
57
|
+
/** 是否展示指北针 */
|
|
58
|
+
compassEnable: boolean;
|
|
59
|
+
/** 相机静止一段时间后是否自动展示户型图 */
|
|
60
|
+
autoShowEnable: boolean;
|
|
61
|
+
/** 是否展示外墙标尺 */
|
|
62
|
+
ruleLabelsEnable: boolean;
|
|
63
|
+
/** 是否展示房间标签(名称/面积/尺寸的总开关) */
|
|
64
|
+
roomLabelsEnable: boolean;
|
|
65
|
+
/** 是否展示房间面积 */
|
|
66
|
+
roomAreaEnable: boolean;
|
|
67
|
+
/** 是否展示房间名称 */
|
|
68
|
+
roomNameEnable: boolean;
|
|
69
|
+
/** 其它类型房间是否展示名称 */
|
|
70
|
+
roomNameOtherTypeEnable: boolean;
|
|
71
|
+
/** 是否展示房间尺寸标注 */
|
|
72
|
+
roomDimensionEnable: boolean;
|
|
73
|
+
/** 相机(点位)图标使用的图片地址 */
|
|
74
|
+
cameraImageUrl: string;
|
|
75
|
+
/** 户型图在垂直方向上的吸附基准 */
|
|
76
|
+
attachedTo: FLOOR_PLAN_ATTACHED_TO;
|
|
77
|
+
/** 自定义房间标签渲染,返回值将替代默认的名称/面积/尺寸 DOM */
|
|
78
|
+
getLabelElement?: (room: FloorplanRoomItem) => HTMLElement | undefined;
|
|
79
|
+
/** 房间标签是否根据房间大小自适应显隐 */
|
|
80
|
+
adaptiveRoomLabelVisibleEnable: boolean;
|
|
81
|
+
/** 无楼层数据时的占位配置 */
|
|
82
|
+
missingFloorConfig: Partial<MissingFloorConfig>;
|
|
83
|
+
/** 国际化转换函数 */
|
|
84
|
+
i18n: (key: string) => string;
|
|
85
|
+
/** 面积文案格式化 */
|
|
86
|
+
getRoomAreaText: (size: number) => string;
|
|
87
|
+
/** 尺寸文案格式化 */
|
|
88
|
+
getRoomDimensionText: (width: number, height: number) => string;
|
|
89
|
+
/** 标尺距离文案格式化 */
|
|
90
|
+
getRuleDistanceText: (distance: number) => string;
|
|
91
|
+
}
|
|
92
|
+
/** 插件初始化参数 */
|
|
93
|
+
export interface Params {
|
|
94
|
+
config?: Partial<Config>;
|
|
95
|
+
initialState?: Partial<State>;
|
|
96
|
+
/** 展示户型图时期望 five 处于的相机状态,可通过 updateShowState 更新 */
|
|
97
|
+
showState?: Partial<ShowState>;
|
|
98
|
+
}
|
|
99
|
+
export interface State extends BasePlugin.State {
|
|
100
|
+
enabled: boolean;
|
|
101
|
+
visible: boolean;
|
|
102
|
+
config: Config;
|
|
103
|
+
}
|
|
104
|
+
export interface ShowOptions {
|
|
105
|
+
/** 展示的楼层 */
|
|
106
|
+
floorIndex: number;
|
|
107
|
+
/** 展示户型图时,模型 / 全景画面的透明度 */
|
|
108
|
+
modelOpacity: number;
|
|
109
|
+
/** 是否立即展示(不做渐显动画) */
|
|
110
|
+
immediately: boolean;
|
|
111
|
+
/** 是否是自动展示(惯性停止后触发),内部使用 */
|
|
112
|
+
isAutoShow: boolean;
|
|
113
|
+
/** 是否是用户行为 */
|
|
114
|
+
userAction: boolean;
|
|
115
|
+
}
|
|
116
|
+
export interface HideOptions {
|
|
117
|
+
userAction: boolean;
|
|
118
|
+
/** 是否是自动隐藏(相机大幅转动触发),内部使用 */
|
|
119
|
+
isAutoHide: boolean;
|
|
120
|
+
}
|
|
121
|
+
/** 高亮数据,key 为 `${floorIndex}_${roomId}` */
|
|
122
|
+
export type HighlightData = Record<string, {
|
|
123
|
+
fill?: string;
|
|
124
|
+
opacity?: number;
|
|
125
|
+
disabled?: boolean;
|
|
126
|
+
} | undefined>;
|
|
127
|
+
export interface EventMap extends BasePlugin.EventMap<State, PluginData> {
|
|
128
|
+
/** enabled 从 false 到 true 的回调 */
|
|
129
|
+
enable: (event: {
|
|
130
|
+
userAction: boolean;
|
|
131
|
+
}) => void;
|
|
132
|
+
/** enabled 从 true 到 false 的回调 */
|
|
133
|
+
disable: (event: {
|
|
134
|
+
userAction: boolean;
|
|
135
|
+
}) => void;
|
|
136
|
+
/** 插件 dispose */
|
|
137
|
+
dispose: () => void;
|
|
138
|
+
/** 开始展示户型图 */
|
|
139
|
+
show: (event: {
|
|
140
|
+
userAction: boolean;
|
|
141
|
+
auto: boolean;
|
|
142
|
+
}) => void;
|
|
143
|
+
/** 户型图展示动画结束 */
|
|
144
|
+
showAnimationEnded: (event: {
|
|
145
|
+
userAction: boolean;
|
|
146
|
+
auto: boolean;
|
|
147
|
+
}) => void;
|
|
148
|
+
/** 隐藏户型图 */
|
|
149
|
+
hide: (event: {
|
|
150
|
+
auto: boolean;
|
|
151
|
+
userAction: boolean;
|
|
152
|
+
}) => void;
|
|
153
|
+
/** 点击房间,返回 false 可阻止默认的分间跳转行为 */
|
|
154
|
+
click: (room: FloorplanRoomItem | null) => void | false;
|
|
155
|
+
}
|
|
156
|
+
export type { FloorplanRoomItem, FloorplanItem };
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 户型图内部使用数据(camelCase),由 formatData 从 FloorplanServerData 转换而来
|
|
3
|
+
*/
|
|
4
|
+
import type * as THREE from 'three/webgpu';
|
|
5
|
+
export interface FloorplanPosition {
|
|
6
|
+
x: number;
|
|
7
|
+
y: number;
|
|
8
|
+
}
|
|
9
|
+
export interface FloorplanImagePosition {
|
|
10
|
+
x: number;
|
|
11
|
+
y: number;
|
|
12
|
+
}
|
|
13
|
+
export interface FloorplanOutlineItem {
|
|
14
|
+
url: string;
|
|
15
|
+
index: number;
|
|
16
|
+
svgUrl?: string;
|
|
17
|
+
/** svg_url 拉取到的文本内容,存在时优先使用 svg 渲染线框 */
|
|
18
|
+
svgContent?: string;
|
|
19
|
+
}
|
|
20
|
+
export interface FloorplanEntrance {
|
|
21
|
+
positionInImage: FloorplanImagePosition;
|
|
22
|
+
northRad: number;
|
|
23
|
+
roomId: string;
|
|
24
|
+
floorIndex: number;
|
|
25
|
+
}
|
|
26
|
+
export interface FloorplanBounding {
|
|
27
|
+
max: FloorplanPosition;
|
|
28
|
+
min: FloorplanPosition;
|
|
29
|
+
origin: FloorplanPosition;
|
|
30
|
+
}
|
|
31
|
+
export interface FloorplanRoomLabelItem {
|
|
32
|
+
position: FloorplanPosition;
|
|
33
|
+
positionInImage: FloorplanImagePosition;
|
|
34
|
+
}
|
|
35
|
+
export interface FloorplanDimension {
|
|
36
|
+
width: number;
|
|
37
|
+
height: number;
|
|
38
|
+
/** 垂直方向标注箭头定位点 */
|
|
39
|
+
vertical?: FloorplanPosition[];
|
|
40
|
+
/** 水平方向标注箭头定位点 */
|
|
41
|
+
horizontal?: FloorplanPosition[];
|
|
42
|
+
}
|
|
43
|
+
export interface FloorplanRoomItem {
|
|
44
|
+
id: string;
|
|
45
|
+
/** 面积,单位 mm² */
|
|
46
|
+
size: number;
|
|
47
|
+
name: string;
|
|
48
|
+
/** 用户自定义分间别名 */
|
|
49
|
+
customizedName?: string;
|
|
50
|
+
/** 房间轮廓多边形点(户型图坐标系,原点在中心) */
|
|
51
|
+
path: FloorplanPosition[];
|
|
52
|
+
roomType: string;
|
|
53
|
+
/** 地板材质类型:0 纯色 / 1 瓷砖 / 2 木地板 */
|
|
54
|
+
floorType: number;
|
|
55
|
+
roomLabel: FloorplanRoomLabelItem;
|
|
56
|
+
observerIndexs: number[];
|
|
57
|
+
dimension?: FloorplanDimension;
|
|
58
|
+
}
|
|
59
|
+
export interface FloorplanRuleLabels {
|
|
60
|
+
top: FloorplanPosition[][];
|
|
61
|
+
right: FloorplanPosition[][];
|
|
62
|
+
bottom: FloorplanPosition[][];
|
|
63
|
+
left: FloorplanPosition[][];
|
|
64
|
+
}
|
|
65
|
+
export interface FloorplanFloorData {
|
|
66
|
+
floorName: string;
|
|
67
|
+
floorIndex: number;
|
|
68
|
+
rooms: FloorplanRoomItem[];
|
|
69
|
+
rules: FloorplanRuleLabels;
|
|
70
|
+
/** 无房间数据时,是否仍有墙线(决定是否展示缺省占位图) */
|
|
71
|
+
is_has_wall: boolean;
|
|
72
|
+
/** 家具数据,通过 loadItems 填充 */
|
|
73
|
+
items?: FloorplanItem[];
|
|
74
|
+
}
|
|
75
|
+
export interface FloorplanObserver {
|
|
76
|
+
floorIndex: number;
|
|
77
|
+
positionInImage: FloorplanImagePosition;
|
|
78
|
+
}
|
|
79
|
+
export interface FloorplanData {
|
|
80
|
+
outlines: FloorplanOutlineItem[];
|
|
81
|
+
floorDatas: FloorplanFloorData[];
|
|
82
|
+
entrance: FloorplanEntrance | null;
|
|
83
|
+
bounding: FloorplanBounding;
|
|
84
|
+
observers: FloorplanObserver[];
|
|
85
|
+
}
|
|
86
|
+
/** 家具 icon(loadItems 填充到 floorDatas[i].items) */
|
|
87
|
+
export interface FloorplanItem {
|
|
88
|
+
id: string;
|
|
89
|
+
positionInImage: FloorplanImagePosition;
|
|
90
|
+
/** 宽度,占户型图整体宽度的比例 [0,1] */
|
|
91
|
+
width: number;
|
|
92
|
+
/** 高度,占户型图整体高度的比例 [0,1] */
|
|
93
|
+
height: number;
|
|
94
|
+
src: string;
|
|
95
|
+
notes: string;
|
|
96
|
+
rotateX: number;
|
|
97
|
+
rotateY: number;
|
|
98
|
+
rotateZ: number;
|
|
99
|
+
}
|
|
100
|
+
/** 挂载到雷达图上的三维物体(3D 世界坐标) */
|
|
101
|
+
export interface FloorplanExtraObject3D {
|
|
102
|
+
id: string;
|
|
103
|
+
position: THREE.Vector3;
|
|
104
|
+
icon?: string;
|
|
105
|
+
}
|
|
106
|
+
/** 转换为户型图 2D 坐标后的三维挂件 */
|
|
107
|
+
export interface FloorplanExtraObject {
|
|
108
|
+
id: string;
|
|
109
|
+
floorIndex: number;
|
|
110
|
+
positionInImage: FloorplanImagePosition;
|
|
111
|
+
icon: string;
|
|
112
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 户型图服务端原始数据(snake_case),与 formatData 配合转换成内部使用的 FloorplanData(camelCase)
|
|
3
|
+
*/
|
|
4
|
+
export interface FloorplanServerPosition {
|
|
5
|
+
x: number;
|
|
6
|
+
y: number;
|
|
7
|
+
}
|
|
8
|
+
export interface FloorplanServerImagePosition {
|
|
9
|
+
x: number;
|
|
10
|
+
y: number;
|
|
11
|
+
}
|
|
12
|
+
export interface FloorplanServerOutlineItem {
|
|
13
|
+
url: string;
|
|
14
|
+
index: number;
|
|
15
|
+
svg_url?: string;
|
|
16
|
+
}
|
|
17
|
+
export interface FloorplanServerEntrance {
|
|
18
|
+
position_in_image: FloorplanServerImagePosition;
|
|
19
|
+
north_rad: number;
|
|
20
|
+
room_id: string;
|
|
21
|
+
floor_index: number;
|
|
22
|
+
}
|
|
23
|
+
export interface FloorplanServerBounding {
|
|
24
|
+
max: FloorplanServerPosition;
|
|
25
|
+
min: FloorplanServerPosition;
|
|
26
|
+
origin: FloorplanServerPosition;
|
|
27
|
+
}
|
|
28
|
+
export interface FloorplanServerRoomLabelItem {
|
|
29
|
+
position: FloorplanServerPosition;
|
|
30
|
+
position_in_image: FloorplanServerImagePosition;
|
|
31
|
+
}
|
|
32
|
+
export interface FloorplanServerDimension {
|
|
33
|
+
width: number;
|
|
34
|
+
height: number;
|
|
35
|
+
/** 垂直方向标注箭头定位点(一般为 2 个点:下端点、上端点) */
|
|
36
|
+
vertical?: FloorplanServerPosition[];
|
|
37
|
+
/** 水平方向标注箭头定位点(一般为 2 个点:左端点、右端点) */
|
|
38
|
+
horizontal?: FloorplanServerPosition[];
|
|
39
|
+
}
|
|
40
|
+
export interface FloorplanServerRoomItem {
|
|
41
|
+
id: string;
|
|
42
|
+
size: number;
|
|
43
|
+
name: string;
|
|
44
|
+
customized_name?: string;
|
|
45
|
+
path: FloorplanServerPosition[];
|
|
46
|
+
room_type: string;
|
|
47
|
+
floor_type: number;
|
|
48
|
+
room_label: FloorplanServerRoomLabelItem;
|
|
49
|
+
observer_indexs: number[];
|
|
50
|
+
dimension?: FloorplanServerDimension;
|
|
51
|
+
}
|
|
52
|
+
export interface FloorplanServerRuleLabels {
|
|
53
|
+
top: FloorplanServerPosition[][];
|
|
54
|
+
right: FloorplanServerPosition[][];
|
|
55
|
+
bottom: FloorplanServerPosition[][];
|
|
56
|
+
left: FloorplanServerPosition[][];
|
|
57
|
+
}
|
|
58
|
+
export interface FloorplanServerFloorData {
|
|
59
|
+
floor_name: string;
|
|
60
|
+
floor_index: number;
|
|
61
|
+
rooms: FloorplanServerRoomItem[];
|
|
62
|
+
rules: FloorplanServerRuleLabels;
|
|
63
|
+
is_has_wall: boolean;
|
|
64
|
+
}
|
|
65
|
+
export interface FloorplanServerObserver {
|
|
66
|
+
floor_index: number;
|
|
67
|
+
position_in_image: FloorplanServerImagePosition;
|
|
68
|
+
}
|
|
69
|
+
export interface FloorplanServerComputedData {
|
|
70
|
+
floor_datas: FloorplanServerFloorData[];
|
|
71
|
+
entrance: FloorplanServerEntrance | null;
|
|
72
|
+
bounding: FloorplanServerBounding;
|
|
73
|
+
observers: FloorplanServerObserver[];
|
|
74
|
+
}
|
|
75
|
+
export interface FloorplanServerData {
|
|
76
|
+
outlines: FloorplanServerOutlineItem[];
|
|
77
|
+
computed_data: FloorplanServerComputedData;
|
|
78
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Five } from '@realsee/five-webgpu';
|
|
2
|
+
/**
|
|
3
|
+
* 通过 CSS opacity 让 five 渲染画布(及标记了 data-infive="1" 的兄弟 DOM)淡入 / 淡出
|
|
4
|
+
* @description 只改 DOM 透明度,不修改模型材质,代价小、可随时中断
|
|
5
|
+
*/
|
|
6
|
+
export declare function changeModelCanvasOpacity(five: Five, opacity: number, duration?: number): void;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Five } from '@realsee/five-webgpu';
|
|
2
|
+
import { type ShowState } from '../typing';
|
|
3
|
+
/** 展示户型图所需的相机默认 fov */
|
|
4
|
+
export declare const FIVE_CAMERA_DEFAULT_FOV = 80;
|
|
5
|
+
/**
|
|
6
|
+
* 把当前 five 相机 / 模式状态纠正为展示户型图所需的目标状态
|
|
7
|
+
* @description
|
|
8
|
+
* - 模式不一致:调用 five.changeMode 切换模式(同时切到目标 pose)
|
|
9
|
+
* - 模式一致但相机状态不一致:调用 five.updateCamera 纠正相机
|
|
10
|
+
*/
|
|
11
|
+
export declare function correctFiveState(five: Five, showState: ShowState, userAction?: boolean): Promise<void>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare function isShallowEqual(value: unknown, other: unknown): boolean;
|
|
2
|
+
export declare function isDeepEqual(value: unknown, other: unknown): boolean;
|
|
3
|
+
/**
|
|
4
|
+
* 比较两个值是否相等
|
|
5
|
+
* @param opt.deep - 是否深比较,默认 false(浅比较)
|
|
6
|
+
*/
|
|
7
|
+
export declare function equal(value: unknown, other: unknown, opt?: {
|
|
8
|
+
deep?: boolean;
|
|
9
|
+
}): boolean;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 排除指定属性名数组,返回剩余属性组成的新对象
|
|
3
|
+
*/
|
|
4
|
+
export declare function omit<T extends object, K extends keyof T>(object: T, props: K[]): Omit<T, K>;
|
|
5
|
+
/**
|
|
6
|
+
* 只保留指定属性名数组,返回剩余属性组成的新对象
|
|
7
|
+
*/
|
|
8
|
+
export declare function pick<T extends object, K extends keyof T>(object: T, props: K[]): Pick<T, K>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Five } from '@realsee/five-webgpu';
|
|
2
|
+
/** 取「当前 work」对应的 model(多 work/model 场景下按 workCode 匹配,找不到则回退到 five.model) */
|
|
3
|
+
export declare function getFiveModel(five: Five): import("@realsee/five-webgpu").Model;
|
|
4
|
+
export declare function fiveModelIsLoaded(five: Five): boolean;
|
|
5
|
+
/** 等待「当前 work」对应的 model 加载完成 */
|
|
6
|
+
export declare function waitFiveModelLoaded(five: Five): Promise<void>;
|