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.
- package/README.md +30 -27
- package/build/widget.bundle.js +3 -0
- package/build/widget.bundle.js.LICENSE.txt +78 -0
- package/build/widget.bundle.js.map +1 -0
- package/build/widget.module.js +3 -0
- package/build/widget.module.js.LICENSE.txt +78 -0
- package/build/widget.module.js.map +1 -0
- package/package.json +22 -21
- package/build/assets/css/index.css +0 -2
- package/build/assets/fonts/RobotoMono/RobotoMono-Bold.ttf +0 -0
- package/build/assets/fonts/RobotoMono/RobotoMono-Bold.woff +0 -0
- package/build/assets/fonts/RobotoMono/RobotoMono-Bold.woff2 +0 -0
- package/build/assets/fonts/RobotoMono/RobotoMono-BoldItalic.ttf +0 -0
- package/build/assets/fonts/RobotoMono/RobotoMono-BoldItalic.woff +0 -0
- package/build/assets/fonts/RobotoMono/RobotoMono-BoldItalic.woff2 +0 -0
- package/build/assets/fonts/RobotoMono/RobotoMono-Italic.ttf +0 -0
- package/build/assets/fonts/RobotoMono/RobotoMono-Italic.woff +0 -0
- package/build/assets/fonts/RobotoMono/RobotoMono-Italic.woff2 +0 -0
- package/build/assets/fonts/RobotoMono/RobotoMono-Light.ttf +0 -0
- package/build/assets/fonts/RobotoMono/RobotoMono-Light.woff +0 -0
- package/build/assets/fonts/RobotoMono/RobotoMono-Light.woff2 +0 -0
- package/build/assets/fonts/RobotoMono/RobotoMono-LightItalic.ttf +0 -0
- package/build/assets/fonts/RobotoMono/RobotoMono-LightItalic.woff +0 -0
- package/build/assets/fonts/RobotoMono/RobotoMono-LightItalic.woff2 +0 -0
- package/build/assets/fonts/RobotoMono/RobotoMono-Medium.ttf +0 -0
- package/build/assets/fonts/RobotoMono/RobotoMono-Medium.woff +0 -0
- package/build/assets/fonts/RobotoMono/RobotoMono-Medium.woff2 +0 -0
- package/build/assets/fonts/RobotoMono/RobotoMono-MediumItalic.ttf +0 -0
- package/build/assets/fonts/RobotoMono/RobotoMono-MediumItalic.woff +0 -0
- package/build/assets/fonts/RobotoMono/RobotoMono-MediumItalic.woff2 +0 -0
- package/build/assets/fonts/RobotoMono/RobotoMono-Regular.ttf +0 -0
- package/build/assets/fonts/RobotoMono/RobotoMono-Regular.woff +0 -0
- package/build/assets/fonts/RobotoMono/RobotoMono-Regular.woff2 +0 -0
- package/build/assets/fonts/RobotoMono/RobotoMono-Thin.ttf +0 -0
- package/build/assets/fonts/RobotoMono/RobotoMono-Thin.woff +0 -0
- package/build/assets/fonts/RobotoMono/RobotoMono-Thin.woff2 +0 -0
- package/build/assets/fonts/RobotoMono/RobotoMono.css +0 -98
- package/build/assets/icons/1x.svg +0 -4
- package/build/assets/icons/2x.svg +0 -4
- package/build/assets/icons/arrow-left.svg +0 -4
- package/build/assets/icons/arrow-right.svg +0 -4
- package/build/assets/icons/bullet.png +0 -0
- package/build/assets/icons/close.svg +0 -4
- package/build/assets/icons/enter-fullscreen.svg +0 -6
- package/build/assets/icons/hand-move.svg +0 -15
- package/build/assets/icons/hand-research.svg +0 -12
- package/build/assets/icons/plan.svg +0 -5
- package/build/assets/icons/render.svg +0 -7
- package/build/assets/icons/rotation-close.svg +0 -6
- package/build/assets/icons/rotation.svg +0 -4
- package/build/assets/icons/surface.svg +0 -5
- package/build/assets/img/3D.jpg +0 -0
- package/build/assets/img/door-icon.png +0 -0
- package/build/assets/img/door-texture.jpeg +0 -0
- package/build/assets/img/exterior-wall-texture-roughness.jpg +0 -0
- package/build/assets/img/exterior-wall-texture.jpeg +0 -0
- package/build/assets/img/floor-bathroom.jpg +0 -0
- package/build/assets/img/floor-dark.jpg +0 -0
- package/build/assets/img/floor-white.jpg +0 -0
- package/build/assets/img/floor.jpg +0 -0
- package/build/assets/img/grass.jpg +0 -0
- package/build/assets/img/logo.svg +0 -11
- package/build/assets/img/refresh-icon.svg +0 -6
- package/build/assets/img/spot-icon.png +0 -0
- package/build/assets/img/wall-texture.jpg +0 -0
- package/build/assets/sass/components/instructions.sass +0 -94
- package/build/assets/sass/components/loader.sass +0 -54
- package/build/assets/sass/components/model.sass +0 -27
- package/build/assets/sass/components/panorama.sass +0 -174
- package/build/assets/sass/components/rotation.sass +0 -202
- package/build/assets/sass/components/tabs.sass +0 -121
- package/build/assets/sass/index.sass +0 -65
- package/build/assets/sass/mixin.sass +0 -48
- package/build/assets/sass/vars.sass +0 -28
- package/build/bundle.js +0 -2
- package/build/components/Application.js +0 -2
- package/build/components/Buttons/FullScreenButton.js +0 -2
- package/build/components/Buttons/TabButton.js +0 -2
- package/build/components/Instructions.js +0 -2
- package/build/components/Loader.js +0 -2
- package/build/components/ModelTab.js +0 -2
- package/build/components/PanoramaTab.js +0 -2
- package/build/components/RotationTab/DefaultView.js +0 -2
- package/build/components/RotationTab/ThreesixtyView.js +0 -2
- package/build/components/RotationTab/index.js +0 -2
- package/build/components/Widget.js +0 -2
- package/build/config/defaultConfig.js +0 -2
- package/build/enums/deviceOrientationStatuses.js +0 -2
- package/build/enums/deviceWidth.js +0 -2
- package/build/enums/imageExtentions.js +0 -2
- package/build/enums/rotationModes.js +0 -2
- package/build/index.css +0 -2
- package/build/index.js +0 -2
- package/build/locale/en/data.json +0 -25
- package/build/locale/index.js +0 -2
- package/build/locale/ru/data.json +0 -25
- package/build/store/apiStore.js +0 -2
- package/build/store/deviceStore.js +0 -2
- package/build/store/fullScreenStore.js +0 -2
- package/build/store/houseStore.js +0 -2
- package/build/store/index.js +0 -2
- package/build/store/modelStore.js +0 -2
- package/build/threesixty/events.js +0 -2
- package/build/threesixty/index.js +0 -2
- package/build/utils/csg/csg-lib.js +0 -2
- package/build/utils/csg/csg-worker.js +0 -2
- package/build/utils/csg/three-csg.js +0 -2
- package/build/utils/helpers.js +0 -2
- package/build/utils/modelHelpers.js +0 -2
- 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
|
-
|
23
|
-
'
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
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="
|
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
|
-
|
90
|
-
|
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', // английский язык
|