hart-estate-widget 3.8.6 → 3.9.0
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 +210 -113
- package/build/widget.bundle.js +1 -1
- package/build/widget.module.js +1 -1
- package/package.json +3 -2
package/README.md
CHANGED
@@ -97,7 +97,7 @@ const createWidget = async (logoUrl) => {
|
|
97
97
|
const planData = await widgetApiHandler.loadWidgetData(planId);
|
98
98
|
const options = { // the parameters you need that are described below in "Parameters"
|
99
99
|
...planData.parsed,
|
100
|
-
|
100
|
+
api_url: WIDGET_API_URL,
|
101
101
|
rotationMode: rotationModes.DEFAULT,
|
102
102
|
tabs: ['panorama', 'rotation'],
|
103
103
|
locale: 'en',
|
@@ -146,124 +146,218 @@ body
|
|
146
146
|
## Parameters:
|
147
147
|
Here you can see a list of accessible options and examples of usage. There are accessible values for each option below in the block "Types of Elements".
|
148
148
|
|
149
|
-
```
|
150
|
-
{
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
logo: ''
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
locale: 'en', // ISO 639 language code
|
161
|
-
|
162
|
-
// width/height
|
149
|
+
```ts
|
150
|
+
type TConfig = {
|
151
|
+
/** Widget API Backend URL */
|
152
|
+
api_url: 'https://backend.example.com/';
|
153
|
+
|
154
|
+
/** Path/link to the logo */
|
155
|
+
logo: '';
|
156
|
+
/** Link opened when logo is clicked */
|
157
|
+
logoUrl: '';
|
158
|
+
|
159
|
+
/** Widget container offsetWidth */
|
163
160
|
width: 1920,
|
161
|
+
/** Widget container offsetHeight */
|
164
162
|
height: 1080,
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
163
|
+
/** Automatically resize the widget to the size of the container when the window is resized */
|
164
|
+
resizable: true;
|
165
|
+
|
166
|
+
/** Widget localization language (default: en) */
|
167
|
+
locale: 'en'
|
168
|
+
|
169
|
+
/** Use door proactive rectangle instead of door icon. */
|
170
|
+
enableDoorVisibility: false;
|
171
|
+
/** Type of images that will present in rotation tab, used as whitelist filter, defaults ['carousel', 'plan', 'topView'] */
|
172
|
+
availableRotationSteps: ['carousel', 'plan', 'topView'];
|
173
|
+
|
174
|
+
/** Available widget tabs, defaults ['rotation', 'plan', 'panorama'] */
|
175
|
+
tabs: ['rotation', 'plan', 'panorama'];
|
176
|
+
|
177
|
+
/**
|
178
|
+
* Mode of operation for plan images
|
179
|
+
* - `rotationModes.DEFAULT` - top view mode (multiple perspectives) and stylized plan view
|
180
|
+
* - `rotationModes.THREESIXTY` - image scrolling mode for circular view
|
181
|
+
* */
|
182
|
+
rotationMode: rotationModes.DEFAULT;
|
183
|
+
/** Camera persective FOV */
|
184
|
+
panoramaFov: 75;
|
185
|
+
/** Enable/disable camera rotation between panoramas (if CameraPoint.Rotation.Yaw is defined in JSON) */
|
186
|
+
enableCameraRotationBetweenPanoramas: true;
|
187
|
+
/** Enable/disable transition for camera rotation between panoramas (if CameraPoint.Rotation.Yaw is defined in JSON and enableCameraRotationBetweenPanoramas enabled) */
|
188
|
+
enableCameraTransitionBetweenPanoramas: false;
|
189
|
+
/** Override primary camera point ID over JSON */
|
190
|
+
primaryCameraPointId: 'CameraPointId12345678-12345678-12345678';
|
191
|
+
|
192
|
+
/**
|
193
|
+
* Widget color settings
|
194
|
+
* - `main`: main color of buttons, elements
|
195
|
+
* - `mainText`: text color for buttons, elements contrasting with the main color
|
196
|
+
* */
|
191
197
|
colors: {
|
192
|
-
main: '#
|
193
|
-
mainText: '#
|
194
|
-
}
|
198
|
+
main: '#FFA900',
|
199
|
+
mainText: '#413E3E',
|
200
|
+
};
|
195
201
|
|
196
|
-
|
197
|
-
dictionaryOverrides: {
|
198
|
-
"create-points": "Create a point", // text for create point
|
199
|
-
"delete-points": "Remove point", // text for delete point
|
200
|
-
"research-plan": "Research plan", // text for research plan
|
201
|
-
"rotate-plan": "Rotate plan", // text for rotate plan
|
202
|
-
"ok": "Ok", // button text
|
203
|
-
"made-by-link": "https://getfloorplan.com/", // watermark link
|
204
|
-
"made-by-text": "getfloorplan.com", // watermark text
|
205
|
-
"instructions-hint-text": "", // additional text on the bottom of instruction modal
|
206
|
-
"floor": "$0 floor" // floor text
|
207
|
-
},
|
208
|
-
|
209
|
-
API_URL: '', // API URL
|
210
|
-
|
211
|
-
// branding.
|
212
|
-
branding: {
|
213
|
-
company_url: '', // link opened when logo is clicked (higher priority than logoUrl)
|
214
|
-
company_name: '', // watermark text (higher priority than dictionaryOverrides['made-by-text'])
|
215
|
-
widget_language: 'en', // ISO 639 language code
|
216
|
-
logo_path: '', // path to logo
|
217
|
-
|
218
|
-
// panorama icons
|
202
|
+
/** Panorama icons */
|
219
203
|
panoramaIcons: {
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
204
|
+
/** Icon for camera point links in one room */
|
205
|
+
spot: 'https://images.com/image-spot.svg';
|
206
|
+
/** Icon for proactive camera point links in one room */
|
207
|
+
interactiveSpot: 'https://images.com/image-interactive-spot.svg';
|
208
|
+
/** Icon for door link */
|
209
|
+
door: 'https://images.com/image-door.png';
|
210
|
+
};
|
211
|
+
|
212
|
+
/** Overrides locale keys with custom text or translation */
|
213
|
+
dictionaryOverrides: {
|
214
|
+
'create-points': 'Create a point', // text for create point
|
215
|
+
'delete-points': 'Remove point', // text for delete point
|
216
|
+
'research-plan': 'Research plan', // text for research plan
|
217
|
+
'rotate-plan': 'Rotate plan', // text for rotate plan
|
218
|
+
'ok': 'Ok', // button text
|
219
|
+
'made-by-link': 'https://getfloorplan.com/', // watermark link
|
220
|
+
'made-by-text': 'getfloorplan.com', // watermark text
|
221
|
+
'instructions-hint-text': '', // additional text on the bottom of instruction modal
|
222
|
+
'floor': '$0 floor' // floor text
|
223
|
+
};
|
224
|
+
|
225
|
+
/** Enable/disable modal of instruction in 3D tour */
|
226
|
+
instructionVisible: true;
|
227
|
+
/** Enable/disable auto rotation in 3D tour */
|
228
|
+
autoRotate: false;
|
229
|
+
/** Array of scale keys used as filter, can be x05, x1, x2, x3, x4 */
|
230
|
+
scales: ['x05', 'x1'];
|
231
|
+
/** Enable/disable device gyroscope for AR */
|
232
|
+
enableGyroscope: true;
|
233
|
+
|
234
|
+
/**
|
235
|
+
* Scale button type
|
236
|
+
* - `img`: legacy button with icons x05, x1, etc...
|
237
|
+
* - `text`: button with text content instead of icon x05, x1, etc...
|
238
|
+
*/
|
239
|
+
scaleButtonType: 'img';
|
240
|
+
/** Show floor number endings in floors locale translation */
|
241
|
+
floorNumberEndingsVisible: false;
|
242
|
+
|
243
|
+
/**
|
244
|
+
* Design type
|
245
|
+
* - `standard`: bottom panel without sidebar, external floors select
|
246
|
+
* - `sidebar`: all buttons in sidebar, also floors select in sidebar
|
247
|
+
* - `custom`: use `bottombarContent` and `sidebarContent` to select required buttons manually
|
248
|
+
*/
|
249
|
+
designType: 'sidebar';
|
250
|
+
/** Bottom container button types to show */
|
251
|
+
bottombarContent: [];
|
252
|
+
/** Sidebar button types to show */
|
253
|
+
sidebarContent: ['floors', 'ruler', 'scale', 'rotation', 'furniture'];
|
254
|
+
/**
|
255
|
+
* Buttons design version
|
256
|
+
* - `two`: buttons design v2.0
|
257
|
+
* - `three`: buttons design v3.0
|
258
|
+
*/
|
259
|
+
tabsButtonsDesign: 'three';
|
260
|
+
/** Proactive cursor type: 'pointer' or 'circle' */
|
261
|
+
cursor: 'pointer';
|
262
|
+
/** Enable/disable proactive cursor pulse */
|
263
|
+
enableCursorPulse: true;
|
264
|
+
|
265
|
+
/** Widget external integrations */
|
228
266
|
integrations: {
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
+
/** Configuration options for the Sentry Browser SDK. See: Sentry API BrowserOptions */
|
268
|
+
sentry: BrowserOptions;
|
269
|
+
};
|
270
|
+
|
271
|
+
/** Allows movement only within a room or between rooms, can be interroom or intraroom */
|
272
|
+
movementType: 'interroom';
|
273
|
+
|
274
|
+
/** Options for DefaultLink graphics */
|
275
|
+
default_link_options: {
|
276
|
+
/** Use perspective size for DefaultLink sprite */
|
277
|
+
use_real_size: false;
|
278
|
+
/** Perspective size */
|
279
|
+
real_size: 300;
|
280
|
+
/** Perspective size scale on mobile devices */
|
281
|
+
real_size_mobile_scale: 1;
|
282
|
+
/** Minimal distance to prevent overscale in near distances */
|
283
|
+
real_size_min_distance: 100;
|
284
|
+
/** Minimal distance scale clamp on near distances */
|
285
|
+
real_size_distance_min_scale: 0.1;
|
286
|
+
/** Enable/disable scale on hover */
|
287
|
+
hover_scale: 1.2;
|
288
|
+
};
|
289
|
+
|
290
|
+
/** Panorama fading options */
|
291
|
+
fade_options: {
|
292
|
+
/** Time for fade in (seconds) */
|
293
|
+
fade_in_time: 0.5;
|
294
|
+
/** Time for fade out (seconds) */
|
295
|
+
fade_out_time: 0.5;
|
296
|
+
};
|
297
|
+
|
298
|
+
/** Options for DefaultLink graphics */
|
299
|
+
ruler_options: {
|
300
|
+
/** Font size for ruler text */
|
301
|
+
font_size: 38;
|
302
|
+
};
|
303
|
+
|
304
|
+
/** Options for DefaultLink graphics */
|
305
|
+
link_options: {
|
306
|
+
/** Enable/disable link pulse on hover */
|
307
|
+
enable_pulse: false;
|
308
|
+
/** Pulse scale from */
|
309
|
+
pulse_from_scale: 1;
|
310
|
+
/** Pulse scale to */
|
311
|
+
pulse_to_scale: 2;
|
312
|
+
/** Pulse speed */
|
313
|
+
pulse_speed: 1;
|
314
|
+
|
315
|
+
/** Enable/disable scale on hover */
|
316
|
+
enable_point_hover_scale: false;
|
317
|
+
/** Hover scale */
|
318
|
+
point_hover_scale: 1;
|
319
|
+
};
|
320
|
+
|
321
|
+
/** Options for DefaultLink graphics */
|
322
|
+
map_options: {
|
323
|
+
/** Map type, should be 'default', 'top_view' or 'multi_floor' */
|
324
|
+
type: 'default';
|
325
|
+
/** Upscale top view resolution for better rendering */
|
326
|
+
top_view_upscale: 2;
|
327
|
+
};
|
328
|
+
|
329
|
+
/** Options for Scene camera */
|
330
|
+
camera_options: {
|
331
|
+
fov_change_speed: 0;
|
332
|
+
};
|
333
|
+
|
334
|
+
/** Options for DefaultLink graphics */
|
335
|
+
lazy_load_options: {
|
336
|
+
/** Count panoramas to lazy load after move to another panorama */
|
337
|
+
preload_count: 3;
|
338
|
+
/** Force lazy load another non-loaded panoramas instead of skipping near cached panoramas */
|
339
|
+
force_preload_non_cached: true;
|
340
|
+
/** Preload depth maps */
|
341
|
+
use_masks_preload: true;
|
342
|
+
};
|
343
|
+
|
344
|
+
/** Widget branding data */
|
345
|
+
widget_branding: {
|
346
|
+
/** Branded logo path */
|
347
|
+
logo_path: 'https://es-logos.com/logo.png';
|
348
|
+
/** Branded company name */
|
349
|
+
company_name: 'ES Company';
|
350
|
+
/** Branded company url */
|
351
|
+
company_url: 'https://es.company.com';
|
352
|
+
/** Branded widget language (See locale/*) */
|
353
|
+
widget_language: 'es';
|
354
|
+
}
|
355
|
+
|
356
|
+
/** Show/hide fullscreen button */
|
357
|
+
fullscreen_button_visible: false;
|
358
|
+
/** Show/hide room type label */
|
359
|
+
room_label_visible: false;
|
360
|
+
};
|
267
361
|
```
|
268
362
|
|
269
363
|
## Types of elements
|
@@ -294,6 +388,8 @@ locale: [
|
|
294
388
|
scales: [
|
295
389
|
'x1',
|
296
390
|
'x2',
|
391
|
+
'x3',
|
392
|
+
'x4',
|
297
393
|
'x05'
|
298
394
|
],
|
299
395
|
```
|
@@ -329,6 +425,7 @@ panorama: { // type of panorama and paths to 360° images
|
|
329
425
|
top: null,
|
330
426
|
bottom: null,
|
331
427
|
scene_depth: "", // path to EXR file for depth map if available
|
428
|
+
object_ids: "", // path to EXR file for furniture object ids if available
|
332
429
|
]
|
333
430
|
}
|
334
431
|
]
|