@3dsource/metabox-front-api 0.0.16 → 0.0.18

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/dist/index.esm.js CHANGED
@@ -1,8 +1,3 @@
1
- /*
2
- * Copyright (c) 2025.
3
- * 3DSource.com, Sergii Karanda steve@3dsource.com
4
- * All Rights Reserved
5
- */
6
1
  /**
7
2
  * To integrate the MetaBox configurator into an HTML element, use the following example:
8
3
  *
@@ -31,11 +26,6 @@ class ApiAction {
31
26
  }
32
27
  }
33
28
 
34
- /*
35
- * Copyright (c) 2025.
36
- * 3DSource.com, Sergii Karanda steve@3dsource.com
37
- * All Rights Reserved
38
- */
39
29
  const ToMetaBoxApiAction = {
40
30
  getPdf: 'getPdf',
41
31
  loadLevel: 'loadLevel',
@@ -54,13 +44,9 @@ const ToMetaBoxApiAction = {
54
44
  sendCommandToUnreal: 'sendCommandToUnreal',
55
45
  showOverlayInterface: 'showOverlayInterface',
56
46
  setEnvironmentMaterialById: 'setEnvironmentMaterialById',
47
+ resetCamera: 'resetCamera',
57
48
  };
58
49
 
59
- /*
60
- * Copyright (c) 2025.
61
- * 3DSource.com, Sergii Karanda steve@3dsource.com
62
- * All Rights Reserved
63
- */
64
50
  /**
65
51
  * {@inheritDoc ApiAction}
66
52
  *
@@ -70,7 +56,7 @@ const ToMetaBoxApiAction = {
70
56
  * This action sends a message to the MetaBox API to toggle the visibility of the Unreal overlay UI.
71
57
  *
72
58
  * @example
73
- * import { ShowOverlayInterface } from 'https://unpkg.com/@3dsource/metabox-front-api@latest/dist/index.js';
59
+ * import { ShowOverlayInterface } from 'https://cdn.jsdelivr.net/npm/@3dsource/metabox-front-api@latest/dist/index.js';
74
60
  * window.env3DSource.apiReady = (api) => {
75
61
  * new ShowOverlayInterface(true);
76
62
  * };
@@ -92,11 +78,6 @@ class ShowOverlayInterface extends ApiAction {
92
78
  }
93
79
  }
94
80
 
95
- /*
96
- * Copyright (c) 2025.
97
- * 3DSource.com, Sergii Karanda steve@3dsource.com
98
- * All Rights Reserved
99
- */
100
81
  /**
101
82
  * {@inheritDoc ApiAction}
102
83
  *
@@ -106,7 +87,7 @@ class ShowOverlayInterface extends ApiAction {
106
87
  * This action sends a message to the MetaBox API to toggle the visibility of the embedded menu.
107
88
  *
108
89
  * @example
109
- * import { ShowEmbeddedMenu } from 'https://unpkg.com/@3dsource/metabox-front-api@latest/dist/index.js';
90
+ * import { ShowEmbeddedMenu } from 'https://cdn.jsdelivr.net/npm/@3dsource/metabox-front-api@latest/dist/index.js';
110
91
  * window.env3DSource.apiReady = (api) => {
111
92
  * new ShowEmbeddedMenu(true);
112
93
  * };
@@ -128,11 +109,6 @@ class ShowEmbeddedMenu extends ApiAction {
128
109
  }
129
110
  }
130
111
 
131
- /*
132
- * Copyright (c) 2025.
133
- * 3DSource.com, Sergii Karanda steve@3dsource.com
134
- * All Rights Reserved
135
- */
136
112
  /**
137
113
  * {@inheritDoc ApiAction}
138
114
  *
@@ -141,7 +117,7 @@ class ShowEmbeddedMenu extends ApiAction {
141
117
  * This action sends a message to the MetaBox API to load the environment level using the specified environment ID.
142
118
  *
143
119
  * @example
144
- * import { SetEnvironment } from 'https://unpkg.com/@3dsource/metabox-front-api@latest/dist/index.js';
120
+ * import { SetEnvironment } from 'https://cdn.jsdelivr.net/npm/@3dsource/metabox-front-api@latest/dist/index.js';
145
121
  * window.env3DSource.apiReady = (api) => {
146
122
  * // Change the environment to '55555555-1234-1234-1234-01234567890'
147
123
  * new SetEnvironment('55555555-1234-1234-1234-01234567890');
@@ -164,11 +140,6 @@ class SetEnvironment extends ApiAction {
164
140
  }
165
141
  }
166
142
 
167
- /*
168
- * Copyright (c) 2025.
169
- * 3DSource.com, Sergii Karanda steve@3dsource.com
170
- * All Rights Reserved
171
- */
172
143
  /**
173
144
  * {@inheritDoc ApiAction}
174
145
  *
@@ -178,7 +149,7 @@ class SetEnvironment extends ApiAction {
178
149
  * This action sends a message to the MetaBox API to set a product using the provided product ID.
179
150
  *
180
151
  * @example
181
- * import { SetProduct } from 'https://unpkg.com/@3dsource/metabox-front-api@latest/dist/index.js';
152
+ * import { SetProduct } from 'https://cdn.jsdelivr.net/npm/@3dsource/metabox-front-api@latest/dist/index.js';
182
153
  * window.env3DSource.apiReady = (api) => {
183
154
  * new SetProduct(
184
155
  * 'ffea6b5c-3a8a-4f56-9417-e605acb5cca3'
@@ -202,11 +173,6 @@ class SetProduct extends ApiAction {
202
173
  }
203
174
  }
204
175
 
205
- /*
206
- * Copyright (c) 2025.
207
- * 3DSource.com, Sergii Karanda steve@3dsource.com
208
- * All Rights Reserved
209
- */
210
176
  /**
211
177
  * {@inheritDoc ApiAction}
212
178
  *
@@ -218,7 +184,7 @@ class SetProduct extends ApiAction {
218
184
  * **Important**: Invoking this action will buffer it until the viewport is ready. Only then will the request be processed.
219
185
  *
220
186
  * @example
221
- * import { GetPdf } from 'https://unpkg.com/@3dsource/metabox-front-api@latest/dist/index.js';
187
+ * import { GetPdf } from 'https://cdn.jsdelivr.net/npm/@3dsource/metabox-front-api@latest/dist/index.js';
222
188
  * window.env3DSource.apiReady = (api) => {
223
189
  * new GetPdf();
224
190
  * };
@@ -238,11 +204,6 @@ class GetPdf extends ApiAction {
238
204
  }
239
205
  }
240
206
 
241
- /*
242
- * Copyright (c) 2025.
243
- * 3DSource.com, Sergii Karanda steve@3dsource.com
244
- * All Rights Reserved
245
- */
246
207
  /**
247
208
  * {@inheritDoc ApiAction}
248
209
  *
@@ -252,7 +213,7 @@ class GetPdf extends ApiAction {
252
213
  * This action sends a message to the MetaBox API to update the material on a specific product slot using the provided identifiers.
253
214
  *
254
215
  * @example
255
- * import { SetMaterial } from 'https://unpkg.com/@3dsource/metabox-front-api@latest/dist/index.js';
216
+ * import { SetMaterial } from 'https://cdn.jsdelivr.net/npm/@3dsource/metabox-front-api@latest/dist/index.js';
256
217
  * window.env3DSource.apiReady = (api) => {
257
218
  * new SetMaterial(
258
219
  * 'ffea6b5c-3a8a-4f56-9417-e605acb5cca3',
@@ -282,11 +243,6 @@ class SetMaterial extends ApiAction {
282
243
  }
283
244
  }
284
245
 
285
- /*
286
- * Copyright (c) 2025.
287
- * 3DSource.com, Sergii Karanda steve@3dsource.com
288
- * All Rights Reserved
289
- */
290
246
  /**
291
247
  * {@inheritDoc ApiAction}
292
248
  *
@@ -296,7 +252,7 @@ class SetMaterial extends ApiAction {
296
252
  * This action sends a message to the MetaBox API to update the material on a specific environment slot using the provided identifiers.
297
253
  *
298
254
  * @example
299
- * import { SetEnvironmentMaterial } from 'https://unpkg.com/@3dsource/metabox-front-api@latest/dist/index.js';
255
+ * import { SetEnvironmentMaterial } from 'https://cdn.jsdelivr.net/npm/@3dsource/metabox-front-api@latest/dist/index.js';
300
256
  * window.env3DSource.apiReady = (api) => {
301
257
  * new SetEnvironmentMaterial(
302
258
  * 'ffea6b5c-3a8a-4f56-9417-e605acb5cca3',
@@ -326,11 +282,6 @@ class SetEnvironmentMaterial extends ApiAction {
326
282
  }
327
283
  }
328
284
 
329
- /*
330
- * Copyright (c) 2025.
331
- * 3DSource.com, Sergii Karanda steve@3dsource.com
332
- * All Rights Reserved
333
- */
334
285
  /**
335
286
  * {@inheritDoc ApiAction}
336
287
  *
@@ -341,7 +292,7 @@ class SetEnvironmentMaterial extends ApiAction {
341
292
  * **Important**: Invoking this action will buffer it until the viewport is ready. Only then will the request be processed.
342
293
  *
343
294
  * @example
344
- * import { GetFastRender,saveImage } from 'https://unpkg.com/@3dsource/metabox-front-api@latest/dist/index.js';
295
+ * import { GetFastRender,saveImage } from 'https://cdn.jsdelivr.net/npm/@3dsource/metabox-front-api@latest/dist/index.js';
345
296
  * window.env3DSource.apiReady = (api) => {
346
297
  * // Listen for events from the MetaBox API
347
298
  * api.addEventListener('metaboxData', (data) => {
@@ -371,11 +322,6 @@ class GetFastRender extends ApiAction {
371
322
  }
372
323
  }
373
324
 
374
- /*
375
- * Copyright (c) 2025.
376
- * 3DSource.com, Sergii Karanda steve@3dsource.com
377
- * All Rights Reserved
378
- */
379
325
  /**
380
326
  * {@inheritDoc ApiAction}
381
327
  * @internal
@@ -392,11 +338,6 @@ class SendCommandToUnreal extends ApiAction {
392
338
  }
393
339
  }
394
340
 
395
- /*
396
- * Copyright (c) 2025.
397
- * 3DSource.com, Sergii Karanda steve@3dsource.com
398
- * All Rights Reserved
399
- */
400
341
  /**
401
342
  * @experimental
402
343
  * @internal
@@ -420,11 +361,6 @@ class WatchCallbacks extends ApiAction {
420
361
  }
421
362
  }
422
363
 
423
- /*
424
- * Copyright (c) 2025.
425
- * 3DSource.com, Sergii Karanda steve@3dsource.com
426
- * All Rights Reserved
427
- */
428
364
  /**
429
365
  * EventDispatcher is a class that manages event listeners and dispatches events to them.
430
366
  */
@@ -469,11 +405,6 @@ class EventDispatcher {
469
405
  }
470
406
  }
