@3dsource/metabox-front-api 0.1.0-dev.0 → 1.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/dist/actions/GetFastRender.d.ts +2 -0
- package/dist/actions/GetScreenshot.d.ts +1 -1
- package/dist/index.esm.js +2 -2
- package/dist/index.umd.js +2 -2
- package/dist/interfaces/FromMetaboxMessagePayloads.d.ts +2 -1
- package/dist/interfaces/UniversalConfigurator.d.ts +0 -6
- package/package.json +3 -2
|
@@ -14,7 +14,7 @@ export type MimeType = 'image/png' | 'image/jpeg' | 'image/webp';
|
|
|
14
14
|
* import { GetScreenshot,Communicator,saveImage } from '@3dsource/metabox-front-api';
|
|
15
15
|
* window.env3DSource.apiReady = (api:Communicator) => {
|
|
16
16
|
* // Listen for events from the MetaBox API
|
|
17
|
-
* api.addEventListener('
|
|
17
|
+
* api.addEventListener('screenshot', (data) => {
|
|
18
18
|
* // Process the fast render response
|
|
19
19
|
* saveImage(data, 'Render.png');
|
|
20
20
|
* });
|
package/dist/index.esm.js
CHANGED
|
@@ -231,7 +231,7 @@ class SetEnvironmentMaterial extends CommandBase {
|
|
|
231
231
|
* import { GetScreenshot,Communicator,saveImage } from '@3dsource/metabox-front-api';
|
|
232
232
|
* window.env3DSource.apiReady = (api:Communicator) => {
|
|
233
233
|
* // Listen for events from the MetaBox API
|
|
234
|
-
* api.addEventListener('
|
|
234
|
+
* api.addEventListener('screenshot', (data) => {
|
|
235
235
|
* // Process the fast render response
|
|
236
236
|
* saveImage(data, 'Render.png');
|
|
237
237
|
* });
|
|
@@ -376,7 +376,7 @@ class Communicator extends EventDispatcher {
|
|
|
376
376
|
const { data } = command;
|
|
377
377
|
const iframe = document.getElementById('embeddedContent');
|
|
378
378
|
if (!(iframe === null || iframe === void 0 ? void 0 : iframe.contentWindow)) {
|
|
379
|
-
console.warn('MetaBox
|
|
379
|
+
console.warn('MetaBox IFrame not found or not ready.');
|
|
380
380
|
return;
|
|
381
381
|
}
|
|
382
382
|
const message = {
|
package/dist/index.umd.js
CHANGED
|
@@ -235,7 +235,7 @@
|
|
|
235
235
|
* import { GetScreenshot,Communicator,saveImage } from '@3dsource/metabox-front-api';
|
|
236
236
|
* window.env3DSource.apiReady = (api:Communicator) => {
|
|
237
237
|
* // Listen for events from the MetaBox API
|
|
238
|
-
* api.addEventListener('
|
|
238
|
+
* api.addEventListener('screenshot', (data) => {
|
|
239
239
|
* // Process the fast render response
|
|
240
240
|
* saveImage(data, 'Render.png');
|
|
241
241
|
* });
|
|
@@ -380,7 +380,7 @@
|
|
|
380
380
|
const { data } = command;
|
|
381
381
|
const iframe = document.getElementById('embeddedContent');
|
|
382
382
|
if (!(iframe === null || iframe === void 0 ? void 0 : iframe.contentWindow)) {
|
|
383
|
-
console.warn('MetaBox
|
|
383
|
+
console.warn('MetaBox IFrame not found or not ready.');
|
|
384
384
|
return;
|
|
385
385
|
}
|
|
386
386
|
const message = {
|
|
@@ -28,7 +28,7 @@ export interface FromMetaboxMessagePayloads {
|
|
|
28
28
|
*/
|
|
29
29
|
statusMessage: string | null;
|
|
30
30
|
/**
|
|
31
|
-
* @
|
|
31
|
+
* @deprecated
|
|
32
32
|
* @hidden
|
|
33
33
|
* Dispatches every time when the freeze-frame is arrived or updated.
|
|
34
34
|
*/
|
|
@@ -48,6 +48,7 @@ export interface FromMetaboxMessagePayloads {
|
|
|
48
48
|
* Dispatches every time when Unreal is sending ordered render with new GetFastRender() command.
|
|
49
49
|
*/
|
|
50
50
|
screenshot: string | null;
|
|
51
|
+
getScreenshot: string | null;
|
|
51
52
|
/**
|
|
52
53
|
* @hidden
|
|
53
54
|
* @deprecated, use screenshot
|
|
@@ -190,27 +190,21 @@ export type SelectedIds = Record<string, Record<string, string>>;
|
|
|
190
190
|
*/
|
|
191
191
|
export interface SelectedConfigurationForQuote {
|
|
192
192
|
product: {
|
|
193
|
-
id: string;
|
|
194
193
|
externalId: string;
|
|
195
194
|
title: string;
|
|
196
195
|
slots: {
|
|
197
|
-
id: string;
|
|
198
196
|
label: string;
|
|
199
197
|
material: {
|
|
200
|
-
id: string;
|
|
201
198
|
externalId: string;
|
|
202
199
|
title: string;
|
|
203
200
|
};
|
|
204
201
|
}[];
|
|
205
202
|
};
|
|
206
203
|
environment?: {
|
|
207
|
-
id: string;
|
|
208
204
|
title: string;
|
|
209
205
|
slots: {
|
|
210
|
-
id: string;
|
|
211
206
|
label: string;
|
|
212
207
|
material: {
|
|
213
|
-
id: string;
|
|
214
208
|
externalId: string;
|
|
215
209
|
title: string;
|
|
216
210
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@3dsource/metabox-front-api",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "API for MetaBox BASIC configurator",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"metabox",
|
|
@@ -34,8 +34,9 @@
|
|
|
34
34
|
"build": "rollup -c",
|
|
35
35
|
"bump:dev": "npm version prerelease --preid=dev && npm run publish:dev",
|
|
36
36
|
"bump:minor": "npm version minor && npm run publish:prod",
|
|
37
|
-
"bump:preminor:beta": "npm version preminor --preid=beta && npm run publish --tag beta",
|
|
37
|
+
"bump:preminor:beta": "npm version preminor --preid=beta && npm run publish:dev --tag beta",
|
|
38
38
|
"bump:preminor:dev": "npm version preminor --preid=dev && npm run publish:dev",
|
|
39
|
+
"bump:prepatch:beta": "npm version prepatch --preid=beta && npm run publish:dev --tag beta",
|
|
39
40
|
"bump:prod": "npm version patch && npm run publish:prod",
|
|
40
41
|
"clean": "rimraf dist",
|
|
41
42
|
"packAll": "npm run clean && npm run build && npm pack",
|