hart-estate-widget 0.0.69 → 0.0.72

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 (110) hide show
  1. package/README.md +30 -27
  2. package/build/widget.bundle.js +3 -0
  3. package/build/widget.bundle.js.LICENSE.txt +78 -0
  4. package/build/widget.bundle.js.map +1 -0
  5. package/build/widget.module.js +3 -0
  6. package/build/widget.module.js.LICENSE.txt +78 -0
  7. package/build/widget.module.js.map +1 -0
  8. package/package.json +22 -21
  9. package/build/assets/css/index.css +0 -2
  10. package/build/assets/fonts/RobotoMono/RobotoMono-Bold.ttf +0 -0
  11. package/build/assets/fonts/RobotoMono/RobotoMono-Bold.woff +0 -0
  12. package/build/assets/fonts/RobotoMono/RobotoMono-Bold.woff2 +0 -0
  13. package/build/assets/fonts/RobotoMono/RobotoMono-BoldItalic.ttf +0 -0
  14. package/build/assets/fonts/RobotoMono/RobotoMono-BoldItalic.woff +0 -0
  15. package/build/assets/fonts/RobotoMono/RobotoMono-BoldItalic.woff2 +0 -0
  16. package/build/assets/fonts/RobotoMono/RobotoMono-Italic.ttf +0 -0
  17. package/build/assets/fonts/RobotoMono/RobotoMono-Italic.woff +0 -0
  18. package/build/assets/fonts/RobotoMono/RobotoMono-Italic.woff2 +0 -0
  19. package/build/assets/fonts/RobotoMono/RobotoMono-Light.ttf +0 -0
  20. package/build/assets/fonts/RobotoMono/RobotoMono-Light.woff +0 -0
  21. package/build/assets/fonts/RobotoMono/RobotoMono-Light.woff2 +0 -0
  22. package/build/assets/fonts/RobotoMono/RobotoMono-LightItalic.ttf +0 -0
  23. package/build/assets/fonts/RobotoMono/RobotoMono-LightItalic.woff +0 -0
  24. package/build/assets/fonts/RobotoMono/RobotoMono-LightItalic.woff2 +0 -0
  25. package/build/assets/fonts/RobotoMono/RobotoMono-Medium.ttf +0 -0
  26. package/build/assets/fonts/RobotoMono/RobotoMono-Medium.woff +0 -0
  27. package/build/assets/fonts/RobotoMono/RobotoMono-Medium.woff2 +0 -0
  28. package/build/assets/fonts/RobotoMono/RobotoMono-MediumItalic.ttf +0 -0
  29. package/build/assets/fonts/RobotoMono/RobotoMono-MediumItalic.woff +0 -0
  30. package/build/assets/fonts/RobotoMono/RobotoMono-MediumItalic.woff2 +0 -0
  31. package/build/assets/fonts/RobotoMono/RobotoMono-Regular.ttf +0 -0
  32. package/build/assets/fonts/RobotoMono/RobotoMono-Regular.woff +0 -0
  33. package/build/assets/fonts/RobotoMono/RobotoMono-Regular.woff2 +0 -0
  34. package/build/assets/fonts/RobotoMono/RobotoMono-Thin.ttf +0 -0
  35. package/build/assets/fonts/RobotoMono/RobotoMono-Thin.woff +0 -0
  36. package/build/assets/fonts/RobotoMono/RobotoMono-Thin.woff2 +0 -0
  37. package/build/assets/fonts/RobotoMono/RobotoMono.css +0 -98
  38. package/build/assets/icons/1x.svg +0 -4
  39. package/build/assets/icons/2x.svg +0 -4
  40. package/build/assets/icons/arrow-left.svg +0 -4
  41. package/build/assets/icons/arrow-right.svg +0 -4
  42. package/build/assets/icons/bullet.png +0 -0
  43. package/build/assets/icons/close.svg +0 -4
  44. package/build/assets/icons/enter-fullscreen.svg +0 -6
  45. package/build/assets/icons/hand-move.svg +0 -15
  46. package/build/assets/icons/hand-research.svg +0 -12
  47. package/build/assets/icons/plan.svg +0 -5
  48. package/build/assets/icons/render.svg +0 -7
  49. package/build/assets/icons/rotation-close.svg +0 -6
  50. package/build/assets/icons/rotation.svg +0 -4
  51. package/build/assets/icons/surface.svg +0 -5
  52. package/build/assets/img/3D.jpg +0 -0
  53. package/build/assets/img/door-icon.png +0 -0
  54. package/build/assets/img/door-texture.jpeg +0 -0
  55. package/build/assets/img/exterior-wall-texture-roughness.jpg +0 -0
  56. package/build/assets/img/exterior-wall-texture.jpeg +0 -0
  57. package/build/assets/img/floor-bathroom.jpg +0 -0
  58. package/build/assets/img/floor-dark.jpg +0 -0
  59. package/build/assets/img/floor-white.jpg +0 -0
  60. package/build/assets/img/floor.jpg +0 -0
  61. package/build/assets/img/grass.jpg +0 -0
  62. package/build/assets/img/logo.svg +0 -11
  63. package/build/assets/img/refresh-icon.svg +0 -6
  64. package/build/assets/img/spot-icon.png +0 -0
  65. package/build/assets/img/wall-texture.jpg +0 -0
  66. package/build/assets/sass/components/instructions.sass +0 -94
  67. package/build/assets/sass/components/loader.sass +0 -54
  68. package/build/assets/sass/components/model.sass +0 -27
  69. package/build/assets/sass/components/panorama.sass +0 -174
  70. package/build/assets/sass/components/rotation.sass +0 -202
  71. package/build/assets/sass/components/tabs.sass +0 -121
  72. package/build/assets/sass/index.sass +0 -65
  73. package/build/assets/sass/mixin.sass +0 -48
  74. package/build/assets/sass/vars.sass +0 -28
  75. package/build/bundle.js +0 -2
  76. package/build/components/Application.js +0 -2
  77. package/build/components/Buttons/FullScreenButton.js +0 -2
  78. package/build/components/Buttons/TabButton.js +0 -2
  79. package/build/components/Instructions.js +0 -2
  80. package/build/components/Loader.js +0 -2
  81. package/build/components/ModelTab.js +0 -2
  82. package/build/components/PanoramaTab.js +0 -2
  83. package/build/components/RotationTab/DefaultView.js +0 -2
  84. package/build/components/RotationTab/ThreesixtyView.js +0 -2
  85. package/build/components/RotationTab/index.js +0 -2
  86. package/build/components/Widget.js +0 -2
  87. package/build/config/defaultConfig.js +0 -2
  88. package/build/enums/deviceOrientationStatuses.js +0 -2
  89. package/build/enums/deviceWidth.js +0 -2
  90. package/build/enums/imageExtentions.js +0 -2
  91. package/build/enums/rotationModes.js +0 -2
  92. package/build/index.css +0 -2
  93. package/build/index.js +0 -2
  94. package/build/locale/en/data.json +0 -25
  95. package/build/locale/index.js +0 -2
  96. package/build/locale/ru/data.json +0 -25
  97. package/build/store/apiStore.js +0 -2
  98. package/build/store/deviceStore.js +0 -2
  99. package/build/store/fullScreenStore.js +0 -2
  100. package/build/store/houseStore.js +0 -2
  101. package/build/store/index.js +0 -2
  102. package/build/store/modelStore.js +0 -2
  103. package/build/threesixty/events.js +0 -2
  104. package/build/threesixty/index.js +0 -2
  105. package/build/utils/csg/csg-lib.js +0 -2
  106. package/build/utils/csg/csg-worker.js +0 -2
  107. package/build/utils/csg/three-csg.js +0 -2
  108. package/build/utils/helpers.js +0 -2
  109. package/build/utils/modelHelpers.js +0 -2
  110. package/build/utils/panoramaHelpers.js +0 -2
