hart-estate-widget 0.0.64 → 0.0.67
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 +7 -3
- package/package.json +17 -5
- package/build/assets/css/app.css +0 -1
- package/build/assets/css/app.css.map +0 -1
- 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/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/rotation-close.svg +0 -6
- package/build/assets/icons/rotation.svg +0 -4
- 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.png +0 -0
- package/build/assets/img/floor-white.png +0 -0
- package/build/assets/img/floor.jpg +0 -0
- package/build/assets/img/grass.png +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 -106
- 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/components/Application.js +0 -132
- package/build/components/Buttons/FullScreenButton.js +0 -50
- package/build/components/Buttons/TabButton.js +0 -24
- package/build/components/Instructions.js +0 -54
- package/build/components/Loader.js +0 -22
- package/build/components/ModelTab.js +0 -213
- package/build/components/PanoramaTab.js +0 -620
- package/build/components/RotationTab.js +0 -152
- package/build/components/Widget.js +0 -130
- package/build/config/defaultConfig.js +0 -30
- package/build/enums/deviceOrientationStatuses.js +0 -11
- package/build/enums/deviceWidth.js +0 -21
- package/build/enums/imageExtentions.js +0 -16
- package/build/index.css +0 -2
- package/build/index.js +0 -67
- package/build/locale/en/data.json +0 -25
- package/build/locale/index.js +0 -71
- package/build/locale/ru/data.json +0 -25
- package/build/store/apiStore.js +0 -231
- package/build/store/deviceStore.js +0 -60
- package/build/store/fullScreenStore.js +0 -159
- package/build/store/houseStore.js +0 -952
- package/build/store/index.js +0 -124
- package/build/store/modelStore.js +0 -338
- package/build/threesixty/events.js +0 -220
- package/build/threesixty/index.js +0 -264
- package/build/utils/csg/csg-lib.js +0 -472
- package/build/utils/csg/csg-worker.js +0 -84
- package/build/utils/csg/three-csg.js +0 -277
- package/build/utils/helpers.js +0 -12
- package/build/utils/modelHelpers.js +0 -161
- package/build/utils/panoramaHelpers.js +0 -117
@@ -1,264 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.default = void 0;
|
7
|
-
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
9
|
-
|
10
|
-
var _events2 = _interopRequireDefault(require("./events"));
|
11
|
-
|
12
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
13
|
-
|
14
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
15
|
-
|
16
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
17
|
-
|
18
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
19
|
-
|
20
|
-
function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
|
21
|
-
|
22
|
-
function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
|
23
|
-
|
24
|
-
function _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get"); return _classApplyDescriptorGet(receiver, descriptor); }
|
25
|
-
|
26
|
-
function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }
|
27
|
-
|
28
|
-
function _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "set"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }
|
29
|
-
|
30
|
-
function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }
|
31
|
-
|
32
|
-
function _classApplyDescriptorSet(receiver, descriptor, value) { if (descriptor.set) { descriptor.set.call(receiver, value); } else { if (!descriptor.writable) { throw new TypeError("attempted to set read only private field"); } descriptor.value = value; } }
|
33
|
-
|
34
|
-
var _options = /*#__PURE__*/new WeakMap();
|
35
|
-
|
36
|
-
var _index = /*#__PURE__*/new WeakMap();
|
37
|
-
|
38
|
-
var _loopTimeoutId = /*#__PURE__*/new WeakMap();
|
39
|
-
|
40
|
-
var _looping = /*#__PURE__*/new WeakMap();
|
41
|
-
|
42
|
-
var _events = /*#__PURE__*/new WeakMap();
|
43
|
-
|
44
|
-
var _sprite = /*#__PURE__*/new WeakMap();
|
45
|
-
|
46
|
-
var ThreeSixty = /*#__PURE__*/function () {
|
47
|
-
function ThreeSixty(container, options) {
|
48
|
-
_classCallCheck(this, ThreeSixty);
|
49
|
-
|
50
|
-
_classPrivateFieldInitSpec(this, _options, {
|
51
|
-
writable: true,
|
52
|
-
value: null
|
53
|
-
});
|
54
|
-
|
55
|
-
_classPrivateFieldInitSpec(this, _index, {
|
56
|
-
writable: true,
|
57
|
-
value: 0
|
58
|
-
});
|
59
|
-
|
60
|
-
_classPrivateFieldInitSpec(this, _loopTimeoutId, {
|
61
|
-
writable: true,
|
62
|
-
value: null
|
63
|
-
});
|
64
|
-
|
65
|
-
_classPrivateFieldInitSpec(this, _looping, {
|
66
|
-
writable: true,
|
67
|
-
value: false
|
68
|
-
});
|
69
|
-
|
70
|
-
_classPrivateFieldInitSpec(this, _events, {
|
71
|
-
writable: true,
|
72
|
-
value: null
|
73
|
-
});
|
74
|
-
|
75
|
-
_classPrivateFieldInitSpec(this, _sprite, {
|
76
|
-
writable: true,
|
77
|
-
value: false
|
78
|
-
});
|
79
|
-
|
80
|
-
this.container = container;
|
81
|
-
|
82
|
-
_classPrivateFieldSet(this, _options, Object.assign({
|
83
|
-
width: 300,
|
84
|
-
height: 300,
|
85
|
-
aspectRatio: 0,
|
86
|
-
count: 0,
|
87
|
-
perRow: 0,
|
88
|
-
speed: 100,
|
89
|
-
dragTolerance: 10,
|
90
|
-
swipeTolerance: 10,
|
91
|
-
draggable: true,
|
92
|
-
swipeable: true,
|
93
|
-
keys: true,
|
94
|
-
inverted: false
|
95
|
-
}, options));
|
96
|
-
|
97
|
-
_classPrivateFieldGet(this, _options).swipeTarget = _classPrivateFieldGet(this, _options).swipeTarget || this.container;
|
98
|
-
|
99
|
-
_classPrivateFieldSet(this, _sprite, !Array.isArray(_classPrivateFieldGet(this, _options).image));
|
100
|
-
|
101
|
-
if (!this.sprite) {
|
102
|
-
_classPrivateFieldGet(this, _options).count = _classPrivateFieldGet(this, _options).image.length;
|
103
|
-
}
|
104
|
-
|
105
|
-
Object.freeze(_classPrivateFieldGet(this, _options));
|
106
|
-
|
107
|
-
_classPrivateFieldSet(this, _events, new _events2.default(this, _classPrivateFieldGet(this, _options)));
|
108
|
-
|
109
|
-
this._windowResizeListener = this._windowResizeListener.bind(this);
|
110
|
-
|
111
|
-
this._initContainer();
|
112
|
-
}
|
113
|
-
|
114
|
-
_createClass(ThreeSixty, [{
|
115
|
-
key: "isResponsive",
|
116
|
-
get: function get() {
|
117
|
-
return _classPrivateFieldGet(this, _options).aspectRatio > 0;
|
118
|
-
}
|
119
|
-
}, {
|
120
|
-
key: "containerWidth",
|
121
|
-
get: function get() {
|
122
|
-
return this.isResponsive ? this.container.clientWidth : _classPrivateFieldGet(this, _options).width;
|
123
|
-
}
|
124
|
-
}, {
|
125
|
-
key: "containerHeight",
|
126
|
-
get: function get() {
|
127
|
-
return this.isResponsive ? this.container.clientWidth * _classPrivateFieldGet(this, _options).aspectRatio : _classPrivateFieldGet(this, _options).height;
|
128
|
-
}
|
129
|
-
}, {
|
130
|
-
key: "index",
|
131
|
-
get: function get() {
|
132
|
-
return _classPrivateFieldGet(this, _index);
|
133
|
-
}
|
134
|
-
}, {
|
135
|
-
key: "looping",
|
136
|
-
get: function get() {
|
137
|
-
return _classPrivateFieldGet(this, _looping);
|
138
|
-
}
|
139
|
-
}, {
|
140
|
-
key: "sprite",
|
141
|
-
get: function get() {
|
142
|
-
return _classPrivateFieldGet(this, _sprite);
|
143
|
-
}
|
144
|
-
}, {
|
145
|
-
key: "next",
|
146
|
-
value: function next() {
|
147
|
-
this.goto(_classPrivateFieldGet(this, _options).inverted ? _classPrivateFieldGet(this, _index) - 1 : _classPrivateFieldGet(this, _index) + 1);
|
148
|
-
}
|
149
|
-
}, {
|
150
|
-
key: "prev",
|
151
|
-
value: function prev() {
|
152
|
-
this.goto(_classPrivateFieldGet(this, _options).inverted ? _classPrivateFieldGet(this, _index) + 1 : _classPrivateFieldGet(this, _index) - 1);
|
153
|
-
}
|
154
|
-
}, {
|
155
|
-
key: "goto",
|
156
|
-
value: function goto(index) {
|
157
|
-
_classPrivateFieldSet(this, _index, (_classPrivateFieldGet(this, _options).count + index) % _classPrivateFieldGet(this, _options).count);
|
158
|
-
|
159
|
-
this._update();
|
160
|
-
}
|
161
|
-
}, {
|
162
|
-
key: "play",
|
163
|
-
value: function play(reversed) {
|
164
|
-
if (this.looping) {
|
165
|
-
return;
|
166
|
-
}
|
167
|
-
|
168
|
-
this._loop(reversed);
|
169
|
-
|
170
|
-
_classPrivateFieldSet(this, _looping, true);
|
171
|
-
}
|
172
|
-
}, {
|
173
|
-
key: "stop",
|
174
|
-
value: function stop() {
|
175
|
-
if (!this.looping) {
|
176
|
-
return;
|
177
|
-
}
|
178
|
-
|
179
|
-
global.clearTimeout(_classPrivateFieldGet(this, _loopTimeoutId));
|
180
|
-
|
181
|
-
_classPrivateFieldSet(this, _looping, false);
|
182
|
-
}
|
183
|
-
}, {
|
184
|
-
key: "toggle",
|
185
|
-
value: function toggle(reversed) {
|
186
|
-
this.looping ? this.stop() : this.play(reversed);
|
187
|
-
}
|
188
|
-
}, {
|
189
|
-
key: "destroy",
|
190
|
-
value: function destroy() {
|
191
|
-
this.stop();
|
192
|
-
|
193
|
-
_classPrivateFieldGet(this, _events).destroy();
|
194
|
-
|
195
|
-
this.container.style.width = '';
|
196
|
-
this.container.style.height = '';
|
197
|
-
this.container.style.backgroundImage = '';
|
198
|
-
this.container.style.backgroundPositionX = '';
|
199
|
-
this.container.style.backgroundPositionY = '';
|
200
|
-
this.container.style.backgroundSize = '';
|
201
|
-
|
202
|
-
if (this.isResponsive) {
|
203
|
-
window.removeEventListener('resize', this._windowResizeListener);
|
204
|
-
}
|
205
|
-
}
|
206
|
-
}, {
|
207
|
-
key: "_loop",
|
208
|
-
value: function _loop(reversed) {
|
209
|
-
var _this = this;
|
210
|
-
|
211
|
-
reversed ? this.prev() : this.next();
|
212
|
-
|
213
|
-
_classPrivateFieldSet(this, _loopTimeoutId, global.setTimeout(function () {
|
214
|
-
_this._loop(reversed);
|
215
|
-
}, _classPrivateFieldGet(this, _options).speed));
|
216
|
-
}
|
217
|
-
}, {
|
218
|
-
key: "_update",
|
219
|
-
value: function _update() {
|
220
|
-
if (this.sprite) {
|
221
|
-
this.container.style.backgroundPositionX = -(_classPrivateFieldGet(this, _index) % _classPrivateFieldGet(this, _options).perRow) * this.containerWidth + 'px';
|
222
|
-
this.container.style.backgroundPositionY = -Math.floor(_classPrivateFieldGet(this, _index) / _classPrivateFieldGet(this, _options).perRow) * this.containerHeight + 'px';
|
223
|
-
} else {
|
224
|
-
this.container.style.backgroundImage = "url(\"".concat(_classPrivateFieldGet(this, _options).image[_classPrivateFieldGet(this, _index)], "\")");
|
225
|
-
}
|
226
|
-
}
|
227
|
-
}, {
|
228
|
-
key: "_windowResizeListener",
|
229
|
-
value: function _windowResizeListener() {
|
230
|
-
this.container.style.height = this.containerHeight + 'px';
|
231
|
-
|
232
|
-
this._update();
|
233
|
-
}
|
234
|
-
}, {
|
235
|
-
key: "_initContainer",
|
236
|
-
value: function _initContainer() {
|
237
|
-
if (!this.isResponsive) {
|
238
|
-
this.container.style.width = this.containerWidth + 'px';
|
239
|
-
}
|
240
|
-
|
241
|
-
this.container.style.height = this.containerHeight + 'px';
|
242
|
-
|
243
|
-
if (this.sprite) {
|
244
|
-
this.container.style.backgroundImage = "url(\"".concat(_classPrivateFieldGet(this, _options).image, "\")");
|
245
|
-
|
246
|
-
var cols = _classPrivateFieldGet(this, _options).perRow;
|
247
|
-
|
248
|
-
var rows = Math.ceil(_classPrivateFieldGet(this, _options).count / _classPrivateFieldGet(this, _options).perRow);
|
249
|
-
this.container.style.backgroundSize = cols * 100 + '% ' + rows * 100 + '%';
|
250
|
-
}
|
251
|
-
|
252
|
-
if (this.isResponsive) {
|
253
|
-
window.addEventListener('resize', this._windowResizeListener);
|
254
|
-
}
|
255
|
-
|
256
|
-
this._update();
|
257
|
-
}
|
258
|
-
}]);
|
259
|
-
|
260
|
-
return ThreeSixty;
|
261
|
-
}();
|
262
|
-
|
263
|
-
var _default = ThreeSixty;
|
264
|
-
exports.default = _default;
|