@3dsource/metabox-front-api 1.2.2-dev.4 → 1.2.2
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 +1715 -164
- package/fesm2022/3dsource-metabox-front-api.mjs +48 -50
- package/fesm2022/3dsource-metabox-front-api.mjs.map +1 -1
- package/index.d.ts +126 -70
- package/package.json +1 -4
package/index.d.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { MetaBoxCommandPacket } from '@3dsource/types-unreal';
|
|
2
|
-
import { UnrealCallBackJson, UnrealState, StreamResolutionProps } from '@3dsource/angular-unreal-module';
|
|
3
1
|
import { Observable } from 'rxjs';
|
|
4
2
|
|
|
5
3
|
type ApplicationDeviceTypes = 'deviceTypeAuto' | 'deviceTypeMobile' | 'deviceTypeDesktop';
|
|
@@ -29,7 +27,6 @@ declare const MetaboxBasicConfiguratorActions: {
|
|
|
29
27
|
readonly setEnvironmentMaterialById: "setEnvironmentMaterialById";
|
|
30
28
|
readonly setProduct: "setProduct";
|
|
31
29
|
readonly setMaterialById: "setMaterialById";
|
|
32
|
-
readonly sendCommandToUnreal: "sendCommandToUnreal";
|
|
33
30
|
readonly getPdf: "getPdf";
|
|
34
31
|
readonly getScreenshot: "getScreenshot";
|
|
35
32
|
readonly getFastRender: "getFastRender";
|
|
@@ -42,8 +39,9 @@ declare const MetaboxBasicConfiguratorActions: {
|
|
|
42
39
|
readonly playShowcase: "playShowcase";
|
|
43
40
|
readonly pauseShowcase: "pauseShowcase";
|
|
44
41
|
readonly stopShowcase: "stopShowcase";
|
|
45
|
-
readonly
|
|
42
|
+
readonly sendCommandToUnreal: "sendCommandToUnreal";
|
|
46
43
|
readonly addResponse: "addResponse";
|
|
44
|
+
readonly watchCallbacks: "watchCallbacks";
|
|
47
45
|
};
|
|
48
46
|
type ToMetaBoxActions = (typeof MetaboxBasicConfiguratorActions)[keyof typeof MetaboxBasicConfiguratorActions];
|
|
49
47
|
/**
|
|
@@ -64,13 +62,11 @@ interface ToMetaboxMessagePayloads {
|
|
|
64
62
|
};
|
|
65
63
|
/**
|
|
66
64
|
* @deprecated
|
|
67
|
-
* @hidden
|
|
65
|
+
* @hidden use
|
|
66
|
+
* {@link MetaboxBasicConfiguratorActions.watchCallbacks}
|
|
68
67
|
*/
|
|
69
68
|
[MetaboxBasicConfiguratorActions.addResponse]: void;
|
|
70
|
-
|
|
71
|
-
* @deprecated
|
|
72
|
-
* @hidden
|
|
73
|
-
*/
|
|
69
|
+
[MetaboxBasicConfiguratorActions.watchCallbacks]: void;
|
|
74
70
|
[MetaboxBasicConfiguratorActions.getFastRender]: {
|
|
75
71
|
format: MimeType;
|
|
76
72
|
size?: {
|
|
@@ -85,12 +81,10 @@ interface ToMetaboxMessagePayloads {
|
|
|
85
81
|
y: number;
|
|
86
82
|
};
|
|
87
83
|
};
|
|
88
|
-
[MetaboxBasicConfiguratorActions.watchCallbacks]: void;
|
|
89
84
|
[MetaboxBasicConfiguratorActions.setMaterialById]: {
|
|
90
85
|
slotId: string;
|
|
91
86
|
materialId: string;
|
|
92
87
|
};
|
|
93
|
-
[MetaboxBasicConfiguratorActions.sendCommandToUnreal]: MetaBoxCommandPacket;
|
|
94
88
|
[MetaboxBasicConfiguratorActions.setEnvironmentMaterialById]: {
|
|
95
89
|
slotId: string;
|
|
96
90
|
materialId: string;
|
|
@@ -114,6 +108,7 @@ interface ToMetaboxMessagePayloads {
|
|
|
114
108
|
[MetaboxBasicConfiguratorActions.playShowcase]: void;
|
|
115
109
|
[MetaboxBasicConfiguratorActions.pauseShowcase]: void;
|
|
116
110
|
[MetaboxBasicConfiguratorActions.stopShowcase]: void;
|
|
111
|
+
[MetaboxBasicConfiguratorActions.sendCommandToUnreal]: object;
|
|
117
112
|
}
|
|
118
113
|
interface ToMetaBoxMessageEnvelope {
|
|
119
114
|
action: ToMetaBoxActions;
|
|
@@ -173,6 +168,7 @@ interface UniversalConfigurator {
|
|
|
173
168
|
environments: UniversalConfiguratorEnvironment[];
|
|
174
169
|
/** The camera settings used in the configurator. */
|
|
175
170
|
/** Indicates if the configurator is active. */
|
|
171
|
+
isActive: boolean;
|
|
176
172
|
/** GraphQL typename for the configurator. */
|
|
177
173
|
__typename: 'UniversalConfigurator';
|
|
178
174
|
}
|
|
@@ -210,6 +206,7 @@ interface Product {
|
|
|
210
206
|
/** Unique external id for the product. */
|
|
211
207
|
externalId: string;
|
|
212
208
|
/** Showcase details for the product. */
|
|
209
|
+
showcase?: Showcase;
|
|
213
210
|
/** GraphQL typename for the product. */
|
|
214
211
|
__typename: 'Product';
|
|
215
212
|
}
|
|
@@ -270,6 +267,28 @@ interface Material {
|
|
|
270
267
|
/** GraphQL typename for the material. */
|
|
271
268
|
__typename: 'Material';
|
|
272
269
|
}
|
|
270
|
+
/**
|
|
271
|
+
* Details showcase the presentation of a product.
|
|
272
|
+
*/
|
|
273
|
+
interface Showcase {
|
|
274
|
+
/** A list of low-bandwidth versions for the showcase (optional). */
|
|
275
|
+
lowBandwidth?: (Timecode | null)[] | null;
|
|
276
|
+
/** Duration for the showcase (optional). */
|
|
277
|
+
duration?: number;
|
|
278
|
+
/** GraphQL typename for the showcase. */
|
|
279
|
+
__typename: 'Showcase';
|
|
280
|
+
}
|
|
281
|
+
/**
|
|
282
|
+
* Represents a low-bandwidth entity used in showcases in LBM mode.
|
|
283
|
+
*/
|
|
284
|
+
interface Timecode {
|
|
285
|
+
/** Time marker for the entity. */
|
|
286
|
+
time: number;
|
|
287
|
+
/** Duration of the entity display. */
|
|
288
|
+
duration: number;
|
|
289
|
+
/** GraphQL typename (as a string, flexible type). */
|
|
290
|
+
__typename: 'Timecode';
|
|
291
|
+
}
|
|
273
292
|
/**
|
|
274
293
|
* Represents the environment settings for a universal configurator.
|
|
275
294
|
*/
|
|
@@ -294,8 +313,11 @@ interface Environment {
|
|
|
294
313
|
/** Title or name of the environment. */
|
|
295
314
|
title: string;
|
|
296
315
|
/** Flag indicating if UDS is enabled. */
|
|
316
|
+
udsEnabled: boolean;
|
|
297
317
|
/** The north yaw of the sun in the environment. */
|
|
318
|
+
sunNorthYaw: number;
|
|
298
319
|
/** The UDS hour setting for the environment. */
|
|
320
|
+
udsHour: number;
|
|
299
321
|
/** GraphQL typename for the environment. */
|
|
300
322
|
__typename: 'Environment';
|
|
301
323
|
/** List of thumbnails for the environment (optional). */
|
|
@@ -311,22 +333,30 @@ type SelectedIds = Record<string, Record<string, string>>;
|
|
|
311
333
|
* Defines the structure for an available showcase status for the current product on a scene.
|
|
312
334
|
*/
|
|
313
335
|
type ShowCaseStatus = 'init' | 'play' | 'pause' | 'stop';
|
|
336
|
+
/**
|
|
337
|
+
* Defines the structure for a video resolution.
|
|
338
|
+
*/
|
|
339
|
+
interface VideoResolution {
|
|
340
|
+
width: number | null;
|
|
341
|
+
height: number | null;
|
|
342
|
+
}
|
|
314
343
|
|
|
315
344
|
interface FromMetaboxMessagePayloads {
|
|
316
345
|
/**
|
|
317
|
-
*
|
|
318
|
-
*
|
|
346
|
+
* @hidden
|
|
347
|
+
* @deprecated use {@link FromMetaboxMessagePayloads.configuratorDataUpdated}
|
|
319
348
|
*/
|
|
320
349
|
configuratorData: ConfiguratorEnvelope;
|
|
321
350
|
/**
|
|
322
351
|
* @hidden
|
|
323
|
-
* @deprecated
|
|
352
|
+
* @deprecated use {@link FromMetaboxMessagePayloads.configuratorDataUpdated}
|
|
324
353
|
*/
|
|
325
354
|
basicConfiguratorDataWithState: ConfiguratorEnvelope;
|
|
326
355
|
/**
|
|
327
|
-
* Dispatches Every time
|
|
356
|
+
* Dispatches Every time the configurator data is updated.
|
|
357
|
+
* I.e., when the user changes the configuration. (Material, Product, Environment)
|
|
328
358
|
*/
|
|
329
|
-
|
|
359
|
+
configuratorDataUpdated: ConfiguratorEnvelope;
|
|
330
360
|
/**
|
|
331
361
|
* Dispatches Every time when the configurator connected/disconnected with Unreal Engine.
|
|
332
362
|
*/
|
|
@@ -336,16 +366,28 @@ interface FromMetaboxMessagePayloads {
|
|
|
336
366
|
*/
|
|
337
367
|
viewportReady: boolean;
|
|
338
368
|
/**
|
|
369
|
+
* Dispatches at the moment while the configurator loads. Shows status information..
|
|
370
|
+
*/
|
|
371
|
+
showcaseStatusChanged: ShowCaseStatus;
|
|
372
|
+
/**
|
|
373
|
+
* @hidden
|
|
374
|
+
* @deprecated
|
|
339
375
|
* Dispatches Every when user toggles fullscreen button in an internal menu.
|
|
340
376
|
*/
|
|
341
377
|
isFullScreen: boolean;
|
|
342
378
|
/**
|
|
379
|
+
* @hidden
|
|
380
|
+
* @deprecated use {@link FromMetaboxMessagePayloads.statusMessageChanged}
|
|
343
381
|
* Dispatches at the moment while the configurator loads. Shows status information.
|
|
344
382
|
*/
|
|
345
383
|
statusMessage: string | null;
|
|
346
384
|
/**
|
|
347
|
-
*
|
|
385
|
+
* Dispatches at the moment while the configurator loads. Shows status information.
|
|
386
|
+
*/
|
|
387
|
+
statusMessageChanged: string | null;
|
|
388
|
+
/**
|
|
348
389
|
* @hidden
|
|
390
|
+
* @deprecated
|
|
349
391
|
* Dispatches every time when the freeze-frame is arrived or updated.
|
|
350
392
|
*/
|
|
351
393
|
freezeFrame: {
|
|
@@ -353,47 +395,69 @@ interface FromMetaboxMessagePayloads {
|
|
|
353
395
|
progress: number | null;
|
|
354
396
|
};
|
|
355
397
|
/**
|
|
356
|
-
*
|
|
357
|
-
* Dispatches every Unreal is sending a command callback.
|
|
358
|
-
* Works only after the new WatchCallbacks () command is sent.
|
|
398
|
+
* Dispatches every time when Unreal is sending ordered render with new GetScreenshot() command.
|
|
359
399
|
*/
|
|
360
|
-
|
|
361
|
-
json: UnrealCallBackJson;
|
|
362
|
-
};
|
|
400
|
+
screenshotReady: string | null;
|
|
363
401
|
/**
|
|
364
|
-
*
|
|
402
|
+
* @hidden
|
|
403
|
+
* @deprecated use {@link FromMetaboxMessagePayloads.screenshotReady}
|
|
404
|
+
* Dispatches every time when Unreal is sending ordered render with new GetScreenshot() command.
|
|
365
405
|
*/
|
|
366
406
|
screenshot: string | null;
|
|
407
|
+
/**
|
|
408
|
+
* @hidden
|
|
409
|
+
* @deprecated, use {@link FromMetaboxMessagePayloads.screenshotReady}
|
|
410
|
+
*/
|
|
367
411
|
getScreenshot: string | null;
|
|
368
412
|
/**
|
|
369
413
|
* @hidden
|
|
370
|
-
* @deprecated, use
|
|
414
|
+
* @deprecated, use {@link FromMetaboxMessagePayloads.screenshotReady}
|
|
371
415
|
*/
|
|
372
416
|
fastRender: string | null;
|
|
373
417
|
/**
|
|
374
418
|
* @hidden
|
|
375
|
-
* @deprecated, use
|
|
419
|
+
* @deprecated, use {@link FromMetaboxMessagePayloads.screenshotReady}
|
|
376
420
|
*/
|
|
377
421
|
getFastRender: string | null;
|
|
378
422
|
/**
|
|
423
|
+
* @internal
|
|
379
424
|
* @experimental
|
|
380
|
-
* Dispatches every Unreal
|
|
425
|
+
* Dispatches every Unreal is sending a command callback.
|
|
426
|
+
* Works only after the new WatchCallbacks () command is sent.
|
|
427
|
+
* !!! WARNING use at your own risk. We don't guarantee right behavior
|
|
428
|
+
*
|
|
381
429
|
*/
|
|
382
|
-
|
|
430
|
+
unrealCallback: {
|
|
431
|
+
json: object;
|
|
432
|
+
};
|
|
383
433
|
/**
|
|
384
434
|
* @hidden
|
|
385
|
-
* @
|
|
435
|
+
* @internal
|
|
436
|
+
* @experimental
|
|
437
|
+
* Dispatches every Unreal state is changing, including all unreal module current state.
|
|
438
|
+
* !!! WARNING use at your own risk. We don't guarantee right behavior
|
|
439
|
+
*/
|
|
440
|
+
unrealState: object;
|
|
441
|
+
/**
|
|
442
|
+
* @hidden
|
|
443
|
+
* @internal
|
|
444
|
+
* @deprecated, use {@link FromMetaboxMessagePayloads.unrealState}
|
|
386
445
|
*/
|
|
387
|
-
unrealFeature:
|
|
446
|
+
unrealFeature: object;
|
|
388
447
|
/**
|
|
389
448
|
* Dispatches every time when Unreal is changing its video stream size.
|
|
390
449
|
*/
|
|
391
|
-
|
|
450
|
+
videoResolutionChanged: VideoResolution;
|
|
392
451
|
/**
|
|
393
452
|
* @hidden
|
|
394
|
-
* @deprecated, use
|
|
453
|
+
* @deprecated, use ${@link FromMetaboxMessagePayloads.videoResolutionChanged }
|
|
395
454
|
*/
|
|
396
|
-
|
|
455
|
+
videoResolution: VideoResolution;
|
|
456
|
+
/**
|
|
457
|
+
* @hidden
|
|
458
|
+
* @deprecated, use ${@link FromMetaboxMessagePayloads.videoResolutionChanged }
|
|
459
|
+
*/
|
|
460
|
+
streamResolution: VideoResolution;
|
|
397
461
|
}
|
|
398
462
|
/**
|
|
399
463
|
* @hidden
|
|
@@ -597,17 +661,6 @@ declare function integrateMetaBox(iframeSrc: string, containerId: string | undef
|
|
|
597
661
|
*/
|
|
598
662
|
declare function saveImage(imageUrl: string, filename: string): void;
|
|
599
663
|
|
|
600
|
-
/**
|
|
601
|
-
* Pauses execution for a specified duration.
|
|
602
|
-
*
|
|
603
|
-
* @remarks
|
|
604
|
-
* This function returns a promise that resolves after the given number of milliseconds.
|
|
605
|
-
*
|
|
606
|
-
* @param {number} time - The time to sleep in milliseconds.
|
|
607
|
-
* @returns A promise that resolves after the specified duration.
|
|
608
|
-
*/
|
|
609
|
-
declare function sleep(time: number): Promise<void>;
|
|
610
|
-
|
|
611
664
|
/**
|
|
612
665
|
* Sets the URL parameters based on the provided state.
|
|
613
666
|
*
|
|
@@ -644,7 +697,7 @@ declare function fromCommunicatorEvent<T extends FromMetaBoxApiEvents>(target: C
|
|
|
644
697
|
*
|
|
645
698
|
* @example
|
|
646
699
|
* import { GetPdf, Communicator } from '@3dsource/metabox-front-api';
|
|
647
|
-
* window.env3DSource.apiReady = (api:Communicator) => {
|
|
700
|
+
* window.env3DSource.apiReady = (api: Communicator) => {
|
|
648
701
|
* api.sendCommandToMetaBox(new GetPdf());
|
|
649
702
|
* };
|
|
650
703
|
*/
|
|
@@ -671,7 +724,7 @@ type MimeType = 'image/png' | 'image/jpeg' | 'image/webp';
|
|
|
671
724
|
*
|
|
672
725
|
* @example
|
|
673
726
|
* import { GetScreenshot, Communicator, saveImage } from '@3dsource/metabox-front-api';
|
|
674
|
-
* window.env3DSource.apiReady = (api:Communicator) => {
|
|
727
|
+
* window.env3DSource.apiReady = (api: Communicator) => {
|
|
675
728
|
* // Listen for events from to the Metabox API
|
|
676
729
|
* api.addEventListener('screenshot', (data) => {
|
|
677
730
|
* // Process the get screenshot response
|
|
@@ -704,7 +757,7 @@ declare const GetFastRender: typeof GetScreenshot;
|
|
|
704
757
|
*
|
|
705
758
|
* @example
|
|
706
759
|
* import { ResetCamera, Communicator } from '@3dsource/metabox-front-api';
|
|
707
|
-
* window.env3DSource.apiReady = (api:Communicator) => {
|
|
760
|
+
* window.env3DSource.apiReady = (api: Communicator) => {
|
|
708
761
|
* api.sendCommandToMetaBox(new ResetCamera());
|
|
709
762
|
* };
|
|
710
763
|
*/
|
|
@@ -727,7 +780,7 @@ declare class ResetCamera extends CommandBase {
|
|
|
727
780
|
*
|
|
728
781
|
* @example
|
|
729
782
|
* import { ApplyZoom, Communicator } from '@3dsource/metabox-front-api';
|
|
730
|
-
* window.env3DSource.apiReady = (api:Communicator) => {
|
|
783
|
+
* window.env3DSource.apiReady = (api: Communicator) => {
|
|
731
784
|
* api.sendCommandToMetaBox(new ApplyZoom(10));
|
|
732
785
|
* api.sendCommandToMetaBox(new ApplyZoom(-10));
|
|
733
786
|
* };
|
|
@@ -742,15 +795,18 @@ declare class ApplyZoom extends CommandBase {
|
|
|
742
795
|
}
|
|
743
796
|
|
|
744
797
|
/**
|
|
745
|
-
* Represents a command to Init Showcase for a product
|
|
798
|
+
* Represents a command to Init Showcase for a product a scene and start a sequence for the product.
|
|
746
799
|
* @remarks
|
|
747
800
|
* This class sends a command to the Metabox API to init showcase if the product has a sequence.
|
|
801
|
+
* For check this needs to find a showcase property in current product
|
|
802
|
+
* If this property exist you can send init showcase command
|
|
803
|
+
* @internal Use {@link ModularConfiguratorComponent.product.showcase}
|
|
748
804
|
*
|
|
749
805
|
* **Important**: Invoking this command will buffer it until the viewport is ready. Only then will the request be processed.
|
|
750
806
|
*
|
|
751
807
|
* @example
|
|
752
808
|
* import { InitShowcase, Communicator } from '@3dsource/metabox-front-api';
|
|
753
|
-
* window.env3DSource.apiReady = (api:Communicator) => {
|
|
809
|
+
* window.env3DSource.apiReady = (api: Communicator) => {
|
|
754
810
|
* api.sendCommandToMetaBox(new InitShowcase('ffea6b5c-3a8a-4f56-9417-e605acb5cca3');
|
|
755
811
|
* };
|
|
756
812
|
*/
|
|
@@ -772,7 +828,7 @@ declare class InitShowcase extends CommandBase {
|
|
|
772
828
|
*
|
|
773
829
|
* @example
|
|
774
830
|
* import { PlayShowcase, Communicator } from '@3dsource/metabox-front-api';
|
|
775
|
-
* window.env3DSource.apiReady = (api:Communicator) => {
|
|
831
|
+
* window.env3DSource.apiReady = (api: Communicator) => {
|
|
776
832
|
* api.sendCommandToMetaBox(new PlayShowcase());
|
|
777
833
|
* };
|
|
778
834
|
*/
|
|
@@ -786,6 +842,15 @@ declare class PlayShowcase extends CommandBase {
|
|
|
786
842
|
constructor();
|
|
787
843
|
}
|
|
788
844
|
|
|
845
|
+
/**
|
|
846
|
+
* @internal
|
|
847
|
+
* @hidden
|
|
848
|
+
* Represents a command to send Unreal command.
|
|
849
|
+
*/
|
|
850
|
+
declare class UnrealCommand extends CommandBase {
|
|
851
|
+
constructor(payload: object);
|
|
852
|
+
}
|
|
853
|
+
|
|
789
854
|
/**
|
|
790
855
|
* Represents a command to Pause Showcase for a product when it already init and play, and you call pause.
|
|
791
856
|
* @remarks
|
|
@@ -795,7 +860,7 @@ declare class PlayShowcase extends CommandBase {
|
|
|
795
860
|
*
|
|
796
861
|
* @example
|
|
797
862
|
* import { PauseShowcase, Communicator } from '@3dsource/metabox-front-api';
|
|
798
|
-
* window.env3DSource.apiReady = (api:Communicator) => {
|
|
863
|
+
* window.env3DSource.apiReady = (api: Communicator) => {
|
|
799
864
|
* api.sendCommandToMetaBox(new PauseShowcase());
|
|
800
865
|
* };
|
|
801
866
|
*/
|
|
@@ -818,7 +883,7 @@ declare class PauseShowcase extends CommandBase {
|
|
|
818
883
|
*
|
|
819
884
|
* @example
|
|
820
885
|
* import { StopShowcase, Communicator } from '@3dsource/metabox-front-api';
|
|
821
|
-
* window.env3DSource.apiReady = (api:Communicator) => {
|
|
886
|
+
* window.env3DSource.apiReady = (api: Communicator) => {
|
|
822
887
|
* api.sendCommandToMetaBox(new StopShowcase());
|
|
823
888
|
* };
|
|
824
889
|
*/
|
|
@@ -842,7 +907,7 @@ declare class StopShowcase extends CommandBase {
|
|
|
842
907
|
* import { SetProduct, Communicator } from '@3dsource/metabox-front-api';
|
|
843
908
|
*
|
|
844
909
|
* //...Assume that the integration is already implemented
|
|
845
|
-
* window.env3DSource.apiReady = (api:Communicator) => {
|
|
910
|
+
* window.env3DSource.apiReady = (api: Communicator) => {
|
|
846
911
|
* api.setCommandToMetaBox(new SetProduct(
|
|
847
912
|
* 'ffea6b5c-3a8a-4f56-9417-e605acb5cca3'
|
|
848
913
|
* ));
|
|
@@ -864,7 +929,7 @@ declare class SetProduct extends CommandBase {
|
|
|
864
929
|
* import { SetMaterial, Communicator } from '@3dsource/metabox-front-api';
|
|
865
930
|
*
|
|
866
931
|
* //...Assume that the integration is already implemented
|
|
867
|
-
* window.env3DSource.apiReady = (api:Communicator) => {
|
|
932
|
+
* window.env3DSource.apiReady = (api: Communicator) => {
|
|
868
933
|
* api.sendCommandToMetaBox(new SetMaterial(
|
|
869
934
|
* 'carpaint',
|
|
870
935
|
* 'dd829d6e-9200-47a7-8d5b-af5df89b7e91',
|
|
@@ -888,7 +953,7 @@ declare class SetMaterial extends CommandBase {
|
|
|
888
953
|
* import { SetEnvironment, Communicator } from '@3dsource/metabox-front-api';
|
|
889
954
|
*
|
|
890
955
|
* //...Assume that the integration is already implemented
|
|
891
|
-
* window.env3DSource.apiReady = (api:Communicator) => {
|
|
956
|
+
* window.env3DSource.apiReady = (api: Communicator) => {
|
|
892
957
|
* // Change the environment to '55555555-1234-1234-1234-01234567890'
|
|
893
958
|
* api.sendCommandToMetaBox(new SetEnvironment('55555555-1234-1234-1234-01234567890'));
|
|
894
959
|
* };
|
|
@@ -909,7 +974,7 @@ declare class SetEnvironment extends CommandBase {
|
|
|
909
974
|
* import { SetEnvironmentMaterial, Communicator } from '@3dsource/metabox-front-api';
|
|
910
975
|
*
|
|
911
976
|
* //...Assume that the integration is already implemented
|
|
912
|
-
* window.env3DSource.apiReady = (api:Communicator) => {
|
|
977
|
+
* window.env3DSource.apiReady = (api: Communicator) => {
|
|
913
978
|
* api.sendCommandToMetaBox(new SetEnvironmentMaterial(
|
|
914
979
|
* 'carpaint',
|
|
915
980
|
* 'dd829d6e-9200-47a7-8d5b-af5df89b7e91',
|
|
@@ -933,7 +998,7 @@ declare class SetEnvironmentMaterial extends CommandBase {
|
|
|
933
998
|
* import { ShowEmbeddedMenu, Communicator } from '@3dsource/metabox-front-api';
|
|
934
999
|
*
|
|
935
1000
|
* //...Assume that the integration is already implemented
|
|
936
|
-
* window.env3DSource.apiReady = (api:Communicator) => {
|
|
1001
|
+
* window.env3DSource.apiReady = (api: Communicator) => {
|
|
937
1002
|
* api.setCommandToMetaBox(new ShowEmbeddedMenu(true));
|
|
938
1003
|
* };
|
|
939
1004
|
*/
|
|
@@ -956,7 +1021,7 @@ declare class ShowEmbeddedMenu extends CommandBase {
|
|
|
956
1021
|
* import { ShowOverlayInterface, Communicator } from '@3dsource/metabox-front-api';
|
|
957
1022
|
*
|
|
958
1023
|
* //...Assume that the integration is already implemented
|
|
959
|
-
* window.env3DSource.apiReady = (api:Communicator) => {
|
|
1024
|
+
* window.env3DSource.apiReady = (api: Communicator) => {
|
|
960
1025
|
* api.setCommandToMetaBox(new ShowOverlayInterface(true));
|
|
961
1026
|
* };
|
|
962
1027
|
*/
|
|
@@ -969,15 +1034,6 @@ declare class ShowOverlayInterface extends CommandBase {
|
|
|
969
1034
|
constructor(visible: boolean);
|
|
970
1035
|
}
|
|
971
1036
|
|
|
972
|
-
/**
|
|
973
|
-
* @internal
|
|
974
|
-
* @hidden
|
|
975
|
-
* Represents a command to send Unreal command.
|
|
976
|
-
*/
|
|
977
|
-
declare class UnrealCommand extends CommandBase {
|
|
978
|
-
constructor(payload: MetaBoxCommandPacket);
|
|
979
|
-
}
|
|
980
|
-
|
|
981
1037
|
/**
|
|
982
1038
|
* @experimental
|
|
983
1039
|
* @internal
|
|
@@ -996,5 +1052,5 @@ declare class WatchCallbacks extends CommandBase {
|
|
|
996
1052
|
constructor();
|
|
997
1053
|
}
|
|
998
1054
|
|
|
999
|
-
export { ApplyZoom, CommandBase, Communicator, EventDispatcher, GetFastRender, GetPdf, GetScreenshot, InitShowcase, MetaboxBasicConfiguratorActions, PauseShowcase, PlayShowcase, ResetCamera, SetEnvironment, SetEnvironmentMaterial, SetMaterial, SetProduct, ShowEmbeddedMenu, ShowOverlayInterface, StopShowcase, UnrealCommand, WatchCallbacks, fromCommunicatorEvent, getUrlParams, integrateMetaBox, saveImage, setUrlParams
|
|
1000
|
-
export type { ApplicationDeviceTypes, ConfiguratorEnvelope, DeprecatedEnvelope, Environment, FromMetaBoxAPIEnvelope, FromMetaBoxApiEvents, FromMetaBoxMessage, FromMetaboxApiAction, FromMetaboxDeprecatedApiAction, FromMetaboxMessagePayloads, Listener, MCAppLoaded, Material, MetaBoxApiEnvelope, MetaProperty, MimeType, Product, SelectedIds, ShowCaseStatus, Slot, Thumbnail, ToMetaBoxActions, ToMetaBoxMessage, ToMetaBoxMessageEnvelope, ToMetaboxMessagePayload, ToMetaboxMessagePayloads, UniversalConfigurator, UniversalConfiguratorEnvironment, UniversalConfiguratorProduct };
|
|
1055
|
+
export { ApplyZoom, CommandBase, Communicator, EventDispatcher, GetFastRender, GetPdf, GetScreenshot, InitShowcase, MetaboxBasicConfiguratorActions, PauseShowcase, PlayShowcase, ResetCamera, SetEnvironment, SetEnvironmentMaterial, SetMaterial, SetProduct, ShowEmbeddedMenu, ShowOverlayInterface, StopShowcase, UnrealCommand, WatchCallbacks, fromCommunicatorEvent, getUrlParams, integrateMetaBox, saveImage, setUrlParams };
|
|
1056
|
+
export type { ApplicationDeviceTypes, ConfiguratorEnvelope, DeprecatedEnvelope, Environment, FromMetaBoxAPIEnvelope, FromMetaBoxApiEvents, FromMetaBoxMessage, FromMetaboxApiAction, FromMetaboxDeprecatedApiAction, FromMetaboxMessagePayloads, Listener, MCAppLoaded, Material, MetaBoxApiEnvelope, MetaProperty, MimeType, Product, SelectedIds, ShowCaseStatus, Slot, Thumbnail, ToMetaBoxActions, ToMetaBoxMessage, ToMetaBoxMessageEnvelope, ToMetaboxMessagePayload, ToMetaboxMessagePayloads, UniversalConfigurator, UniversalConfiguratorEnvironment, UniversalConfiguratorProduct, VideoResolution };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@3dsource/metabox-front-api",
|
|
3
|
-
"version": "1.2.2
|
|
3
|
+
"version": "1.2.2",
|
|
4
4
|
"description": "API for Metabox BASIC configurator",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"metabox",
|
|
@@ -18,9 +18,6 @@
|
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"tslib": "^2.8.1"
|
|
20
20
|
},
|
|
21
|
-
"peerDependencies": {
|
|
22
|
-
"@3dsource/angular-unreal-module": ">=0.0.34"
|
|
23
|
-
},
|
|
24
21
|
"engines": {
|
|
25
22
|
"node": ">=20",
|
|
26
23
|
"npm": ">9"
|