@3dsource/metabox-front-api 3.0.0-dev.0 → 3.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 +285 -464
- package/fesm2022/3dsource-metabox-front-api.mjs +122 -67
- package/fesm2022/3dsource-metabox-front-api.mjs.map +1 -1
- package/index.d.ts +105 -82
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -2,21 +2,38 @@ import { Observable } from 'rxjs';
|
|
|
2
2
|
|
|
3
3
|
type ApplicationDeviceTypes = 'deviceTypeAuto' | 'deviceTypeMobile' | 'deviceTypeDesktop';
|
|
4
4
|
|
|
5
|
-
declare const
|
|
6
|
-
declare const
|
|
7
|
-
declare const
|
|
8
|
-
declare const
|
|
9
|
-
declare const
|
|
5
|
+
declare const Metabox = "metabox_v3";
|
|
6
|
+
declare const MetaboxHost = "metaboxHost_v3";
|
|
7
|
+
declare const MetaboxData = "metaboxData_v3";
|
|
8
|
+
declare const AppLoaded = "appLoaded_v3";
|
|
9
|
+
declare const MetaboxDomain = "metabox.3dsource.com";
|
|
10
|
+
declare const BasicRouteUrl = "metabox-configurator/basic";
|
|
10
11
|
|
|
11
|
-
|
|
12
|
+
declare const VERSION = "3.0.1";
|
|
13
|
+
|
|
14
|
+
type FromMetaboxApiAction = 'bridge' | typeof AppLoaded;
|
|
15
|
+
|
|
16
|
+
interface IntegrateMetaboxConfig {
|
|
17
|
+
standalone?: boolean;
|
|
18
|
+
loadingImage?: string;
|
|
19
|
+
introVideo?: string;
|
|
20
|
+
introImage?: string;
|
|
21
|
+
state?: string;
|
|
22
|
+
domain?: string;
|
|
23
|
+
}
|
|
24
|
+
interface MetaboxCommandConfig {
|
|
25
|
+
standalone?: boolean;
|
|
26
|
+
hostUrl: string;
|
|
27
|
+
apiVersion: string;
|
|
28
|
+
}
|
|
12
29
|
|
|
13
30
|
declare const MetaboxBasicConfiguratorActions: {
|
|
14
|
-
readonly
|
|
31
|
+
readonly metaboxConfig: "metaboxConfig";
|
|
32
|
+
readonly setEnvironment: "setEnvironment";
|
|
15
33
|
readonly setEnvironmentMaterialById: "setEnvironmentMaterialById";
|
|
16
34
|
readonly setProduct: "setProduct";
|
|
17
|
-
readonly
|
|
35
|
+
readonly setProductMaterialById: "setProductMaterialById";
|
|
18
36
|
readonly getPdf: "getPdf";
|
|
19
|
-
readonly metaboxConfig: "metaboxConfig";
|
|
20
37
|
readonly getCallToActionInformation: "getCallToActionInformation";
|
|
21
38
|
readonly getScreenshot: "getScreenshot";
|
|
22
39
|
readonly showEmbeddedMenu: "showEmbeddedMenu";
|
|
@@ -41,14 +58,18 @@ type ToMetaboxMessagePayload = ToMetaboxMessagePayloads[keyof ToMetaboxMessagePa
|
|
|
41
58
|
* Interface for messages sent from the application to the Basic Metabox API.
|
|
42
59
|
*/
|
|
43
60
|
interface ToMetaboxMessagePayloads {
|
|
44
|
-
[MetaboxBasicConfiguratorActions.
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
id: string;
|
|
61
|
+
[MetaboxBasicConfiguratorActions.metaboxConfig]: {
|
|
62
|
+
appId: string;
|
|
63
|
+
config: MetaboxCommandConfig;
|
|
48
64
|
};
|
|
49
65
|
[MetaboxBasicConfiguratorActions.setProduct]: {
|
|
50
66
|
productId: string;
|
|
51
67
|
};
|
|
68
|
+
[MetaboxBasicConfiguratorActions.setEnvironment]: {
|
|
69
|
+
id: string;
|
|
70
|
+
};
|
|
71
|
+
[MetaboxBasicConfiguratorActions.getPdf]: void;
|
|
72
|
+
[MetaboxBasicConfiguratorActions.getCallToActionInformation]: void;
|
|
52
73
|
[MetaboxBasicConfiguratorActions.watchCallbacks]: void;
|
|
53
74
|
[MetaboxBasicConfiguratorActions.getScreenshot]: {
|
|
54
75
|
format: MimeType;
|
|
@@ -57,7 +78,7 @@ interface ToMetaboxMessagePayloads {
|
|
|
57
78
|
y: number;
|
|
58
79
|
};
|
|
59
80
|
};
|
|
60
|
-
[MetaboxBasicConfiguratorActions.
|
|
81
|
+
[MetaboxBasicConfiguratorActions.setProductMaterialById]: {
|
|
61
82
|
slotId: string;
|
|
62
83
|
materialId: string;
|
|
63
84
|
};
|
|
@@ -78,9 +99,7 @@ interface ToMetaboxMessagePayloads {
|
|
|
78
99
|
[MetaboxBasicConfiguratorActions.applyZoom]: {
|
|
79
100
|
zoom: number;
|
|
80
101
|
};
|
|
81
|
-
[MetaboxBasicConfiguratorActions.initShowcase]:
|
|
82
|
-
productId: string;
|
|
83
|
-
};
|
|
102
|
+
[MetaboxBasicConfiguratorActions.initShowcase]: void;
|
|
84
103
|
[MetaboxBasicConfiguratorActions.playShowcase]: void;
|
|
85
104
|
[MetaboxBasicConfiguratorActions.pauseShowcase]: void;
|
|
86
105
|
[MetaboxBasicConfiguratorActions.stopShowcase]: void;
|
|
@@ -91,7 +110,7 @@ interface ToMetaBoxMessageEnvelope {
|
|
|
91
110
|
payload?: ToMetaboxMessagePayload | never;
|
|
92
111
|
}
|
|
93
112
|
interface ToMetaBoxMessage {
|
|
94
|
-
host: typeof
|
|
113
|
+
host: typeof MetaboxHost;
|
|
95
114
|
payload: ToMetaBoxMessageEnvelope;
|
|
96
115
|
}
|
|
97
116
|
|
|
@@ -456,16 +475,6 @@ interface FromMetaboxMessagePayloads {
|
|
|
456
475
|
* Dispatches every time when Unreal is sending ordered render with new GetScreenshot() command.
|
|
457
476
|
*/
|
|
458
477
|
screenshotReady: string | null;
|
|
459
|
-
/**
|
|
460
|
-
* @internal
|
|
461
|
-
* Dispatches every Unreal is sending a command callback.
|
|
462
|
-
* Works only after the new WatchCallbacks () command is sent.
|
|
463
|
-
* !!! WARNING use at your own risk. We don't guarantee right behavior
|
|
464
|
-
*
|
|
465
|
-
*/
|
|
466
|
-
unrealCallback: {
|
|
467
|
-
json: object;
|
|
468
|
-
};
|
|
469
478
|
/**
|
|
470
479
|
* Dispatches every time when Unreal is changing its video stream size.
|
|
471
480
|
*/
|
|
@@ -491,11 +500,11 @@ type MetaboxEnvironment = 'metabox' | 'host';
|
|
|
491
500
|
* Used for signaling that the app is loaded and ready to open api.
|
|
492
501
|
*/
|
|
493
502
|
interface MCAppLoaded {
|
|
494
|
-
action: typeof
|
|
503
|
+
action: typeof AppLoaded;
|
|
495
504
|
eventType?: unknown;
|
|
496
505
|
payload: {
|
|
497
506
|
appId: string;
|
|
498
|
-
version
|
|
507
|
+
version?: string;
|
|
499
508
|
};
|
|
500
509
|
}
|
|
501
510
|
/**
|
|
@@ -507,7 +516,7 @@ type FromMetaBoxAPIEnvelope = {
|
|
|
507
516
|
[K in keyof FromMetaboxMessagePayloads]: MetaBoxApiEnvelope<K>;
|
|
508
517
|
}[keyof FromMetaboxMessagePayloads] | MCAppLoaded;
|
|
509
518
|
interface FromMetaBoxMessage {
|
|
510
|
-
host: typeof
|
|
519
|
+
host: typeof Metabox;
|
|
511
520
|
envelope: FromMetaBoxAPIEnvelope;
|
|
512
521
|
}
|
|
513
522
|
|
|
@@ -562,13 +571,9 @@ declare class EventDispatcher {
|
|
|
562
571
|
removeEventListener(messageType: string, callback: (data: unknown) => void): this;
|
|
563
572
|
}
|
|
564
573
|
|
|
565
|
-
interface MetaboxCommandConfig {
|
|
566
|
-
standalone: boolean;
|
|
567
|
-
}
|
|
568
|
-
|
|
569
574
|
/**
|
|
570
575
|
* Handles messaging between the host page and embedded Metabox content.
|
|
571
|
-
* @internal Use {@link Communicator.createInstance} or the {@link
|
|
576
|
+
* @internal Use {@link Communicator.createInstance} or the {@link integrateMetabox} helper to instantiate.
|
|
572
577
|
*/
|
|
573
578
|
declare class Communicator extends EventDispatcher {
|
|
574
579
|
/**
|
|
@@ -579,14 +584,14 @@ declare class Communicator extends EventDispatcher {
|
|
|
579
584
|
* Constructs a Communicator, replacing any existing instance, and begins listening for messages.
|
|
580
585
|
* @internal
|
|
581
586
|
*/
|
|
582
|
-
constructor(data: MCAppLoaded['payload'], environment: MetaboxEnvironment, config?: MetaboxCommandConfig);
|
|
587
|
+
constructor(data: MCAppLoaded['payload'], environment: MetaboxEnvironment, config?: Partial<MetaboxCommandConfig>);
|
|
583
588
|
/**
|
|
584
589
|
* Listens for Metabox to signal readiness, then initializes communicator.
|
|
585
590
|
* @param apiReadyCallback - Called with the new Communicator once to the Metabox is loaded.
|
|
586
591
|
* @param {MetaboxEnvironment} environment - The environment in which the Communicator is running.
|
|
587
592
|
* @param {MetaboxCommandConfig} config - optional initial config: standalone - if true - disable metabox custom template and all logic
|
|
588
593
|
*/
|
|
589
|
-
static createInstance(apiReadyCallback: (api: Communicator) => void, environment: MetaboxEnvironment, config?: MetaboxCommandConfig): void;
|
|
594
|
+
static createInstance(apiReadyCallback: (api: Communicator) => void, environment: MetaboxEnvironment, config?: Partial<MetaboxCommandConfig>): void;
|
|
590
595
|
/**
|
|
591
596
|
* Cleans up resources and stops listening for messages.
|
|
592
597
|
*/
|
|
@@ -594,13 +599,12 @@ declare class Communicator extends EventDispatcher {
|
|
|
594
599
|
static clearAll(): void;
|
|
595
600
|
static getCommunicator(key: string): {
|
|
596
601
|
instance: Communicator;
|
|
597
|
-
config: MetaboxCommandConfig;
|
|
598
602
|
} | undefined;
|
|
599
603
|
/**
|
|
600
604
|
* Posts a command to the Metabox iframe.
|
|
601
605
|
* @param command - An action command containing data to send.
|
|
602
606
|
*/
|
|
603
|
-
|
|
607
|
+
sendCommandToMetabox<T extends CommandBase>(command: T): void;
|
|
604
608
|
/**
|
|
605
609
|
* Registers an event listener for messages dispatched by to the Metabox.
|
|
606
610
|
* @override
|
|
@@ -625,36 +629,51 @@ declare class Communicator extends EventDispatcher {
|
|
|
625
629
|
}
|
|
626
630
|
|
|
627
631
|
/**
|
|
628
|
-
* Integrates Metabox Basic Configurator into the
|
|
632
|
+
* Integrates the Metabox Basic Configurator into the page by injecting an iframe and
|
|
633
|
+
* initializing a Communicator instance for host-to-iframe messaging.
|
|
629
634
|
*
|
|
630
635
|
* @remarks
|
|
631
|
-
*
|
|
632
|
-
* the
|
|
636
|
+
* - Builds a secure iframe URL using the provided configuratorId and config options.
|
|
637
|
+
* - Ensures the resulting URL uses HTTPS and that the target container exists.
|
|
638
|
+
* - Removes any previously embedded iframe with id "embeddedContent" before inserting a new one.
|
|
633
639
|
*
|
|
634
|
-
* @param {string}
|
|
635
|
-
*
|
|
636
|
-
* ```javascript
|
|
637
|
-
* sidebar=false - disables the internal Metabox menu
|
|
638
|
-
* introImage=https://example.com/image.png - sets the intro image
|
|
639
|
-
* ```
|
|
640
|
-
* i.e., a final link will look like https://metabox.3dsource.com/metabox-configurator/basic/your-configurator-id?sidebar=false&introImage=https://example.com/image.png
|
|
640
|
+
* @param {string} configuratorId - The Basic Configurator ID (not a full URL). It is appended to
|
|
641
|
+
* `https://{domain}/metabox-configurator/basic/{configuratorId}` to form the iframe src.
|
|
641
642
|
*
|
|
642
|
-
* @param {string} containerId - The
|
|
643
|
-
*
|
|
644
|
-
* @param {
|
|
645
|
-
*
|
|
643
|
+
* @param {string} [containerId='embed3DSource'] - The id of the container element where the iframe will be injected.
|
|
644
|
+
*
|
|
645
|
+
* @param {(api: Communicator) => void} apiReadyCallback - Called when the Communicator instance is created on the host side.
|
|
646
|
+
*
|
|
647
|
+
* @param {IntegrateMetaboxConfig} config - Optional configuration used to build the iframe URL and initialize the communicator.
|
|
648
|
+
* Supported fields:
|
|
649
|
+
* - standalone?: boolean — if true, disables Metabox custom template and related logic.
|
|
650
|
+
* - introImage?: string — URL to an image shown on the intro screen (added as ?introImage=...).
|
|
651
|
+
* - introVideo?: string — URL to a video shown on the intro screen (added as ?introVideo=...).
|
|
652
|
+
* - loadingImage?: string — URL to an image displayed while loading (added as ?loadingImage=...).
|
|
653
|
+
* - state?: string — Predefined state for configurator for initial loading (added as ?state=...).
|
|
654
|
+
* - domain?: string — custom domain for testing (defaults to metabox.3dsource.com). HTTPS is enforced.
|
|
655
|
+
*
|
|
656
|
+
* @throws Error If configuratorId or containerId are empty strings.
|
|
657
|
+
* @throws Error If the computed iframe URL is invalid or does not use HTTPS.
|
|
658
|
+
* @throws Error If the container element with the provided id cannot be found.
|
|
646
659
|
*
|
|
647
660
|
* @example
|
|
648
|
-
* import {
|
|
649
|
-
* integrateMetaBox,
|
|
650
|
-
* } from '@3dsource/metabox-front-api';
|
|
661
|
+
* import { integrateMetabox } from '@3dsource/metabox-front-api';
|
|
651
662
|
*
|
|
652
|
-
*
|
|
653
|
-
* '
|
|
654
|
-
* 'embed3DSource'
|
|
663
|
+
* integrateMetabox(
|
|
664
|
+
* 'configurator-id',
|
|
665
|
+
* 'embed3DSource',
|
|
666
|
+
* (api) => {
|
|
667
|
+
* // Communicator is ready to use
|
|
668
|
+
* },
|
|
669
|
+
* {
|
|
670
|
+
* standalone: false,
|
|
671
|
+
* introImage: 'https://example.com/intro.png',
|
|
672
|
+
* loadingImage: 'https://example.com/loading.png',
|
|
673
|
+
* },
|
|
655
674
|
* );
|
|
656
675
|
*/
|
|
657
|
-
declare function
|
|
676
|
+
declare function integrateMetabox(configuratorId: string, containerId: string | undefined, apiReadyCallback: (api: Communicator) => void, config?: IntegrateMetaboxConfig): void;
|
|
658
677
|
|
|
659
678
|
/**
|
|
660
679
|
* Saves an image by triggering a download.
|
|
@@ -687,6 +706,8 @@ declare function setUrlParams(state: Record<string, string>): void;
|
|
|
687
706
|
*/
|
|
688
707
|
declare function getUrlParams(): Record<string, string>;
|
|
689
708
|
|
|
709
|
+
declare const prepareIframeSrc: (configuratorId: string, config?: IntegrateMetaboxConfig) => string;
|
|
710
|
+
|
|
690
711
|
/**
|
|
691
712
|
* Wrapper helper function to use it with rxJs the same as `fromEvent` to listen to events from the Communicator.
|
|
692
713
|
* @param {Communicator} target
|
|
@@ -705,7 +726,7 @@ declare class MetaboxConfig extends CommandBase {
|
|
|
705
726
|
* @param {string} appId - The unique identifier for the Communicator Instance
|
|
706
727
|
* @param {MetaboxCommandConfig} config - optional initial config: standalone - if true - disable metabox custom template and all logic
|
|
707
728
|
*/
|
|
708
|
-
constructor(appId: string, config
|
|
729
|
+
constructor(appId: string, config: MetaboxCommandConfig);
|
|
709
730
|
}
|
|
710
731
|
|
|
711
732
|
/**
|
|
@@ -719,7 +740,7 @@ declare class MetaboxConfig extends CommandBase {
|
|
|
719
740
|
* @example
|
|
720
741
|
* import { GetPdf, Communicator } from '@3dsource/metabox-front-api';
|
|
721
742
|
* window.env3DSource.apiReady = (api: Communicator) => {
|
|
722
|
-
* api.
|
|
743
|
+
* api.sendCommandToMetabox(new GetPdf());
|
|
723
744
|
* };
|
|
724
745
|
*/
|
|
725
746
|
declare class GetPdf extends CommandBase {
|
|
@@ -743,7 +764,7 @@ declare class GetPdf extends CommandBase {
|
|
|
743
764
|
* @example
|
|
744
765
|
* import { GetCallToActionInformation, Communicator } from '@3dsource/metabox-front-api';
|
|
745
766
|
* window.env3DSource.apiReady = (api: Communicator) => {
|
|
746
|
-
* api.
|
|
767
|
+
* api.sendCommandToMetabox(new GetCallToActionInformation());
|
|
747
768
|
* };
|
|
748
769
|
*/
|
|
749
770
|
declare class GetCallToActionInformation extends CommandBase {
|
|
@@ -767,7 +788,7 @@ declare class GetCallToActionInformation extends CommandBase {
|
|
|
767
788
|
* @example
|
|
768
789
|
* import { ResetCamera, Communicator } from '@3dsource/metabox-front-api';
|
|
769
790
|
* window.env3DSource.apiReady = (api: Communicator) => {
|
|
770
|
-
* api.
|
|
791
|
+
* api.sendCommandToMetabox(new ResetCamera());
|
|
771
792
|
* };
|
|
772
793
|
*/
|
|
773
794
|
declare class ResetCamera extends CommandBase {
|
|
@@ -790,8 +811,8 @@ declare class ResetCamera extends CommandBase {
|
|
|
790
811
|
* @example
|
|
791
812
|
* import { ApplyZoom, Communicator } from '@3dsource/metabox-front-api';
|
|
792
813
|
* window.env3DSource.apiReady = (api: Communicator) => {
|
|
793
|
-
* api.
|
|
794
|
-
* api.
|
|
814
|
+
* api.sendCommandToMetabox(new ApplyZoom(10));
|
|
815
|
+
* api.sendCommandToMetabox(new ApplyZoom(-10));
|
|
795
816
|
* };
|
|
796
817
|
*/
|
|
797
818
|
declare class ApplyZoom extends CommandBase {
|
|
@@ -816,15 +837,17 @@ declare class ApplyZoom extends CommandBase {
|
|
|
816
837
|
* ```typescript
|
|
817
838
|
* import { InitShowcase, Communicator } from '@3dsource/metabox-front-api';
|
|
818
839
|
* window.env3DSource.apiReady = (api: Communicator) => {
|
|
819
|
-
* api.
|
|
840
|
+
* api.sendCommandToMetabox(new InitShowcase());
|
|
820
841
|
* };
|
|
821
842
|
*/
|
|
822
843
|
declare class InitShowcase extends CommandBase {
|
|
823
844
|
/**
|
|
824
845
|
* Creates an instance of InitShowcase.
|
|
825
|
-
*
|
|
846
|
+
*
|
|
847
|
+
* @remarks
|
|
848
|
+
* This constructor does not require any parameters.
|
|
826
849
|
*/
|
|
827
|
-
constructor(
|
|
850
|
+
constructor();
|
|
828
851
|
}
|
|
829
852
|
|
|
830
853
|
/**
|
|
@@ -837,7 +860,7 @@ declare class InitShowcase extends CommandBase {
|
|
|
837
860
|
* @example
|
|
838
861
|
* import { PlayShowcase, Communicator } from '@3dsource/metabox-front-api';
|
|
839
862
|
* window.env3DSource.apiReady = (api: Communicator) => {
|
|
840
|
-
* api.
|
|
863
|
+
* api.sendCommandToMetabox(new PlayShowcase());
|
|
841
864
|
* };
|
|
842
865
|
*/
|
|
843
866
|
declare class PlayShowcase extends CommandBase {
|
|
@@ -869,7 +892,7 @@ declare class UnrealCommand extends CommandBase {
|
|
|
869
892
|
* @example
|
|
870
893
|
* import { PauseShowcase, Communicator } from '@3dsource/metabox-front-api';
|
|
871
894
|
* window.env3DSource.apiReady = (api: Communicator) => {
|
|
872
|
-
* api.
|
|
895
|
+
* api.sendCommandToMetabox(new PauseShowcase());
|
|
873
896
|
* };
|
|
874
897
|
*/
|
|
875
898
|
declare class PauseShowcase extends CommandBase {
|
|
@@ -892,7 +915,7 @@ declare class PauseShowcase extends CommandBase {
|
|
|
892
915
|
* @example
|
|
893
916
|
* import { StopShowcase, Communicator } from '@3dsource/metabox-front-api';
|
|
894
917
|
* window.env3DSource.apiReady = (api: Communicator) => {
|
|
895
|
-
* api.
|
|
918
|
+
* api.sendCommandToMetabox(new StopShowcase());
|
|
896
919
|
* };
|
|
897
920
|
*/
|
|
898
921
|
declare class StopShowcase extends CommandBase {
|
|
@@ -924,7 +947,7 @@ type MimeType = 'image/png' | 'image/jpeg' | 'image/webp';
|
|
|
924
947
|
* // Process the get screenshot response
|
|
925
948
|
* saveImage(data, 'Render.png');
|
|
926
949
|
* });
|
|
927
|
-
* api.
|
|
950
|
+
* api.sendCommandToMetabox(new GetScreenshot('image/png', { x: 1024, y: 1024 }));
|
|
928
951
|
* };
|
|
929
952
|
*/
|
|
930
953
|
declare class GetScreenshot extends CommandBase {
|
|
@@ -968,19 +991,19 @@ declare class SetProduct extends CommandBase {
|
|
|
968
991
|
* Represents a command to set a material by its slot ID and Material ID.
|
|
969
992
|
*
|
|
970
993
|
* @example
|
|
971
|
-
* import {
|
|
994
|
+
* import { SetProductMaterial, Communicator } from '@3dsource/metabox-front-api';
|
|
972
995
|
*
|
|
973
996
|
* //...Assume that the integration is already implemented
|
|
974
997
|
* window.env3DSource.apiReady = (api: Communicator) => {
|
|
975
|
-
* api.
|
|
998
|
+
* api.sendCommandToMetabox(new SetProductMaterial(
|
|
976
999
|
* 'carpaint',
|
|
977
1000
|
* 'dd829d6e-9200-47a7-8d5b-af5df89b7e91',
|
|
978
1001
|
* ));
|
|
979
1002
|
* };
|
|
980
1003
|
*/
|
|
981
|
-
declare class
|
|
1004
|
+
declare class SetProductMaterial extends CommandBase {
|
|
982
1005
|
/**
|
|
983
|
-
* Creates an instance of
|
|
1006
|
+
* Creates an instance of SetProductMaterial.
|
|
984
1007
|
*
|
|
985
1008
|
* @param {string} slotId - The slot ID.
|
|
986
1009
|
* @param {string} materialId - The material ID.
|
|
@@ -997,7 +1020,7 @@ declare class SetMaterial extends CommandBase {
|
|
|
997
1020
|
* //...Assume that the integration is already implemented
|
|
998
1021
|
* window.env3DSource.apiReady = (api: Communicator) => {
|
|
999
1022
|
* // Change the environment to '55555555-1234-1234-1234-01234567890'
|
|
1000
|
-
* api.
|
|
1023
|
+
* api.sendCommandToMetabox(new SetEnvironment('55555555-1234-1234-1234-01234567890'));
|
|
1001
1024
|
* };
|
|
1002
1025
|
*/
|
|
1003
1026
|
declare class SetEnvironment extends CommandBase {
|
|
@@ -1017,7 +1040,7 @@ declare class SetEnvironment extends CommandBase {
|
|
|
1017
1040
|
*
|
|
1018
1041
|
* //...Assume that the integration is already implemented
|
|
1019
1042
|
* window.env3DSource.apiReady = (api: Communicator) => {
|
|
1020
|
-
* api.
|
|
1043
|
+
* api.sendCommandToMetabox(new SetEnvironmentMaterial(
|
|
1021
1044
|
* 'carpaint',
|
|
1022
1045
|
* 'dd829d6e-9200-47a7-8d5b-af5df89b7e91',
|
|
1023
1046
|
* ));
|
|
@@ -1094,5 +1117,5 @@ declare class WatchCallbacks extends CommandBase {
|
|
|
1094
1117
|
constructor();
|
|
1095
1118
|
}
|
|
1096
1119
|
|
|
1097
|
-
export {
|
|
1098
|
-
export type { ApplicationDeviceTypes, ConfiguratorEnvelope, Cta, EcomConfigurator, Environment, FromMetaBoxAPIEnvelope, FromMetaBoxApiEvents, FromMetaBoxMessage, FromMetaboxApiAction, FromMetaboxMessagePayloads, Listener, MCAppLoaded, Material, MetaBoxApiEnvelope, MetaProperty, MetaboxEnvironment, MimeType, Product, SelectedIds, ShowCaseStatus, Showcase, Slot, Thumbnail, Timecode, ToMetaBoxActions, ToMetaBoxMessage, ToMetaBoxMessageEnvelope, ToMetaboxMessagePayload, ToMetaboxMessagePayloads, UniversalConfigurator, UniversalConfiguratorEnvironment, UniversalConfiguratorProduct, VideoResolution };
|
|
1120
|
+
export { AppLoaded, ApplyZoom, BasicRouteUrl, CommandBase, Communicator, EventDispatcher, GetCallToActionInformation, GetPdf, GetScreenshot, InitShowcase, Metabox, MetaboxBasicConfiguratorActions, MetaboxConfig, MetaboxData, MetaboxDomain, MetaboxHost, PauseShowcase, PlayShowcase, ResetCamera, SetEnvironment, SetEnvironmentMaterial, SetProduct, SetProductMaterial, ShowEmbeddedMenu, ShowOverlayInterface, StopShowcase, UnrealCommand, VERSION, WatchCallbacks, fromCommunicatorEvent, getUrlParams, integrateMetabox, prepareIframeSrc, saveImage, setUrlParams };
|
|
1121
|
+
export type { ApplicationDeviceTypes, ConfiguratorEnvelope, Cta, EcomConfigurator, Environment, FromMetaBoxAPIEnvelope, FromMetaBoxApiEvents, FromMetaBoxMessage, FromMetaboxApiAction, FromMetaboxMessagePayloads, IntegrateMetaboxConfig, Listener, MCAppLoaded, Material, MetaBoxApiEnvelope, MetaProperty, MetaboxCommandConfig, MetaboxEnvironment, MimeType, Product, SelectedIds, ShowCaseStatus, Showcase, Slot, Thumbnail, Timecode, ToMetaBoxActions, ToMetaBoxMessage, ToMetaBoxMessageEnvelope, ToMetaboxMessagePayload, ToMetaboxMessagePayloads, UniversalConfigurator, UniversalConfiguratorEnvironment, UniversalConfiguratorProduct, VideoResolution };
|