package/README.md CHANGED
@@ -11,24 +11,31 @@
11
11
  import React, { useEffect, useState } from 'react';
12
12
  import { Widget, rotationModes } from 'hart-estate-widget';
13
13
  // либо
14
- import 'hart-estate-widget/build/bundle.js';
15
- import 'hart-estate-widget/build/index.css';
14
+ import 'hart-estate-widget/build/widget.bundle.js'; // в таком случае создается глобальная переменная WidgetLibrary
16
15
 
17
16
  const WIDGET_OPTIONS = {
18
17
  tabs: ['planImage', 'rotation', 'panorama'],
19
18
  logo: '/path/to/logo.png',
20
19
  planImage: '/path/to/plan.jpg',
21
20
  rotationMode: rotationModes.DEFAULY,
22
- rotationImages: [
23
- '/path/to/rotation_image_1.jpg',
24
- ...
25
- '/path/to/rotation_image_5.jpg',
26
- ],
27
- panoramaImages: [
28
- '/path/to/panorama_image_1.jpg',
29
- ...
30
- '/path/to/panorama_image_5.jpg',
31
- ],
21
+ rotationData: {
22
+ type: 'top_down',
23
+ items: [
24
+ '/path/to/rotation_image_1.jpg',
25
+ ...
26
+ '/path/to/rotation_image_5.jpg',
27
+ ],
28
+ },
29
+ panoramaData: {
30
+ type: 'sphere',
31
+ items: [
32
+ {
33
+ camera_id: '1234',
34
+ images: ['/path/to/panorama_image.jpg'],
35
+ room_id: '1234',
36
+ },
37
+ ],
38
+ },
32
39
  };
