@realsee/dnalogel 2.0.0-alpha.28-beta → 2.0.0-alpha.28

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.
Files changed (87) hide show
  1. package/dist/floorplan/index.d.ts +6 -0
  2. package/dist/index.d.ts +2 -4
  3. package/dist/index.es.js +112 -1
  4. package/dist/index.js +115 -0
  5. package/dist/index.umd.js +118 -4
  6. package/docs/assets/search.js +1 -1
  7. package/docs/classes/ModelRoomLabelController.html +2 -5
  8. package/docs/classes/PanoFloorplanRadarPluginController.html +2 -2
  9. package/docs/enums/CameraMovementEffect.html +2 -2
  10. package/docs/enums/DIRECTION.html +1 -1
  11. package/docs/enums/DISPLAY_STRATEGY_TYPE.html +1 -1
  12. package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +1 -1
  13. package/docs/enums/ModelFloorplanErrorType.html +1 -1
  14. package/docs/enums/Rotation.html +2 -2
  15. package/docs/index.html +2 -2
  16. package/docs/interfaces/CSS3DRenderPluginExportType.html +2 -2
  17. package/docs/interfaces/CameraMovementPluginExportType.html +2 -2
  18. package/docs/interfaces/FloorplanBounding.html +10 -0
  19. package/docs/interfaces/FloorplanData.html +3 -0
  20. package/docs/interfaces/FloorplanEntrance.html +15 -0
  21. package/docs/interfaces/FloorplanExtraObject.html +7 -0
  22. package/docs/interfaces/FloorplanExtraObject3D.html +3 -0
  23. package/docs/interfaces/FloorplanFloorData.html +3 -0
  24. package/docs/interfaces/FloorplanImagePosition.html +3 -0
  25. package/docs/interfaces/FloorplanObserver.html +5 -0
  26. package/docs/interfaces/FloorplanOutlineItem.html +3 -0
  27. package/docs/interfaces/FloorplanPosition.html +3 -0
  28. package/docs/interfaces/FloorplanRoomItem.html +17 -0
  29. package/docs/interfaces/FloorplanRoomLabelItem.html +7 -0
  30. package/docs/interfaces/FloorplanServerBounding.html +10 -0
  31. package/docs/interfaces/FloorplanServerComputedData.html +1 -0
  32. package/docs/interfaces/FloorplanServerData.html +3 -0
  33. package/docs/interfaces/FloorplanServerEntrance.html +15 -0
  34. package/docs/interfaces/FloorplanServerFloorData.html +3 -0
  35. package/docs/interfaces/FloorplanServerImagePosition.html +3 -0
  36. package/docs/interfaces/FloorplanServerObserver.html +5 -0
  37. package/docs/interfaces/FloorplanServerOutlineItem.html +3 -0
  38. package/docs/interfaces/FloorplanServerPosition.html +3 -0
  39. package/docs/interfaces/FloorplanServerRoomItem.html +20 -0
  40. package/docs/interfaces/FloorplanServerRoomLabelItem.html +7 -0
  41. package/docs/interfaces/LineJson.html +1 -1
  42. package/docs/interfaces/ModelChassisCompassPluginData.html +1 -1
  43. package/docs/interfaces/ModelChassisCompassPluginExportType.html +1 -1
  44. package/docs/interfaces/ModelChassisCompassPluginParameterType.html +1 -1
  45. package/docs/interfaces/ModelEntryDoorGuidePluginData.html +1 -1
  46. package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +1 -1
  47. package/docs/interfaces/ModelFloorplanParameterType.html +1 -1
  48. package/docs/interfaces/ModelFloorplanViewEvent.html +2 -2
  49. package/docs/interfaces/ModelItemLabelPluginData.html +1 -1
  50. package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +1 -1
  51. package/docs/interfaces/ModelItemLabelPluginParametersType.html +1 -1
  52. package/docs/interfaces/ModelRoomLabelPluginData.html +1 -1
  53. package/docs/interfaces/ModelTVVideoPluginData.html +1 -1
  54. package/docs/interfaces/ModelTVVideoPluginExportType.html +1 -1
  55. package/docs/interfaces/ModelTVVideoPluginParameterType.html +1 -1
  56. package/docs/interfaces/ModelViewPluginExportType.html +1 -1
  57. package/docs/interfaces/PanoCompassPluginData.html +1 -1
  58. package/docs/interfaces/PanoCompassPluginParameterType.html +1 -1
  59. package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +2 -2
  60. package/docs/interfaces/PanoCursorRaycasterPluginParameterType.html +1 -1
  61. package/docs/interfaces/PanoFloorplanRadarPluginControllerParameter.html +1 -1
  62. package/docs/interfaces/PanoRulerPluginExportType.html +1 -1
  63. package/docs/interfaces/PanoRulerPluginOptions.html +1 -1
  64. package/docs/interfaces/PanoRulerPluginParameterType.html +1 -1
  65. package/docs/interfaces/PanoSpatialTagPluginContentEvent.html +1 -1
  66. package/docs/interfaces/PanoSpatialTagPluginContentReplacement.html +1 -1
  67. package/docs/interfaces/PanoSpatialTagPluginData.html +1 -1
  68. package/docs/interfaces/PanoSpatialTagPluginDataElement.html +1 -1
  69. package/docs/interfaces/PanoSpatialTagPluginExportType.html +1 -1
  70. package/docs/interfaces/PanoSpatialTagPluginOriginElement.html +1 -1
  71. package/docs/interfaces/PanoSpatialTagPluginParameterType.html +1 -1
  72. package/docs/interfaces/PanoSpatialTagPluginPointElement.html +1 -1
  73. package/docs/interfaces/PanoSpatialTagPluginTagElement.html +1 -1
  74. package/docs/interfaces/Point.html +1 -1
  75. package/docs/interfaces/PointJson.html +1 -1
  76. package/docs/interfaces/Room.html +1 -1
  77. package/docs/interfaces/RoomInfo.html +1 -1
  78. package/docs/interfaces/RoomLabel.html +2 -2
  79. package/docs/interfaces/RoomRules.html +1 -1
  80. package/docs/interfaces/Rooms.html +1 -1
  81. package/docs/interfaces/TopviewFloorplanPluginParameterType.html +3 -3
  82. package/docs/modules.html +11 -3
  83. package/libs/floorplan/index.d.ts +6 -0
  84. package/libs/floorplan/index.js +7 -0
  85. package/libs/index.d.ts +2 -4
  86. package/libs/index.js +3 -4
  87. package/package.json +1 -1
