hart-estate-widget 3.9.16 → 4.0.1
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 +225 -360
- package/build/api.js +1 -0
- package/build/createWidget.js +2 -0
- package/build/{widget.module.js.LICENSE.txt → createWidget.js.LICENSE.txt} +34 -21
- package/build/plugins/DebugPlugin.js +2 -0
- package/build/{widget.bundle.js.LICENSE.txt → plugins/DebugPlugin.js.LICENSE.txt} +28 -28
- package/build/plugins/DefaultMapPlugin.js +2 -0
- package/build/plugins/DefaultMapPlugin.js.LICENSE.txt +49 -0
- package/build/plugins/FovPlugin.js +1 -0
- package/package.json +29 -38
- package/build/widget.bundle.js +0 -2
- package/build/widget.module.js +0 -2
- package/build/widget.module.worker.js.LICENSE.txt +0 -12
- /package/build/{widget.bundle.worker.js.LICENSE.txt → createWidget.worker.js.LICENSE.txt} +0 -0
package/README.md
CHANGED
@@ -3,16 +3,16 @@
|
|
3
3
|
The package is designed to present 2D and 3D floor plans generated by the AI service [getfloorplan.com](https://getfloorplan.com).
|
4
4
|
|
5
5
|
# Table of Contents
|
6
|
-
-
|
7
|
-
-
|
8
|
-
-
|
9
|
-
-
|
10
|
-
-
|
11
|
-
-
|
12
|
-
-
|
13
|
-
-
|
14
|
-
-
|
15
|
-
-
|
6
|
+
- [Quick Start](#quick-start)
|
7
|
+
- [Example vite.config.ts](#vite)
|
8
|
+
- [Example index.html](#html)
|
9
|
+
- [Example index.js](#javascript)
|
10
|
+
- [Example index.sass](#sass)
|
11
|
+
- [Docs](#docs)
|
12
|
+
- [Parameters](#parameters)
|
13
|
+
- [REST API Object](#widget-object-from-the-rest-api)
|
14
|
+
- [Versioning](#versioning)
|
15
|
+
- [Copyright and License](#copyright-and-license)
|
16
16
|
|
17
17
|
# Quick Start
|
18
18
|
|
@@ -20,34 +20,32 @@ As a result, you will receive a website that can display various floor plans.
|
|
20
20
|
|
21
21
|

|
22
22
|
|
23
|
-
- Download NodeJS 18
|
24
|
-
- Create a new project
|
25
|
-
|
23
|
+
- Download NodeJS 18+
|
24
|
+
- Create a new project
|
25
|
+
```shell
|
26
|
+
npm init
|
26
27
|
```
|
27
|
-
|
28
|
-
|
29
|
-
npm install
|
30
|
-
npm install
|
28
|
+
- Download the required packages
|
29
|
+
```shell
|
30
|
+
npm install -S hart-estate-widget@4.0.0 # GFP Widget package
|
31
|
+
npm install -S -D vite # Vite bundler
|
32
|
+
npm install -S -D sass-embedded # Sass style compiler
|
31
33
|
```
|
32
|
-
- Example structure of project
|
34
|
+
- Example structure of project
|
33
35
|
```
|
34
36
|
.
|
35
|
-
├── package-lock.json
|
36
|
-
├── package.json
|
37
37
|
├── src
|
38
|
-
│ ├──
|
39
|
-
│
|
40
|
-
│
|
41
|
-
│
|
42
|
-
|
43
|
-
|
44
|
-
│ └── js
|
45
|
-
└ └── index.tsx
|
38
|
+
│ ├── index.html
|
39
|
+
│ ├── index.js
|
40
|
+
│ ├── index.sass
|
41
|
+
│ └── logo.png
|
42
|
+
├── package.json
|
43
|
+
└── package-lock.json
|
46
44
|
```
|
47
45
|
- Copy-paste sample assets from below.
|
48
|
-
- Run with `rm -rf dist && npx
|
46
|
+
- Run with `rm -rf dist && npx vite`
|
49
47
|
- Open browser at:
|
50
|
-
http://localhost:1234/?id=
|
48
|
+
http://localhost:1234/?id=73b833c3-072a-4ac2-9f5d-7f7ac3d1fc9c
|
51
49
|
|
52
50
|
> The query `id` parameter accepts the UUID4 received from [getfloorplan.com](https://getfloorplan.com)
|
53
51
|
> You can use these UUID4 for test purposes:
|
@@ -57,68 +55,94 @@ http://localhost:1234/?id=228ba1dd-64d3-4d33-bcd7-b4c670bed40e
|
|
57
55
|
> - Neutral style: `e8553134-0457-488c-8d3e-611b0e2be4d4`
|
58
56
|
> - Modern style: `73b833c3-072a-4ac2-9f5d-7f7ac3d1fc9c`
|
59
57
|
|
58
|
+
## VITE
|
59
|
+
Insert the example into a file `vite.config.ts`
|
60
|
+
|
61
|
+
```ts
|
62
|
+
import { defineConfig } from 'vite';
|
63
|
+
|
64
|
+
export default defineConfig({
|
65
|
+
root: 'src',
|
66
|
+
build: { outDir: '../dist' },
|
67
|
+
server: { port: 1234, open: true },
|
68
|
+
});
|
69
|
+
```
|
70
|
+
|
60
71
|
## HTML
|
61
72
|
Insert the example into a file `src/index.html`
|
62
73
|
|
63
74
|
```html
|
75
|
+
<!DOCTYPE html>
|
64
76
|
<html lang="en">
|
65
77
|
<head>
|
66
78
|
<meta charset="utf-8">
|
67
79
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0" />
|
68
|
-
<title>
|
69
|
-
|
70
|
-
<script src="./
|
80
|
+
<title>HART Estate Widget</title>
|
81
|
+
|
82
|
+
<script type="module" src="./index.js"></script>
|
83
|
+
<link rel="icon" href="./logo.png">
|
71
84
|
</head>
|
72
85
|
|
73
86
|
<body>
|
74
|
-
<
|
75
|
-
<div class="widget" id="widget"></div> <!--must match the first attribute in 'new Widget('#widget', options);' -->
|
76
|
-
</section>
|
87
|
+
<div id="widget"></div>
|
77
88
|
</body>
|
78
89
|
</html>
|
79
90
|
```
|
80
91
|
|
81
92
|
## JavaScript
|
82
|
-
Insert the example into a file `src/
|
93
|
+
Insert the example into a file `src/index.js`
|
83
94
|
|
84
95
|
```js
|
85
|
-
import {
|
86
|
-
import '../assets/sass/index.sass'; // style
|
87
|
-
import logo from '../assets/img/logo.png'; // logo
|
88
|
-
|
89
|
-
const WIDGET_API_URL = 'https://backend.estate.hart-digital.com';
|
96
|
+
import { Api } from 'hart-estate-widget/build/api.js'
|
90
97
|
|
91
|
-
const
|
92
|
-
|
98
|
+
const searchParams = new URLSearchParams(document.location.search);
|
99
|
+
const planId = searchParams.get('id');
|
100
|
+
const crmPlanId = searchParams.get('crmPlanId');
|
93
101
|
|
94
|
-
|
95
|
-
const planId = searchParams.get("id");
|
102
|
+
const baseUrl = 'https://backend.estate.hart-digital.com';
|
96
103
|
|
97
|
-
|
98
|
-
const
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
+
const loadData = async () => {
|
105
|
+
const {loadCrmWidgetData, loadWidgetData} = new Api(baseUrl);
|
106
|
+
return crmPlanId ? loadCrmWidgetData(crmPlanId) : loadWidgetData(planId);
|
107
|
+
};
|
108
|
+
const loadCreateWidget = async () => (await import('hart-estate-widget/build/createWidget.js')).createWidget;
|
109
|
+
const loadFovPlugin = async () => (await import('hart-estate-widget/build/plugins/FovPlugin.js')).FovPlugin;
|
110
|
+
const loadLogoUrl = async () => (await import('./logo.png')).default;
|
111
|
+
const loadStyle = async () => (await import('./index.sass')).default;
|
112
|
+
const loadDocument = async () => new Promise((resolve) => (window.onload = resolve));
|
113
|
+
|
114
|
+
const queue = [
|
115
|
+
loadData(),
|
116
|
+
loadCreateWidget(),
|
117
|
+
loadFovPlugin(),
|
118
|
+
loadLogoUrl(),
|
119
|
+
loadStyle(),
|
120
|
+
loadDocument(),
|
121
|
+
];
|
122
|
+
|
123
|
+
Promise.all(queue).then(([data, createWidget, FovPlugin, logoUrl]) => {
|
124
|
+
const options = {
|
125
|
+
baseUrl,
|
104
126
|
logoUrl,
|
105
|
-
|
106
|
-
}
|
127
|
+
logoLinkUrl: 'https://getfloorplan.com',
|
128
|
+
};
|
107
129
|
|
108
|
-
|
109
|
-
|
130
|
+
const plugins = [
|
131
|
+
new FovPlugin(2),
|
132
|
+
];
|
110
133
|
|
111
|
-
createWidget('
|
134
|
+
createWidget('#widget', data, options, plugins);
|
135
|
+
});
|
112
136
|
```
|
113
137
|
|
114
138
|
## SASS
|
115
|
-
Insert the example into a file `src/
|
139
|
+
Insert the example into a file `src/index.sass`
|
116
140
|
|
117
141
|
```sass
|
118
142
|
*, *:before, *:after
|
119
143
|
-webkit-font-smoothing: antialiased
|
120
144
|
-moz-osx-font-smoothing: grayscale
|
121
|
-
font-family: 'Proxima Nova'
|
145
|
+
font-family: 'Proxima Nova', sans-serif
|
122
146
|
text-decoration: none
|
123
147
|
font-weight: 400
|
124
148
|
color: #fff
|
@@ -128,281 +152,102 @@ Insert the example into a file `src/sass/index.sass`
|
|
128
152
|
box-sizing: border-box
|
129
153
|
-webkit-box-sizing: border-box
|
130
154
|
|
131
|
-
body
|
155
|
+
html, body
|
132
156
|
width: 100%
|
133
157
|
height: 100%
|
134
|
-
overflow: hidden
|
135
158
|
|
136
|
-
|
159
|
+
#widget
|
137
160
|
width: 100%
|
138
161
|
height: 100%
|
139
|
-
|
140
|
-
width: 100%
|
141
|
-
height: 100%
|
162
|
+
overflow: hidden
|
142
163
|
```
|
143
164
|
|
144
|
-
|
145
165
|
# Docs
|
146
166
|
## Parameters:
|
147
167
|
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
168
|
|
149
|
-
```
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
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
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
/** Array of scale keys used as filter, can be x05, x1, ... */
|
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 */
|
266
|
-
integrations: {
|
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
|
-
/** Crop transparent bounds in multimap */
|
328
|
-
crop_transparent?: true;
|
329
|
-
};
|
330
|
-
|
331
|
-
/** Options for Scene camera */
|
332
|
-
camera_options: {
|
333
|
-
/** Speed of fov changing per deltaTime */
|
334
|
-
fov_change_speed?: 0;
|
335
|
-
};
|
336
|
-
|
337
|
-
/** Options for Portal link graphics */
|
338
|
-
portal_options?: {
|
339
|
-
/** Use overlay div elements instead of three.js graphics */
|
340
|
-
use_overlay?: true;
|
341
|
-
/** Generate portals from stairs */
|
342
|
-
generate_from_stairs?: true;
|
343
|
-
};
|
344
|
-
|
345
|
-
/** Options for DefaultLink graphics */
|
346
|
-
lazy_load_options: {
|
347
|
-
/** Count panoramas to lazy load after move to another panorama */
|
348
|
-
preload_count: 3;
|
349
|
-
/** Force lazy load another non-loaded panoramas instead of skipping near cached panoramas */
|
350
|
-
force_preload_non_cached: true;
|
351
|
-
/** Preload depth maps */
|
352
|
-
use_masks_preload: true;
|
353
|
-
};
|
354
|
-
|
355
|
-
/** Widget branding data */
|
356
|
-
widget_branding: {
|
357
|
-
/** Branded logo path */
|
358
|
-
logo_path: 'https://es-logos.com/logo.png';
|
359
|
-
/** Branded company name */
|
360
|
-
company_name: 'ES Company';
|
361
|
-
/** Branded company url */
|
362
|
-
company_url: 'https://es.company.com';
|
363
|
-
/** Branded widget language (See locale/*) */
|
364
|
-
widget_language: 'es';
|
169
|
+
```json
|
170
|
+
{
|
171
|
+
// Widget API base URL
|
172
|
+
"baseUrl": "https://backend.estate.hart-digital.com",
|
173
|
+
|
174
|
+
// Widget locale can be one of
|
175
|
+
// "en" - English language
|
176
|
+
// "ru" - Russian language
|
177
|
+
// "de" - German language
|
178
|
+
// "es" - Spanish language
|
179
|
+
// "ja" - Japanese language
|
180
|
+
"locale": "en",
|
181
|
+
// Overrides locale keys with custom text or translation
|
182
|
+
"localeOverrides": {
|
183
|
+
"create-points": "Create a point",
|
184
|
+
"delete-points": "Remove point",
|
185
|
+
"research-plan": "Research plan",
|
186
|
+
"rotate-plan": "Rotate plan",
|
187
|
+
"ok": "Ok",
|
188
|
+
"ruler-ok": "Ok",
|
189
|
+
"made-by-link": "https://getfloorplan.com/",
|
190
|
+
"made-by-text": "getfloorplan.com",
|
191
|
+
"floor": "$0 floor",
|
192
|
+
"floorNumberEndings": {
|
193
|
+
"1": "$0st",
|
194
|
+
"2": "$0nd",
|
195
|
+
"3": "$0d",
|
196
|
+
"rest": "$0th"
|
197
|
+
}
|
198
|
+
},
|
199
|
+
|
200
|
+
// Path/link to the logo
|
201
|
+
"logoUrl": "https://getfloorplan.com/img/logo.58f6cd11.svg",
|
202
|
+
// Link opened when logo is clicked
|
203
|
+
"logoLinkUrl": "https://getfloorplan.com",
|
204
|
+
// Widget color settings in CSS color formal like: "rgba(255, 255, 255, 0)", "#ABCDEF", etc...
|
205
|
+
// "main" - main color of buttons, elements
|
206
|
+
// "mainText" - text color for buttons, elements contrasting with the main color
|
207
|
+
"colors": {
|
208
|
+
"main": "#FFA900",
|
209
|
+
"mainText": "#413E3E"
|
210
|
+
},
|
211
|
+
|
212
|
+
// First opened tab
|
213
|
+
"primaryTab": "panorama",
|
214
|
+
// Available widget tabs array with order:
|
215
|
+
// "panorama" - Panorama 360 tab
|
216
|
+
// "rotation" - Isometric plan rotation tab
|
217
|
+
// "plan" - Original plan tab
|
218
|
+
"tabs": ["plan", "rotation", "panorama"],
|
219
|
+
|
220
|
+
// Controls in bottom bar, can be:
|
221
|
+
// "ruler" - Ruler enable/disable button
|
222
|
+
// "scale" - Scale x1, x2, x0.5 button
|
223
|
+
// "autoRotate" - Auto rotate enable/disable button
|
224
|
+
"controls": ["ruler", "scale", "autoRotate"],
|
225
|
+
|
226
|
+
// Enable/disable modal of instruction in 3D tour
|
227
|
+
"isInstructionsVisible": true,
|
228
|
+
// Enable/disable auto rotation in 3D tour
|
229
|
+
"isAutoRotate": false,
|
230
|
+
// Enable/disable device gyroscope for AR
|
231
|
+
"isGyroscopeEnabled": true,
|
232
|
+
// Show/hide fullscreen button
|
233
|
+
"isFullscreenButtonVisible": true,
|
234
|
+
// Show/hide current room type top label
|
235
|
+
"isRoomLabelVisible": false,
|
236
|
+
|
237
|
+
// Camera persective FOV
|
238
|
+
"cameraFov": 75,
|
239
|
+
|
240
|
+
// Panorama fade time in seconds
|
241
|
+
"panoramaFadeTime": 0.5,
|
242
|
+
|
243
|
+
// Widget external integrations
|
244
|
+
"integrations": {
|
245
|
+
// https://docs.sentry.io/platforms/javascript/configuration/options/
|
246
|
+
"sentry": {
|
247
|
+
"dsn": "https://1234567890abcdef@sentry.com/12345"
|
248
|
+
}
|
365
249
|
}
|
366
|
-
|
367
|
-
/** Show/hide fullscreen button */
|
368
|
-
fullscreen_button_visible: false;
|
369
|
-
/** Show/hide room type label */
|
370
|
-
room_label_visible: false;
|
371
|
-
};
|
372
|
-
```
|
373
|
-
|
374
|
-
## Types of elements
|
375
|
-
```js
|
376
|
-
tabs: [
|
377
|
-
'rotation', // circular view images (order is mandatory)
|
378
|
-
'panorama', // 360° images
|
379
|
-
],
|
380
|
-
rotationMode: [
|
381
|
-
rotationModes.DEFAULT, // top view mode (multiple perspectives) and stylized plan view
|
382
|
-
rotationModes.THREESIXTY, // image scrolling mode for circular view
|
383
|
-
],
|
384
|
-
floors[0].rotate.type: [
|
385
|
-
'top_down', // full model
|
386
|
-
'middle_cut', // model with cut in the middle
|
387
|
-
],
|
388
|
-
floors[0].panorama.type: [
|
389
|
-
'sphere', // 360° panorama
|
390
|
-
'cube', // panorama with 6 images (top, down, left, right, front, back)
|
391
|
-
],
|
392
|
-
locale: [
|
393
|
-
'ru', // Russian language
|
394
|
-
'en', // English language
|
395
|
-
'es', // Spanish language
|
396
|
-
'de', // German language
|
397
|
-
'ja', // Japanese language
|
398
|
-
],
|
399
|
-
scales: [
|
400
|
-
'x05',
|
401
|
-
'x075',
|
402
|
-
'x1',
|
403
|
-
'x125',
|
404
|
-
'x2',
|
405
|
-
],
|
250
|
+
}
|
406
251
|
```
|
407
252
|
|
408
253
|
## Widget object from the REST API
|
@@ -410,43 +255,63 @@ scales: [
|
|
410
255
|
JSON object returned from backend
|
411
256
|
|
412
257
|
```js
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
}
|
258
|
+
export default {
|
259
|
+
primary_variant: "<id>", // primary variant to open
|
260
|
+
variants: [ // all plan variants
|
261
|
+
{
|
262
|
+
variant_info: {
|
263
|
+
style_name: "<name>", // the name of the variant style
|
264
|
+
is_renovation: true, // is there a renovation in the plan
|
265
|
+
},
|
266
|
+
plan_id: "<uuid>", // variant service plan uuid
|
267
|
+
json: "<url>", // json url for additional plan data
|
268
|
+
assets_path: "<path>", // plan assets base url
|
269
|
+
capabilities: { /*...*/ }, // plan capabilities
|
270
|
+
rendering_settings: { /*...*/ }, // plan rendering settings
|
271
|
+
|
272
|
+
primary_floor: 0, // primary plan floor index
|
273
|
+
floors: [ // plan floors
|
274
|
+
{
|
275
|
+
original_plan_img: "<url>", // absolute path to original plan image
|
276
|
+
miniplan_img: "<url>", // absolute path to miniplan image
|
277
|
+
|
278
|
+
top_view: {
|
279
|
+
image_template: "<template>", // template for top view decoding
|
280
|
+
room_ids_template: "<template>", // template for top view mask decoding
|
281
|
+
items: ["<filename>"], // top view image names
|
282
|
+
},
|
283
|
+
isometric_view: {
|
284
|
+
image_template: "<template>", // template for isometric images decoding
|
285
|
+
room_ids_template: "<template>", // template for isometric images masks decoding
|
286
|
+
items: ["<filename>"], // isometric images names
|
287
|
+
},
|
288
|
+
panorama_view: {
|
289
|
+
template: "<template>", // template for panorama image decoding
|
290
|
+
scene_depth_template: "<template>", // template for panorama depth image decoding
|
291
|
+
primary_camera_point_id: "<id>", // primary plan camera id
|
292
|
+
},
|
293
|
+
|
294
|
+
location: { X: 0, Y: 0, Z: 0 }, // floor location
|
295
|
+
height: 280, // floor height
|
296
|
+
|
297
|
+
vertices: [ /*...*/ ], // plan vertices data
|
298
|
+
rooms: [ /*...*/ ], // plan rooms data
|
299
|
+
camera_points: [ /*...*/ ], // plan camera points data
|
300
|
+
walls: [ /*...*/ ], // plan walls data
|
301
|
+
doors: [ /*...*/ ], // plan doors data
|
302
|
+
stairs: [ /*...*/ ], // plan stairs data
|
303
|
+
portals: [ /*...*/ ], // plan portals data
|
304
|
+
apertures: [ /*...*/ ], // plan apertures data
|
305
|
+
decors: [ /*...*/ ], // plan decors data
|
306
|
+
|
307
|
+
object_pairs: [], // color pairs for furniture data
|
308
|
+
room_pairs: [], // color pairs for room data
|
309
|
+
plan_meta: { /*...*/ }, // plan metadata
|
310
|
+
},
|
311
|
+
],
|
312
|
+
},
|
313
|
+
],
|
314
|
+
};
|
450
315
|
```
|
451
316
|
|
452
317
|
# Versioning
|