33
40
 
34
41
  const App = () => {
@@ -36,24 +43,12 @@ const App = () => {
36
43
 
37
44
  useEffect(() => {
38
45
  const createdWidget = new Widget('#widget-container', WIDGET_OPTIONS);
39
-
40
- const onResize = () => {
41
- const { innerWidth: width, innerHeight: height } = window;
42
- createdWidget.updateSize({ width, height });
43
- };
44
-
45
- window.addEventListener('resize', onResize);
46
-
47
46
  setState(createdWidget);
48
-
49
- return function cleanup() {
50
- window.removeEventListener('resize', onResize);
51
- };
52
47
  }, []);
53
48
 
54
49
  return (
55
50
  <div>
56
- <div id="#widget-container" />
51
+ <div id="widget-container" />
57
52
  </div>
58
53
  );
59
54
  }
@@ -86,8 +81,8 @@ export App;
86
81
  planImage: '', // путь к изображению планировки (необходимо для панорамного тура)
87
82
  topViewImage: '', // путь к изображению планировки сверху
88
83
  rotationMode: 'default', // режим работы изображений планировки
89
- rotationImages: [], // пути к изображениям кругового просмотра (порядок обязателен)
90
- panoramaImages: [], // пути к изображениям 360°
84
+ rotationData: {}, // тип изображений и пути к изображениям кругового просмотра (порядок обязателен)
85
+ panoramaData: {}, // тип панорамы и пути к изображениям 360°
91
86
  }
92
87
 
93
88
  ```
@@ -102,6 +97,14 @@ rotationMode: [
102
97
  rotationModes.DEFAULT, // режим просмотра вида сверху (несколько ракурсов) и стилизованной планировки
103
98
  rotationModes.THREESIXTY, // режим прокрутки изображений кругового просмотра
104
99
  ],
100
+ rotationData.type: [
101
+ 'top_down', // полная модель
102
+ 'middle_cut', // модеь со срезом посередине
103
+ ],
104
+ panoramaData.type: [
105
+ 'sphere', // панорама с изображениями 360°
106
+ 'cube', // панорама с 6 изображениями (top, down, left, right, front, back)
107
+ ],
105
108
  locale: [
106
109
  'ru', // русский язык
107
110
  'en', // английский язык