@plattar/plattar-ar-adapter 1.123.8 → 1.128.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/build/es2015/plattar-ar-adapter.js +58 -16
- package/build/es2015/plattar-ar-adapter.min.js +1 -1
- package/build/es2019/plattar-ar-adapter.js +36 -6
- package/build/es2019/plattar-ar-adapter.min.js +2 -2
- package/dist/embed/controllers/product-controller.js +8 -0
- package/dist/embed/controllers/viewer-controller.js +8 -0
- package/dist/index.js +5 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +7 -7
|
@@ -58,10 +58,14 @@ class ProductController extends plattar_controller_1.PlattarController {
|
|
|
58
58
|
}
|
|
59
59
|
// optional attributes
|
|
60
60
|
const variationID = this.getAttribute("variation-id");
|
|
61
|
+
const showAR = this.getAttribute("show-ar");
|
|
61
62
|
let dst = plattar_api_1.Server.location().base + "renderer/product.html?product_id=" + productID;
|
|
62
63
|
if (variationID) {
|
|
63
64
|
dst += "&variation_id=" + variationID;
|
|
64
65
|
}
|
|
66
|
+
if (showAR) {
|
|
67
|
+
dst += "&show_ar=" + showAR;
|
|
68
|
+
}
|
|
65
69
|
viewer.setAttribute("url", opt.url || dst);
|
|
66
70
|
viewer.onload = () => {
|
|
67
71
|
return accept(viewer);
|
|
@@ -92,9 +96,13 @@ class ProductController extends plattar_controller_1.PlattarController {
|
|
|
92
96
|
viewer.setAttribute("product-id", productID);
|
|
93
97
|
// optional attributes
|
|
94
98
|
const variationID = this.getAttribute("variation-id");
|
|
99
|
+
const showAR = this.getAttribute("show-ar");
|
|
95
100
|
if (variationID) {
|
|
96
101
|
viewer.setAttribute("variation-id", variationID);
|
|
97
102
|
}
|
|
103
|
+
if (showAR) {
|
|
104
|
+
viewer.setAttribute("show-ar", showAR);
|
|
105
|
+
}
|
|
98
106
|
viewer.onload = () => {
|
|
99
107
|
return accept(viewer);
|
|
100
108
|
};
|
|
@@ -63,12 +63,16 @@ class ViewerController extends plattar_controller_1.PlattarController {
|
|
|
63
63
|
// optional attributes
|
|
64
64
|
const productID = (this.getAttribute("product-id") || this.getAttribute("scene-product-id"));
|
|
65
65
|
const variationID = this.getAttribute("variation-id");
|
|
66
|
+
const showAR = this.getAttribute("show-ar");
|
|
66
67
|
if (productID) {
|
|
67
68
|
dst += "&productId=" + productID;
|
|
68
69
|
}
|
|
69
70
|
if (variationID) {
|
|
70
71
|
dst += "&variationId=" + variationID;
|
|
71
72
|
}
|
|
73
|
+
if (showAR) {
|
|
74
|
+
dst += "&show_ar=" + showAR;
|
|
75
|
+
}
|
|
72
76
|
viewer.setAttribute("url", opt.url || dst);
|
|
73
77
|
viewer.onload = () => {
|
|
74
78
|
return accept(viewer);
|
|
@@ -100,12 +104,16 @@ class ViewerController extends plattar_controller_1.PlattarController {
|
|
|
100
104
|
// optional attributes
|
|
101
105
|
const productID = (this.getAttribute("product-id") || this.getAttribute("scene-product-id"));
|
|
102
106
|
const variationID = this.getAttribute("variation-id");
|
|
107
|
+
const showAR = this.getAttribute("show-ar");
|
|
103
108
|
if (productID) {
|
|
104
109
|
viewer.setAttribute("product-id", productID);
|
|
105
110
|
}
|
|
106
111
|
if (variationID) {
|
|
107
112
|
viewer.setAttribute("variation-id", variationID);
|
|
108
113
|
}
|
|
114
|
+
if (showAR) {
|
|
115
|
+
viewer.setAttribute("show-ar", showAR);
|
|
116
|
+
}
|
|
109
117
|
viewer.onload = () => {
|
|
110
118
|
return accept(viewer);
|
|
111
119
|
};
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "1.
|
|
1
|
+
declare const _default: "1.128.1";
|
|
2
2
|
export default _default;
|
package/dist/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plattar/plattar-ar-adapter",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.128.1",
|
|
4
4
|
"description": "Plattar AR Adapter for interfacing with Google & Apple WebAR",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -37,19 +37,19 @@
|
|
|
37
37
|
},
|
|
38
38
|
"homepage": "https://www.plattar.com",
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@plattar/plattar-analytics": "^1.
|
|
40
|
+
"@plattar/plattar-analytics": "^1.124.1",
|
|
41
41
|
"@plattar/plattar-api": "^1.120.1",
|
|
42
42
|
"@plattar/plattar-qrcode": "1.122.1",
|
|
43
43
|
"@plattar/plattar-services": "^1.120.1",
|
|
44
|
-
"@plattar/plattar-web": "^1.
|
|
44
|
+
"@plattar/plattar-web": "^1.128.1"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@babel/cli": "^7.17.
|
|
48
|
-
"@babel/core": "^7.17.
|
|
47
|
+
"@babel/cli": "^7.17.6",
|
|
48
|
+
"@babel/core": "^7.17.9",
|
|
49
49
|
"@babel/preset-env": "^7.16.11",
|
|
50
50
|
"browserify": "^17.0.0",
|
|
51
|
-
"typescript": "^4.
|
|
52
|
-
"uglify-js": "^3.15.
|
|
51
|
+
"typescript": "^4.6.3",
|
|
52
|
+
"uglify-js": "^3.15.4"
|
|
53
53
|
},
|
|
54
54
|
"publishConfig": {
|
|
55
55
|
"access": "public"
|