@@ -0,0 +1,6 @@
1
+ export * from './constant';
2
+ export * from './TopviewFloorplanPlugin';
3
+ export * from './PanoFloorplanRadarPlugin';
4
+ export * from './ModelFloorplanPlugin';
5
+ export * from './typings/floorplanServerData';
6
+ export * from './typings/floorplanData';
package/dist/index.d.ts CHANGED
@@ -1,11 +1,9 @@
1
+ export * from './shared-utils/five/useFivePlugin';
1
2
  export * from './ModelViewPlugin';
2
3
  export * from './CSS3DRenderPlugin';
3
4
  export * from './PanoCursorRaycasterPlugin';
4
5
  export * from './ModelRoomLabelPlugin';
5
- export * from './floorplan/constant';
6
- export * from './floorplan/TopviewFloorplanPlugin';
7
- export * from './floorplan/PanoFloorplanRadarPlugin';
8
- export * from './floorplan/ModelFloorplanPlugin';
6
+ export * from './floorplan';
9
7
  export * from './ModelChassisCompassPlugin';
10
8
  export * from './ModelEntryDoorGuidePlugin';
11
9
  export * from './CameraMovementPlugin';
package/dist/index.es.js CHANGED
@@ -1,3 +1,4 @@
1
+ import { unsafe__useFiveInstance } from '@realsee/five/react';
1
2
  import * as THREE from 'three';
2
3
  import { Vector3, Scene, Group, Raycaster, MeshBasicMaterial, CanvasTexture, AnimationMixer, Vector2, Color, TextureLoader, PlaneGeometry, sRGBEncoding, Mesh, CurvePath, LineCurve3, TubeGeometry, DoubleSide, SphereGeometry } from 'three';
3
4
  import { CSS3DRenderer, CSS3DObject } from 'three/examples/jsm/renderers/CSS3DRenderer';
@@ -13,6 +14,14 @@ import TWEEN__default from '@tweenjs/tween.js';
13
14
  import { writable } from 'svelte/store';
14
15
  import classNames from 'classnames';
15
16
 