471
407
 
472
- /*
473
- * Copyright (c) 2025.
474
- * 3DSource.com, Sergii Karanda steve@3dsource.com
475
- * All Rights Reserved
476
- */
477
408
  const binderMessageType = 'metaboxData';
478
409
  /**
479
410
  * API class to handle communication with the embedded content.
@@ -568,11 +499,6 @@ class Communicator extends EventDispatcher {
568
499
  */
569
500
  Communicator.instance = null;
570
501
 
571
- /*
572
- * Copyright (c) 2025.
573
- * 3DSource.com, Sergii Karanda steve@3dsource.com
574
- * All Rights Reserved
575
- */
576
502
  /**
577
503
  * Integrates the MetaBox into the provided layout.
578
504
  *
@@ -595,7 +521,7 @@ Communicator.instance = null;
595
521
  * @example
596
522
  * import {
597
523
  * integrateMetaBox,
598
- * } from 'https://unpkg.com/@3dsource/metabox-front-api@latest/dist/index.js';
524
+ * } from 'https://cdn.jsdelivr.net/npm/@3dsource/metabox-front-api@latest/dist/index.js';
599
525
  *
600
526
  * integrateMetaBox(
601
527
  * 'https://metabox.3dsource.com/metabox-configurator/basic/12345678-1234-1234-1234-01234567890?introImage=https://example.com/intro.webp&sidebar=false',
@@ -609,13 +535,13 @@ function integrateMetaBox(iframeSrc, containerId = 'embed3DSource') {
609
535
  }
610
536
  Communicator.createInstance();
611
537
  const style = document.createElement('style');
612
- style.innerHTML = `
613
- #${containerId} {
614
- width: 100%;
615
- height: 100%;
616
- overflow: hidden;
617
- position: relative;
618
- }
538
+ style.innerHTML = `
539
+ #${containerId} {
540
+ width: 100%;
541
+ height: 100%;
542
+ overflow: hidden;
543
+ position: relative;
544
+ }
619
545
  `;
620
546
  document.head.appendChild(style);
621
547
  const iframe = document.createElement('iframe');
@@ -629,11 +555,6 @@ function integrateMetaBox(iframeSrc, containerId = 'embed3DSource') {
629
555
  container.appendChild(iframe);
630
556
  }
631
557
 
632
- /*
633
- * Copyright (c) 2025.
634
- * 3DSource.com, Sergii Karanda steve@3dsource.com
635
- * All Rights Reserved
636
- */
637
558
  /**
638
559
  * Saves an image by triggering a download.
639
560
  *
@@ -653,11 +574,6 @@ function saveImage(image, filename) {
653
574
  document.body.removeChild(a);
654
575
  }
655
576
 
656
- /*
657
- * Copyright (c) 2025.
658
- * 3DSource.com, Sergii Karanda steve@3dsource.com
659
- * All Rights Reserved
660
- */
661
577
  /**
662
578
  * Pauses execution for a specified duration.
663
579
  *
@@ -671,11 +587,6 @@ function sleep(time) {
671
587
  return new Promise((resolve) => setTimeout(resolve, time));
672
588
  }
673
589
 
674
- /*
675
- * Copyright (c) 2025.
676
- * 3DSource.com, Sergii Karanda steve@3dsource.com
677
- * All Rights Reserved
678
- */
679
590
  /**
680
591
  * Sets the URL parameters based on the provided state.
681
592
  *
@@ -709,11 +620,6 @@ function getUrlParams() {
709
620
  return selections;
710
621
  }
711
622
 
712
- /*
713
- * Copyright (c) 2025.
714
- * 3DSource.com, Sergii Karanda steve@3dsource.com
715
- * All Rights Reserved
716
- */
717
623
  const FromMetaboxApiAction = {
718
624
  bridge: 'bridge',
719
625
  appLoaded: 'appLoaded',
@@ -759,7 +665,7 @@ const FromMetaboxApiAction = {
759
665
  videoSize: 'videoSize',
760
666
  /**
761
667
  * @hidden
762
- * Used in platform, must be removed in future
668
+ * Used in a platform, must be removed in future
763
669
  * @deprecated
764
670
  */
765
671
  unrealResponse: 'unrealResponse',
@@ -770,11 +676,6 @@ const FromMetaboxApiAction = {
770
676
  getFastRender: 'getFastRender',
771
677
  };
772
678
 
773
- /*
774
- * Copyright (c) 2025.
775
- * 3DSource.com, Sergii Karanda steve@3dsource.com
776
- * All Rights Reserved
777
- */
778
679
  const APPLICATION_DEVICE_TYPES = {
779
680
  deviceTypeAuto: 'deviceTypeAuto',
780
681
  deviceTypeMobile: 'deviceTypeMobile',
@@ -1 +1 @@
1
- {"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/dist/index.umd.js CHANGED
@@ -4,11 +4,6 @@
4
4
  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["metabox-front-api"] = {}));
5
5
  })(this, (function (exports) { 'use strict';
6
6
 
7
- /*
8
- * Copyright (c) 2025.
9
- * 3DSource.com, Sergii Karanda steve@3dsource.com
10
- * All Rights Reserved
11
- */
12
7
  /**
13
8
  * To integrate the MetaBox configurator into an HTML element, use the following example:
14
9
  *
@@ -37,11 +32,6 @@
37
32
  }
38
33
  }
39
34
 
40
- /*
41
- * Copyright (c) 2025.
42
- * 3DSource.com, Sergii Karanda steve@3dsource.com
43
- * All Rights Reserved
44
- */
45
35
  const ToMetaBoxApiAction = {
46
36
  getPdf: 'getPdf',
47
37
  loadLevel: 'loadLevel',
@@ -60,13 +50,9 @@
60
50
  sendCommandToUnreal: 'sendCommandToUnreal',
61
51
  showOverlayInterface: 'showOverlayInterface',
62
52
  setEnvironmentMaterialById: 'setEnvironmentMaterialById',
53
+ resetCamera: 'resetCamera',
63
54
  };
64
55
 
65
- /*
66
- * Copyright (c) 2025.
67
- * 3DSource.com, Sergii Karanda steve@3dsource.com
68
- * All Rights Reserved
69
- */
70
56
  /**
71
57
  * {@inheritDoc ApiAction}
72
58
  *
@@ -76,7 +62,7 @@
76
62
  * This action sends a message to the MetaBox API to toggle the visibility of the Unreal overlay UI.
77
63
  *
78
64
  * @example
79
- * import { ShowOverlayInterface } from 'https://unpkg.com/@3dsource/metabox-front-api@latest/dist/index.js';
65
+ * import { ShowOverlayInterface } from 'https://cdn.jsdelivr.net/npm/@3dsource/metabox-front-api@latest/dist/index.js';
80
66
  * window.env3DSource.apiReady = (api) => {
81
67
  * new ShowOverlayInterface(true);
82
68
  * };
@@ -98,11 +84,6 @@
98
84
  }
99
85
  }
100
86
 
101
- /*
102
- * Copyright (c) 2025.
103
- * 3DSource.com, Sergii Karanda steve@3dsource.com
104
- * All Rights Reserved
105
- */
106
87
  /**
107
88
  * {@inheritDoc ApiAction}
108
89
  *
@@ -112,7 +93,7 @@
112
93
  * This action sends a message to the MetaBox API to toggle the visibility of the embedded menu.
113
94
  *
114
95
  * @example
115
- * import { ShowEmbeddedMenu } from 'https://unpkg.com/@3dsource/metabox-front-api@latest/dist/index.js';
96
+ * import { ShowEmbeddedMenu } from 'https://cdn.jsdelivr.net/npm/@3dsource/metabox-front-api@latest/dist/index.js';
116
97
  * window.env3DSource.apiReady = (api) => {
117
98
  * new ShowEmbeddedMenu(true);
118
99
  * };
@@ -134,11 +115,6 @@
134
115
  }
135
116
  }
136
117
 
137
- /*
138
- * Copyright (c) 2025.
139
- * 3DSource.com, Sergii Karanda steve@3dsource.com
140
- * All Rights Reserved
141
- */
142
118
  /**
143
119
  * {@inheritDoc ApiAction}
144
120
  *
@@ -147,7 +123,7 @@
147
123
  * This action sends a message to the MetaBox API to load the environment level using the specified environment ID.
148
124
  *
149
125
  * @example
150
- * import { SetEnvironment } from 'https://unpkg.com/@3dsource/metabox-front-api@latest/dist/index.js';
126
+ * import { SetEnvironment } from 'https://cdn.jsdelivr.net/npm/@3dsource/metabox-front-api@latest/dist/index.js';
151
127
  * window.env3DSource.apiReady = (api) => {
152
128
  * // Change the environment to '55555555-1234-1234-1234-01234567890'
153
129
  * new SetEnvironment('55555555-1234-1234-1234-01234567890');
@@ -170,11 +146,6 @@
170
146
  }
171
147
  }
172
148
 
173
- /*
174
- * Copyright (c) 2025.
175
- * 3DSource.com, Sergii Karanda steve@3dsource.com
176
- * All Rights Reserved
177
- */
178
149
  /**
179
150
  * {@inheritDoc ApiAction}
180
151
  *
@@ -184,7 +155,7 @@
184
155
  * This action sends a message to the MetaBox API to set a product using the provided product ID.
185
156
  *
186
157
  * @example
187
- * import { SetProduct } from 'https://unpkg.com/@3dsource/metabox-front-api@latest/dist/index.js';
158
+ * import { SetProduct } from 'https://cdn.jsdelivr.net/npm/@3dsource/metabox-front-api@latest/dist/index.js';
188
159
  * window.env3DSource.apiReady = (api) => {
189
160
  * new SetProduct(
190
161
  * 'ffea6b5c-3a8a-4f56-9417-e605acb5cca3'
@@ -208,11 +179,6 @@
208
179
  }
209
180
  }
210
181
 
211
- /*
212
- * Copyright (c) 2025.
213
- * 3DSource.com, Sergii Karanda steve@3dsource.com
214
- * All Rights Reserved
215
- */
216
182
  /**
217
183
  * {@inheritDoc ApiAction}
218
184
  *
@@ -224,7 +190,7 @@
224
190
  * **Important**: Invoking this action will buffer it until the viewport is ready. Only then will the request be processed.
225
191
  *
226
192
  * @example
227
- * import { GetPdf } from 'https://unpkg.com/@3dsource/metabox-front-api@latest/dist/index.js';
193
+ * import { GetPdf } from 'https://cdn.jsdelivr.net/npm/@3dsource/metabox-front-api@latest/dist/index.js';
228
194
  * window.env3DSource.apiReady = (api) => {
229
195
  * new GetPdf();
230
196
  * };
@@ -244,11 +210,6 @@
244
210
  }
245
211
  }
246
212
 
247
- /*
248
- * Copyright (c) 2025.
249
- * 3DSource.com, Sergii Karanda steve@3dsource.com
250
- * All Rights Reserved
251
- */
252
213
  /**
253
214
  * {@inheritDoc ApiAction}
254
215
  *
@@ -258,7 +219,7 @@
258
219
  * This action sends a message to the MetaBox API to update the material on a specific product slot using the provided identifiers.
259
220
  *
260
221
  * @example
261
- * import { SetMaterial } from 'https://unpkg.com/@3dsource/metabox-front-api@latest/dist/index.js';
222
+ * import { SetMaterial } from 'https://cdn.jsdelivr.net/npm/@3dsource/metabox-front-api@latest/dist/index.js';
262
223
  * window.env3DSource.apiReady = (api) => {
263
224
  * new SetMaterial(
264
225
  * 'ffea6b5c-3a8a-4f56-9417-e605acb5cca3',
@@ -288,11 +249,6 @@
288
249
  }
289
250
  }
290
251
 
291
- /*
292
- * Copyright (c) 2025.
293
- * 3DSource.com, Sergii Karanda steve@3dsource.com
294
- * All Rights Reserved
295
- */
296
252
  /**
297
253
  * {@inheritDoc ApiAction}
298
254
  *
@@ -302,7 +258,7 @@
302
258
  * This action sends a message to the MetaBox API to update the material on a specific environment slot using the provided identifiers.
303
259
  *
304
260
  * @example
305
- * import { SetEnvironmentMaterial } from 'https://unpkg.com/@3dsource/metabox-front-api@latest/dist/index.js';
261
+ * import { SetEnvironmentMaterial } from 'https://cdn.jsdelivr.net/npm/@3dsource/metabox-front-api@latest/dist/index.js';
306
262
  * window.env3DSource.apiReady = (api) => {
307
263
  * new SetEnvironmentMaterial(
308
264
  * 'ffea6b5c-3a8a-4f56-9417-e605acb5cca3',
@@ -332,11 +288,6 @@
332
288
  }
333
289
  }
334
290
 
335
- /*
336
- * Copyright (c) 2025.
337
- * 3DSource.com, Sergii Karanda steve@3dsource.com
338
- * All Rights Reserved
339
- */
340
291
  /**
341
292
  * {@inheritDoc ApiAction}
342
293
  *
@@ -347,7 +298,7 @@
347
298
  * **Important**: Invoking this action will buffer it until the viewport is ready. Only then will the request be processed.
348
299
  *
349
300
  * @example
350
- * import { GetFastRender,saveImage } from 'https://unpkg.com/@3dsource/metabox-front-api@latest/dist/index.js';
301
+ * import { GetFastRender,saveImage } from 'https://cdn.jsdelivr.net/npm/@3dsource/metabox-front-api@latest/dist/index.js';
351
302
  * window.env3DSource.apiReady = (api) => {
352
303
  * // Listen for events from the MetaBox API
353
304
  * api.addEventListener('metaboxData', (data) => {
@@ -377,11 +328,6 @@
377
328
  }
378
329
  }
379
330
 
380
- /*
381
- * Copyright (c) 2025.
382
- * 3DSource.com, Sergii Karanda steve@3dsource.com
383
- * All Rights Reserved
384
- */
385
331
  /**
386
332
  * {@inheritDoc ApiAction}
387
333
  * @internal
@@ -398,11 +344,6 @@
398
344
  }
399
345
  }
400
346
 
401
- /*
402
- * Copyright (c) 2025.
403
- * 3DSource.com, Sergii Karanda steve@3dsource.com
404
- * All Rights Reserved
405
- */
406
347
  /**
407
348
  * @experimental
408
349
  * @internal
@@ -426,11 +367,6 @@
426
367
  }
427
368
  }
428
369
 
429
- /*
430
- * Copyright (c) 2025.
431
- * 3DSource.com, Sergii Karanda steve@3dsource.com
432
- * All Rights Reserved
433
- */
434
370
  /**
435
371
  * EventDispatcher is a class that manages event listeners and dispatches events to them.
436
372
  */
@@ -475,11 +411,6 @@
475
411
  }
476
412
  }
477
413
 
478
- /*
479
- * Copyright (c) 2025.
480
- * 3DSource.com, Sergii Karanda steve@3dsource.com
481
- * All Rights Reserved
482
- */
483
414
  const binderMessageType = 'metaboxData';
484
415
  /**
485
416
  * API class to handle communication with the embedded content.
@@ -574,11 +505,6 @@
574
505
  */
575
506
  Communicator.instance = null;
576
507
 
577
- /*
578
- * Copyright (c) 2025.
579
- * 3DSource.com, Sergii Karanda steve@3dsource.com
580
- * All Rights Reserved
581
- */
582
508
  /**
583
509
  * Integrates the MetaBox into the provided layout.
584
510
  *
@@ -601,7 +527,7 @@
601
527
  * @example
602
528
  * import {
603
529
  * integrateMetaBox,
604
- * } from 'https://unpkg.com/@3dsource/metabox-front-api@latest/dist/index.js';
530
+ * } from 'https://cdn.jsdelivr.net/npm/@3dsource/metabox-front-api@latest/dist/index.js';
605
531
  *
606
532
  * integrateMetaBox(
607
533
  * 'https://metabox.3dsource.com/metabox-configurator/basic/12345678-1234-1234-1234-01234567890?introImage=https://example.com/intro.webp&sidebar=false',
@@ -615,13 +541,13 @@
615
541
  }
616
542
  Communicator.createInstance();
617
543
  const style = document.createElement('style');
618
- style.innerHTML = `
619
- #${containerId} {
620
- width: 100%;
621
- height: 100%;
622
- overflow: hidden;
623
- position: relative;
624
- }
544
+ style.innerHTML = `
545
+ #${containerId} {
546
+ width: 100%;
547
+ height: 100%;
548
+ overflow: hidden;
549
+ position: relative;
550
+ }
625
551
  `;
626
552
  document.head.appendChild(style);
627
553
  const iframe = document.createElement('iframe');
@@ -635,11 +561,6 @@
635
561
  container.appendChild(iframe);
636
562
  }
637
563
 
638
- /*
639
- * Copyright (c) 2025.
640
- * 3DSource.com, Sergii Karanda steve@3dsource.com
641
- * All Rights Reserved
642
- */
643
564
  /**
644
565
  * Saves an image by triggering a download.
645
566
  *
@@ -659,11 +580,6 @@
659
580
  document.body.removeChild(a);
660
581
  }
661
582
 
662
- /*
663
- * Copyright (c) 2025.
664
- * 3DSource.com, Sergii Karanda steve@3dsource.com
665
- * All Rights Reserved
666
- */
667
583
  /**
668
584
  * Pauses execution for a specified duration.
669
585
  *
@@ -677,11 +593,6 @@
677
593
  return new Promise((resolve) => setTimeout(resolve, time));
678
594
  }
679
595
 
680
- /*
681
- * Copyright (c) 2025.
682
- * 3DSource.com, Sergii Karanda steve@3dsource.com
683
- * All Rights Reserved
684
- */
685
596
  /**
686
597
  * Sets the URL parameters based on the provided state.
687
598
  *
@@ -715,11 +626,6 @@
715
626
  return selections;
716
627
  }
717
628
 
718
- /*
719
- * Copyright (c) 2025.
720
- * 3DSource.com, Sergii Karanda steve@3dsource.com
721
- * All Rights Reserved
722
- */
723
629
  const FromMetaboxApiAction = {
724
630
  bridge: 'bridge',
725
631
  appLoaded: 'appLoaded',
@@ -765,7 +671,7 @@
765
671
  videoSize: 'videoSize',
766
672
  /**
767
673
  * @hidden
768
- * Used in platform, must be removed in future
674
+ * Used in a platform, must be removed in future
769
675
  * @deprecated
770
676
  */
771
677
  unrealResponse: 'unrealResponse',
@@ -776,11 +682,6 @@
776
682
  getFastRender: 'getFastRender',
777
683
  };
778
684
 
779
- /*
780
- * Copyright (c) 2025.
781
- * 3DSource.com, Sergii Karanda steve@3dsource.com
782
- * All Rights Reserved
783
- */
784
685
  const APPLICATION_DEVICE_TYPES = {
785
686
  deviceTypeAuto: 'deviceTypeAuto',
786
687
  deviceTypeMobile: 'deviceTypeMobile',
@@ -1 +1 @@
1
- {"version":3,"file":"index.umd.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.umd.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}