17
+ function useFivePlugin(name) {
18
+ const five = unsafe__useFiveInstance();
19
+ const plugin = five.plugins[name];
20
+ if (!plugin)
21
+ throw new Error(`can not find plugin "${name}"`);
22
+ return plugin;
23
+ }
24
+
16
25
  /**
17
26
  * Five 模型插件
18
27
  * @template ExportType 导出方法
@@ -6329,6 +6338,108 @@ const ModelFloorplanPlugin = (five, params) => {
6329
6338
  return new ModelFloorplanPluginController(five, params);
6330
6339
  };
6331
6340
 
6341
+ /** 房屋数据映射表 */
6342
+ const ROOM_FETILE_TYPE_MAP = [
6343
+ { type: 0, floorType: 1, roomType: '100900000012', name: '其他' },
6344
+ { type: 1, floorType: 1, roomType: '100900000002', name: '客厅' },
6345
+ { type: 2, floorType: 1, roomType: '100900000002', name: '餐厅' },
6346
+ { type: 3, floorType: 0, roomType: '100900000001', name: '卧室' },
6347
+ { type: 4, floorType: 0, roomType: '100900000001', name: '书房' },
6348
+ { type: 5, floorType: 3, roomType: '100900000004', name: '卫生间' },
6349
+ { type: 6, floorType: 3, roomType: '100900000004', name: '淋浴间' },
6350
+ { type: 7, floorType: 3, roomType: '100900000004', name: '洗手间' },
6351
+ { type: 8, floorType: 3, roomType: '100900000003', name: '厨房' },
6352
+ {
6353
+ type: 9,
6354
+ floorType: 1,
6355
+ roomType: '100900000003',
6356
+ name: '开放厨房',
6357
+ onlySubArea: true,
6358
+ },
6359
+ { type: 10, floorType: 0, roomType: '100900000001', name: '多功能间' },
6360
+ { type: 11, floorType: 0, roomType: '100900000009', name: '保姆间' },
6361
+ { type: 12, floorType: 4, roomType: '100900000005', name: '阳台' },
6362
+ { type: 13, floorType: 4, roomType: '100900000006', name: '露台' },
6363
+ { type: 14, floorType: 0, roomType: '100900000008', name: '储物间' },
6364
+ { type: 15, floorType: 0, roomType: '100900000013', name: '衣帽间' },
6365
+ { type: 16, floorType: 0, roomType: '100900000011', name: '阁楼' },
6366
+ { type: 17, floorType: 2, roomType: '100900000007', name: '花园' },
6367
+ { type: 18, floorType: 5, roomType: '100900000010', name: '车库' },
6368
+ { type: 19, floorType: 1, roomType: '100900000012', name: '电梯' },
6369
+ { type: 20, floorType: 1, roomType: '100900000012', name: '地下室' },
6370
+ { type: 21, floorType: 1, roomType: '100900000012', name: '天井' },
6371
+ { type: 22, floorType: 1, roomType: '100900000012', name: '阳光房' },
6372
+ { type: 23, floorType: 1, roomType: '100900000012', name: '过道' },
6373
+ { type: 24, floorType: 1, roomType: '100900000012', name: '楼梯间' },
6374
+ { type: 25, floorType: 1, roomType: '100900000012', name: '门厅' },
6375
+ { type: 26, floorType: 2, roomType: '100900000012', name: '入户花园' },
6376
+ { type: 27, floorType: 1, roomType: '100900000012', name: '玄关' },
6377
+ { type: 28, floorType: 1, roomType: '100900000012', name: '挑空' },
6378
+ { type: 29, floorType: 4, roomType: '100900000012', name: '晾晒区' },
6379
+ { type: 30, floorType: 4, roomType: '100900000012', name: '洗衣房' },
6380
+ { type: 31, floorType: 0, roomType: '100900000012', name: '娱乐区' },
6381
+ { type: 32, floorType: 0, roomType: '100900000012', name: '健身区' },
6382
+ { type: 33, floorType: 0, roomType: '100900000012', name: '接待区' },
6383
+ { type: 34, floorType: 0, roomType: '100900000012', name: '影音区' },
6384
+ { type: 35, floorType: 1, roomType: '100900000012', name: '餐饮区' },
6385
+ {
6386
+ type: 36,
6387
+ floorType: 1,
6388
+ roomType: '100900000012',
6389
+ name: '其他',
6390
+ onlySubArea: true,
6391
+ },
6392
+ { type: 37, floorType: 1, roomType: '100900000002', name: '起居室' },
6393
+ { type: 38, floorType: 0, roomType: '100900000001', name: '主卧' },
6394
+ { type: 39, floorType: 0, roomType: '100900000001', name: '次卧' },
6395
+ { type: 40, floorType: 0, roomType: '100900000001', name: '优化间' },
6396
+ { type: 41, floorType: 0, roomType: '100900000001', name: '办公室' },
6397
+ { type: 42, floorType: 0, roomType: '100900000001', name: '会议室' },
6398
+ { type: 43, floorType: 0, roomType: '100900000001', name: '洽谈间' },
6399
+ { type: 44, floorType: 1, roomType: '100900000002', name: '共享大厅' },
6400
+ { type: 45, floorType: 1, roomType: '100900000012', name: '水吧' },
6401
+ { type: 46, floorType: 0, roomType: '100900000015', name: '出入口' },
6402
+ { type: 47, floorType: 0, roomType: '100900000015', name: '大厅' },
6403
+ { type: 48, floorType: 0, roomType: '100900000015', name: '包厢' },
6404
+ { type: 49, floorType: 0, roomType: '100900000015', name: '其他' },
6405
+ { type: 50, floorType: 0, roomType: '100900000016', name: '出入口' },
6406
+ { type: 51, floorType: 0, roomType: '100900000016', name: '办公区' },
6407
+ { type: 52, floorType: 0, roomType: '100900000016', name: '老板间' },
6408
+ { type: 53, floorType: 0, roomType: '100900000016', name: '会议室' },
6409
+ { type: 54, floorType: 0, roomType: '100900000016', name: '休息区/水吧' },
6410
+ { type: 55, floorType: 0, roomType: '100900000016', name: '其他' },
6411
+ { type: 56, floorType: 2, roomType: '100900000012', name: '空中花园' },
6412
+ { type: 57, floorType: 0, roomType: '100900000001', name: '洋室' },
6413
+ { type: 58, floorType: 0, roomType: '100900000001', name: '和室' },
6414
+ ];
6415
+ /** 地板信息映射表 */
6416
+ const FLOOR_TYPE_MAP = [
6417
+ { type: 0, description: '木质地板' },
6418
+ { type: 1, description: '瓷砖地面' },
6419
+ { type: 2, description: '户外地面' },
6420
+ { type: 3, description: '卫生间地面' },
6421
+ { type: 4, description: '阳台地面' },
6422
+ { type: 5, description: '车库地面' },
6423
+ ];
6424
+ /** 房屋类型映射表 */
6425
+ const ROOM_TYPE_MAP = [
6426
+ { roomType: '100900000001', description: '室' },
6427
+ { roomType: '100900000002', description: '厅' },
6428
+ { roomType: '100900000003', description: '厨' },
6429
+ { roomType: '100900000004', description: '卫' },
6430
+ { roomType: '100900000005', description: '阳台' },
6431
+ { roomType: '100900000006', description: '露台' },
6432
+ { roomType: '100900000007', description: '花园' },
6433
+ { roomType: '100900000008', description: '储' },
6434
+ { roomType: '100900000009', description: '保姆间' },
6435
+ { roomType: '100900000010', description: '车库' },
6436
+ { roomType: '100900000011', description: '阁楼' },
6437
+ { roomType: '100900000012', description: '其他' },
6438
+ { roomType: '100900000013', description: '衣' },
6439
+ { roomType: '100900000015', description: '商铺' },
6440
+ { roomType: '100900000016', description: '写字楼' },
6441
+ ];
6442
+
6332
6443
  const genRotationMatrix = (x, y, z) => {
6333
6444
  const matrix = new THREE.Matrix4();
6334
6445
  const euler = new THREE.Euler(x, y, z, 'YXZ');
@@ -15195,4 +15306,4 @@ const ModelTVVideoPlugin = (five, { videoElement }) => {
15195
15306
  return { enable, disable, load, dispose };
15196
15307
  };
15197
15308
 
15198
- export { CSS3DRenderPlugin, CameraMovementEffect, CameraMovementPlugin, DIRECTION, DISPLAY_STRATEGY_TYPE, FLOOR_PLAN_ATTACHED_TO, ModelChassisCompassPlugin, ModelEntryDoorGuidePlugin, ModelFloorplanPlugin, ModelItemLabelPlugin, ModelRoomLabelPlugin, ModelTVVideoPlugin, ModelViewPlugin, PanoCompassPlugin, PanoCursorRaycasterPlugin, PanoFloorplanRadarPlugin, PanoMeasurePlugin, PanoRulerPlugin, PanoSpatialTagPlugin, Rotation, TopviewFloorplanPlugin, modelItemLabelPluginServerParams, modelRoomLabelPluginServerParams, panoCompassPluginServerParams };
15309
+ export { CSS3DRenderPlugin, CameraMovementEffect, CameraMovementPlugin, DIRECTION, DISPLAY_STRATEGY_TYPE, FLOOR_PLAN_ATTACHED_TO, FLOOR_TYPE_MAP, ModelChassisCompassPlugin, ModelEntryDoorGuidePlugin, ModelFloorplanPlugin, ModelItemLabelPlugin, ModelRoomLabelPlugin, ModelTVVideoPlugin, ModelViewPlugin, PanoCompassPlugin, PanoCursorRaycasterPlugin, PanoFloorplanRadarPlugin, PanoMeasurePlugin, PanoRulerPlugin, PanoSpatialTagPlugin, ROOM_FETILE_TYPE_MAP, ROOM_TYPE_MAP, Rotation, TopviewFloorplanPlugin, modelItemLabelPluginServerParams, modelRoomLabelPluginServerParams, panoCompassPluginServerParams, useFivePlugin };
package/dist/index.js CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
+ var react = require('@realsee/five/react');
5
6
  var THREE = require('three');
6
7
  var CSS3DRenderer = require('three/examples/jsm/renderers/CSS3DRenderer');
7
8
  var line = require('@realsee/five/line');
@@ -40,6 +41,14 @@ var TWEEN__namespace = /*#__PURE__*/_interopNamespace(TWEEN);
40
41
  var TWEEN__default = /*#__PURE__*/_interopDefaultLegacy(TWEEN);
41
42
  var classNames__default = /*#__PURE__*/_interopDefaultLegacy(classNames);
42
43
 
44
+ function useFivePlugin(name) {
45
+ const five = react.unsafe__useFiveInstance();
46
+ const plugin = five.plugins[name];
47
+ if (!plugin)
48
+ throw new Error(`can not find plugin "${name}"`);
49
+ return plugin;
50
+ }
51
+
43
52
  /**
44
53
  * Five 模型插件
45
54
  * @template ExportType 导出方法
@@ -6356,6 +6365,108 @@ const ModelFloorplanPlugin = (five, params) => {
6356
6365
  return new ModelFloorplanPluginController(five, params);
6357
6366
  };
6358
6367
 
6368
+ /** 房屋数据映射表 */
6369
+ const ROOM_FETILE_TYPE_MAP = [
6370
+ { type: 0, floorType: 1, roomType: '100900000012', name: '其他' },
6371
+ { type: 1, floorType: 1, roomType: '100900000002', name: '客厅' },
6372
+ { type: 2, floorType: 1, roomType: '100900000002', name: '餐厅' },
6373
+ { type: 3, floorType: 0, roomType: '100900000001', name: '卧室' },
6374
+ { type: 4, floorType: 0, roomType: '100900000001', name: '书房' },
6375
+ { type: 5, floorType: 3, roomType: '100900000004', name: '卫生间' },
6376
+ { type: 6, floorType: 3, roomType: '100900000004', name: '淋浴间' },
6377
+ { type: 7, floorType: 3, roomType: '100900000004', name: '洗手间' },
6378
+ { type: 8, floorType: 3, roomType: '100900000003', name: '厨房' },
6379
+ {
6380
+ type: 9,
6381
+ floorType: 1,
6382
+ roomType: '100900000003',
6383
+ name: '开放厨房',
6384
+ onlySubArea: true,
6385
+ },
6386
+ { type: 10, floorType: 0, roomType: '100900000001', name: '多功能间' },
6387
+ { type: 11, floorType: 0, roomType: '100900000009', name: '保姆间' },
6388
+ { type: 12, floorType: 4, roomType: '100900000005', name: '阳台' },
6389
+ { type: 13, floorType: 4, roomType: '100900000006', name: '露台' },
6390
+ { type: 14, floorType: 0, roomType: '100900000008', name: '储物间' },
6391
+ { type: 15, floorType: 0, roomType: '100900000013', name: '衣帽间' },
6392
+ { type: 16, floorType: 0, roomType: '100900000011', name: '阁楼' },
6393
+ { type: 17, floorType: 2, roomType: '100900000007', name: '花园' },
6394
+ { type: 18, floorType: 5, roomType: '100900000010', name: '车库' },
6395
+ { type: 19, floorType: 1, roomType: '100900000012', name: '电梯' },
6396
+ { type: 20, floorType: 1, roomType: '100900000012', name: '地下室' },
6397
+ { type: 21, floorType: 1, roomType: '100900000012', name: '天井' },
6398
+ { type: 22, floorType: 1, roomType: '100900000012', name: '阳光房' },
6399
+ { type: 23, floorType: 1, roomType: '100900000012', name: '过道' },
6400
+ { type: 24, floorType: 1, roomType: '100900000012', name: '楼梯间' },
6401
+ { type: 25, floorType: 1, roomType: '100900000012', name: '门厅' },
6402
+ { type: 26, floorType: 2, roomType: '100900000012', name: '入户花园' },
6403
+ { type: 27, floorType: 1, roomType: '100900000012', name: '玄关' },
6404
+ { type: 28, floorType: 1, roomType: '100900000012', name: '挑空' },
6405
+ { type: 29, floorType: 4, roomType: '100900000012', name: '晾晒区' },
6406
+ { type: 30, floorType: 4, roomType: '100900000012', name: '洗衣房' },
6407
+ { type: 31, floorType: 0, roomType: '100900000012', name: '娱乐区' },
6408
+ { type: 32, floorType: 0, roomType: '100900000012', name: '健身区' },
6409
+ { type: 33, floorType: 0, roomType: '100900000012', name: '接待区' },
6410
+ { type: 34, floorType: 0, roomType: '100900000012', name: '影音区' },
6411
+ { type: 35, floorType: 1, roomType: '100900000012', name: '餐饮区' },
6412
+ {
6413
+ type: 36,
6414
+ floorType: 1,
6415
+ roomType: '100900000012',
6416
+ name: '其他',
6417
+ onlySubArea: true,
6418
+ },
6419
+ { type: 37, floorType: 1, roomType: '100900000002', name: '起居室' },
6420
+ { type: 38, floorType: 0, roomType: '100900000001', name: '主卧' },
6421
+ { type: 39, floorType: 0, roomType: '100900000001', name: '次卧' },
6422
+ { type: 40, floorType: 0, roomType: '100900000001', name: '优化间' },
6423
+ { type: 41, floorType: 0, roomType: '100900000001', name: '办公室' },
6424
+ { type: 42, floorType: 0, roomType: '100900000001', name: '会议室' },
6425
+ { type: 43, floorType: 0, roomType: '100900000001', name: '洽谈间' },
6426
+ { type: 44, floorType: 1, roomType: '100900000002', name: '共享大厅' },
6427
+ { type: 45, floorType: 1, roomType: '100900000012', name: '水吧' },
6428
+ { type: 46, floorType: 0, roomType: '100900000015', name: '出入口' },
6429
+ { type: 47, floorType: 0, roomType: '100900000015', name: '大厅' },
6430
+ { type: 48, floorType: 0, roomType: '100900000015', name: '包厢' },
6431
+ { type: 49, floorType: 0, roomType: '100900000015', name: '其他' },
6432
+ { type: 50, floorType: 0, roomType: '100900000016', name: '出入口' },
6433
+ { type: 51, floorType: 0, roomType: '100900000016', name: '办公区' },
6434
+ { type: 52, floorType: 0, roomType: '100900000016', name: '老板间' },
6435
+ { type: 53, floorType: 0, roomType: '100900000016', name: '会议室' },
6436
+ { type: 54, floorType: 0, roomType: '100900000016', name: '休息区/水吧' },
6437
+ { type: 55, floorType: 0, roomType: '100900000016', name: '其他' },
6438
+ { type: 56, floorType: 2, roomType: '100900000012', name: '空中花园' },
6439
+ { type: 57, floorType: 0, roomType: '100900000001', name: '洋室' },
6440
+ { type: 58, floorType: 0, roomType: '100900000001', name: '和室' },
6441
+ ];
6442
+ /** 地板信息映射表 */
6443
+ const FLOOR_TYPE_MAP = [
6444
+ { type: 0, description: '木质地板' },
6445
+ { type: 1, description: '瓷砖地面' },
6446
+ { type: 2, description: '户外地面' },
6447
+ { type: 3, description: '卫生间地面' },
6448
+ { type: 4, description: '阳台地面' },
6449
+ { type: 5, description: '车库地面' },
6450
+ ];
6451
+ /** 房屋类型映射表 */
6452
+ const ROOM_TYPE_MAP = [
6453
+ { roomType: '100900000001', description: '室' },
6454
+ { roomType: '100900000002', description: '厅' },
6455
+ { roomType: '100900000003', description: '厨' },
6456
+ { roomType: '100900000004', description: '卫' },
6457
+ { roomType: '100900000005', description: '阳台' },
6458
+ { roomType: '100900000006', description: '露台' },
6459
+ { roomType: '100900000007', description: '花园' },
6460
+ { roomType: '100900000008', description: '储' },
6461
+ { roomType: '100900000009', description: '保姆间' },
6462
+ { roomType: '100900000010', description: '车库' },
6463
+ { roomType: '100900000011', description: '阁楼' },
6464
+ { roomType: '100900000012', description: '其他' },
6465
+ { roomType: '100900000013', description: '衣' },
6466
+ { roomType: '100900000015', description: '商铺' },
6467
+ { roomType: '100900000016', description: '写字楼' },
6468
+ ];
6469
+
6359
6470
  const genRotationMatrix = (x, y, z) => {
6360
6471
  const matrix = new THREE__namespace.Matrix4();
6361
6472
  const euler = new THREE__namespace.Euler(x, y, z, 'YXZ');
@@ -15224,6 +15335,7 @@ const ModelTVVideoPlugin = (five, { videoElement }) => {
15224
15335
 
15225
15336
  exports.CSS3DRenderPlugin = CSS3DRenderPlugin;
15226
15337
  exports.CameraMovementPlugin = CameraMovementPlugin;
15338
+ exports.FLOOR_TYPE_MAP = FLOOR_TYPE_MAP;
15227
15339
  exports.ModelChassisCompassPlugin = ModelChassisCompassPlugin;
15228
15340
  exports.ModelEntryDoorGuidePlugin = ModelEntryDoorGuidePlugin;
15229
15341
  exports.ModelFloorplanPlugin = ModelFloorplanPlugin;
@@ -15237,7 +15349,10 @@ exports.PanoFloorplanRadarPlugin = PanoFloorplanRadarPlugin;
15237
15349
  exports.PanoMeasurePlugin = PanoMeasurePlugin;
15238
15350
  exports.PanoRulerPlugin = PanoRulerPlugin;
15239
15351
  exports.PanoSpatialTagPlugin = PanoSpatialTagPlugin;
15352
+ exports.ROOM_FETILE_TYPE_MAP = ROOM_FETILE_TYPE_MAP;
15353
+ exports.ROOM_TYPE_MAP = ROOM_TYPE_MAP;
15240
15354
  exports.TopviewFloorplanPlugin = TopviewFloorplanPlugin;
15241
15355
  exports.modelItemLabelPluginServerParams = modelItemLabelPluginServerParams;
15242
15356
  exports.modelRoomLabelPluginServerParams = modelRoomLabelPluginServerParams;
15243
15357
  exports.panoCompassPluginServerParams = panoCompassPluginServerParams;
15358
+ exports.useFivePlugin = useFivePlugin;
package/dist/index.umd.js CHANGED
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('three'), require('three/examples/jsm/renderers/CSS3DRenderer'), require('@realsee/five/line'), require('svelte/internal'), require('svelte'), require('svelte/easing'), require('svelte/transition'), require('@realsee/five'), require('three/examples/jsm/loaders/FBXLoader'), require('@tweenjs/tween.js'), require('svelte/store'), require('classnames')) :
3
- typeof define === 'function' && define.amd ? define(['exports', 'three', 'three/examples/jsm/renderers/CSS3DRenderer', '@realsee/five/line', 'svelte/internal', 'svelte', 'svelte/easing', 'svelte/transition', '@realsee/five', 'three/examples/jsm/loaders/FBXLoader', '@tweenjs/tween.js', 'svelte/store', 'classnames'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.dnalogel = {}, global.THREE, global.CSS3DRenderer, global.FiveSDK_Line, global.internal, global.svelte, global.easing, global.transition, global.five, global.FBXLoader, global.TWEEN, global.store, global.classNames));
5
- })(this, (function (exports, THREE, CSS3DRenderer, line, internal, svelte, easing, transition, five, FBXLoader, TWEEN, store, classNames) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@realsee/five/react'), require('three'), require('three/examples/jsm/renderers/CSS3DRenderer'), require('@realsee/five/line'), require('svelte/internal'), require('svelte'), require('svelte/easing'), require('svelte/transition'), require('@realsee/five'), require('three/examples/jsm/loaders/FBXLoader'), require('@tweenjs/tween.js'), require('svelte/store'), require('classnames')) :
3
+ typeof define === 'function' && define.amd ? define(['exports', '@realsee/five/react', 'three', 'three/examples/jsm/renderers/CSS3DRenderer', '@realsee/five/line', 'svelte/internal', 'svelte', 'svelte/easing', 'svelte/transition', '@realsee/five', 'three/examples/jsm/loaders/FBXLoader', '@tweenjs/tween.js', 'svelte/store', 'classnames'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.dnalogel = {}, global.react, global.THREE, global.CSS3DRenderer, global.FiveSDK_Line, global.internal, global.svelte, global.easing, global.transition, global.five, global.FBXLoader, global.TWEEN, global.store, global.classNames));
5
+ })(this, (function (exports, react, THREE, CSS3DRenderer, line, internal, svelte, easing, transition, five, FBXLoader, TWEEN, store, classNames) { 'use strict';
6
6
 
7
7
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
8
 
@@ -29,6 +29,14 @@
29
29
  var TWEEN__default = /*#__PURE__*/_interopDefaultLegacy(TWEEN);
30
30
  var classNames__default = /*#__PURE__*/_interopDefaultLegacy(classNames);
31
31
 
32
+ function useFivePlugin(name) {
33
+ const five = react.unsafe__useFiveInstance();
34
+ const plugin = five.plugins[name];
35
+ if (!plugin)
36
+ throw new Error(`can not find plugin "${name}"`);
37
+ return plugin;
38
+ }
39
+
32
40
  /**
33
41
  * Five 模型插件
34
42
  * @template ExportType 导出方法
@@ -6345,6 +6353,108 @@
6345
6353
  return new ModelFloorplanPluginController(five, params);
6346
6354
  };
6347
6355
 
6356
+ /** 房屋数据映射表 */
6357
+ const ROOM_FETILE_TYPE_MAP = [
6358
+ { type: 0, floorType: 1, roomType: '100900000012', name: '其他' },
6359
+ { type: 1, floorType: 1, roomType: '100900000002', name: '客厅' },
6360
+ { type: 2, floorType: 1, roomType: '100900000002', name: '餐厅' },
6361
+ { type: 3, floorType: 0, roomType: '100900000001', name: '卧室' },
6362
+ { type: 4, floorType: 0, roomType: '100900000001', name: '书房' },
6363
+ { type: 5, floorType: 3, roomType: '100900000004', name: '卫生间' },
6364
+ { type: 6, floorType: 3, roomType: '100900000004', name: '淋浴间' },
6365
+ { type: 7, floorType: 3, roomType: '100900000004', name: '洗手间' },
6366
+ { type: 8, floorType: 3, roomType: '100900000003', name: '厨房' },
6367
+ {
6368
+ type: 9,
6369
+ floorType: 1,
6370
+ roomType: '100900000003',
6371
+ name: '开放厨房',
6372
+ onlySubArea: true,
6373
+ },
6374
+ { type: 10, floorType: 0, roomType: '100900000001', name: '多功能间' },
6375
+ { type: 11, floorType: 0, roomType: '100900000009', name: '保姆间' },
6376
+ { type: 12, floorType: 4, roomType: '100900000005', name: '阳台' },
6377
+ { type: 13, floorType: 4, roomType: '100900000006', name: '露台' },
6378
+ { type: 14, floorType: 0, roomType: '100900000008', name: '储物间' },
6379
+ { type: 15, floorType: 0, roomType: '100900000013', name: '衣帽间' },
6380
+ { type: 16, floorType: 0, roomType: '100900000011', name: '阁楼' },
6381
+ { type: 17, floorType: 2, roomType: '100900000007', name: '花园' },
6382
+ { type: 18, floorType: 5, roomType: '100900000010', name: '车库' },
6383
+ { type: 19, floorType: 1, roomType: '100900000012', name: '电梯' },
6384
+ { type: 20, floorType: 1, roomType: '100900000012', name: '地下室' },
6385
+ { type: 21, floorType: 1, roomType: '100900000012', name: '天井' },
6386
+ { type: 22, floorType: 1, roomType: '100900000012', name: '阳光房' },
6387
+ { type: 23, floorType: 1, roomType: '100900000012', name: '过道' },
6388
+ { type: 24, floorType: 1, roomType: '100900000012', name: '楼梯间' },
6389
+ { type: 25, floorType: 1, roomType: '100900000012', name: '门厅' },
6390
+ { type: 26, floorType: 2, roomType: '100900000012', name: '入户花园' },
6391
+ { type: 27, floorType: 1, roomType: '100900000012', name: '玄关' },
6392
+ { type: 28, floorType: 1, roomType: '100900000012', name: '挑空' },
6393
+ { type: 29, floorType: 4, roomType: '100900000012', name: '晾晒区' },
6394
+ { type: 30, floorType: 4, roomType: '100900000012', name: '洗衣房' },
6395
+ { type: 31, floorType: 0, roomType: '100900000012', name: '娱乐区' },
6396
+ { type: 32, floorType: 0, roomType: '100900000012', name: '健身区' },
6397
+ { type: 33, floorType: 0, roomType: '100900000012', name: '接待区' },
6398
+ { type: 34, floorType: 0, roomType: '100900000012', name: '影音区' },
6399
+ { type: 35, floorType: 1, roomType: '100900000012', name: '餐饮区' },
6400
+ {
6401
+ type: 36,
6402
+ floorType: 1,
6403
+ roomType: '100900000012',
6404
+ name: '其他',
6405
+ onlySubArea: true,
6406
+ },
6407
+ { type: 37, floorType: 1, roomType: '100900000002', name: '起居室' },
6408
+ { type: 38, floorType: 0, roomType: '100900000001', name: '主卧' },
6409
+ { type: 39, floorType: 0, roomType: '100900000001', name: '次卧' },
6410
+ { type: 40, floorType: 0, roomType: '100900000001', name: '优化间' },
6411
+ { type: 41, floorType: 0, roomType: '100900000001', name: '办公室' },
6412
+ { type: 42, floorType: 0, roomType: '100900000001', name: '会议室' },
6413
+ { type: 43, floorType: 0, roomType: '100900000001', name: '洽谈间' },
6414
+ { type: 44, floorType: 1, roomType: '100900000002', name: '共享大厅' },
6415
+ { type: 45, floorType: 1, roomType: '100900000012', name: '水吧' },
6416
+ { type: 46, floorType: 0, roomType: '100900000015', name: '出入口' },
6417
+ { type: 47, floorType: 0, roomType: '100900000015', name: '大厅' },
6418
+ { type: 48, floorType: 0, roomType: '100900000015', name: '包厢' },
6419
+ { type: 49, floorType: 0, roomType: '100900000015', name: '其他' },
6420
+ { type: 50, floorType: 0, roomType: '100900000016', name: '出入口' },
6421
+ { type: 51, floorType: 0, roomType: '100900000016', name: '办公区' },
6422
+ { type: 52, floorType: 0, roomType: '100900000016', name: '老板间' },
6423
+ { type: 53, floorType: 0, roomType: '100900000016', name: '会议室' },
6424
+ { type: 54, floorType: 0, roomType: '100900000016', name: '休息区/水吧' },
6425
+ { type: 55, floorType: 0, roomType: '100900000016', name: '其他' },
6426
+ { type: 56, floorType: 2, roomType: '100900000012', name: '空中花园' },
6427
+ { type: 57, floorType: 0, roomType: '100900000001', name: '洋室' },
6428
+ { type: 58, floorType: 0, roomType: '100900000001', name: '和室' },
6429
+ ];
6430
+ /** 地板信息映射表 */
6431
+ const FLOOR_TYPE_MAP = [
6432
+ { type: 0, description: '木质地板' },
6433
+ { type: 1, description: '瓷砖地面' },
6434
+ { type: 2, description: '户外地面' },
6435
+ { type: 3, description: '卫生间地面' },
6436
+ { type: 4, description: '阳台地面' },
6437
+ { type: 5, description: '车库地面' },
6438
+ ];
6439
+ /** 房屋类型映射表 */
6440
+ const ROOM_TYPE_MAP = [
6441
+ { roomType: '100900000001', description: '室' },
6442
+ { roomType: '100900000002', description: '厅' },
6443
+ { roomType: '100900000003', description: '厨' },
6444
+ { roomType: '100900000004', description: '卫' },
6445
+ { roomType: '100900000005', description: '阳台' },
6446
+ { roomType: '100900000006', description: '露台' },
6447
+ { roomType: '100900000007', description: '花园' },
6448
+ { roomType: '100900000008', description: '储' },
6449
+ { roomType: '100900000009', description: '保姆间' },
6450
+ { roomType: '100900000010', description: '车库' },
6451
+ { roomType: '100900000011', description: '阁楼' },
6452
+ { roomType: '100900000012', description: '其他' },
6453
+ { roomType: '100900000013', description: '衣' },
6454
+ { roomType: '100900000015', description: '商铺' },
6455
+ { roomType: '100900000016', description: '写字楼' },
6456
+ ];
6457
+
6348
6458
  const genRotationMatrix = (x, y, z) => {
6349
6459
  const matrix = new THREE__namespace.Matrix4();
6350
6460
  const euler = new THREE__namespace.Euler(x, y, z, 'YXZ');
@@ -15213,6 +15323,7 @@
15213
15323
 
15214
15324
  exports.CSS3DRenderPlugin = CSS3DRenderPlugin;
15215
15325
  exports.CameraMovementPlugin = CameraMovementPlugin;
15326
+ exports.FLOOR_TYPE_MAP = FLOOR_TYPE_MAP;
15216
15327
  exports.ModelChassisCompassPlugin = ModelChassisCompassPlugin;
15217
15328
  exports.ModelEntryDoorGuidePlugin = ModelEntryDoorGuidePlugin;
15218
15329
  exports.ModelFloorplanPlugin = ModelFloorplanPlugin;
@@ -15226,10 +15337,13 @@
15226
15337
  exports.PanoMeasurePlugin = PanoMeasurePlugin;
15227
15338
  exports.PanoRulerPlugin = PanoRulerPlugin;
15228
15339
  exports.PanoSpatialTagPlugin = PanoSpatialTagPlugin;
15340
+ exports.ROOM_FETILE_TYPE_MAP = ROOM_FETILE_TYPE_MAP;
15341
+ exports.ROOM_TYPE_MAP = ROOM_TYPE_MAP;
15229
15342
  exports.TopviewFloorplanPlugin = TopviewFloorplanPlugin;
15230
15343
  exports.modelItemLabelPluginServerParams = modelItemLabelPluginServerParams;
15231
15344
  exports.modelRoomLabelPluginServerParams = modelRoomLabelPluginServerParams;
15232
15345
  exports.panoCompassPluginServerParams = panoCompassPluginServerParams;
15346
+ exports.useFivePlugin = useFivePlugin;
15233
15347
 
15234
15348
  Object.defineProperty(exports, '__esModule', { value: true });
15235
15349