@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
|
@@ -973,10 +973,14 @@ class ProductController extends plattar_controller_1.PlattarController {
|
|
|
973
973
|
}
|
|
974
974
|
// optional attributes
|
|
975
975
|
const variationID = this.getAttribute("variation-id");
|
|
976
|
+
const showAR = this.getAttribute("show-ar");
|
|
976
977
|
let dst = plattar_api_1.Server.location().base + "renderer/product.html?product_id=" + productID;
|
|
977
978
|
if (variationID) {
|
|
978
979
|
dst += "&variation_id=" + variationID;
|
|
979
980
|
}
|
|
981
|
+
if (showAR) {
|
|
982
|
+
dst += "&show_ar=" + showAR;
|
|
983
|
+
}
|
|
980
984
|
viewer.setAttribute("url", opt.url || dst);
|
|
981
985
|
viewer.onload = () => {
|
|
982
986
|
return accept(viewer);
|
|
@@ -1007,9 +1011,13 @@ class ProductController extends plattar_controller_1.PlattarController {
|
|
|
1007
1011
|
viewer.setAttribute("product-id", productID);
|
|
1008
1012
|
// optional attributes
|
|
1009
1013
|
const variationID = this.getAttribute("variation-id");
|
|
1014
|
+
const showAR = this.getAttribute("show-ar");
|
|
1010
1015
|
if (variationID) {
|
|
1011
1016
|
viewer.setAttribute("variation-id", variationID);
|
|
1012
1017
|
}
|
|
1018
|
+
if (showAR) {
|
|
1019
|
+
viewer.setAttribute("show-ar", showAR);
|
|
1020
|
+
}
|
|
1013
1021
|
viewer.onload = () => {
|
|
1014
1022
|
return accept(viewer);
|
|
1015
1023
|
};
|
|
@@ -1115,12 +1123,16 @@ class ViewerController extends plattar_controller_1.PlattarController {
|
|
|
1115
1123
|
// optional attributes
|
|
1116
1124
|
const productID = (this.getAttribute("product-id") || this.getAttribute("scene-product-id"));
|
|
1117
1125
|
const variationID = this.getAttribute("variation-id");
|
|
1126
|
+
const showAR = this.getAttribute("show-ar");
|
|
1118
1127
|
if (productID) {
|
|
1119
1128
|
dst += "&productId=" + productID;
|
|
1120
1129
|
}
|
|
1121
1130
|
if (variationID) {
|
|
1122
1131
|
dst += "&variationId=" + variationID;
|
|
1123
1132
|
}
|
|
1133
|
+
if (showAR) {
|
|
1134
|
+
dst += "&show_ar=" + showAR;
|
|
1135
|
+
}
|
|
1124
1136
|
viewer.setAttribute("url", opt.url || dst);
|
|
1125
1137
|
viewer.onload = () => {
|
|
1126
1138
|
return accept(viewer);
|
|
@@ -1152,12 +1164,16 @@ class ViewerController extends plattar_controller_1.PlattarController {
|
|
|
1152
1164
|
// optional attributes
|
|
1153
1165
|
const productID = (this.getAttribute("product-id") || this.getAttribute("scene-product-id"));
|
|
1154
1166
|
const variationID = this.getAttribute("variation-id");
|
|
1167
|
+
const showAR = this.getAttribute("show-ar");
|
|
1155
1168
|
if (productID) {
|
|
1156
1169
|
viewer.setAttribute("product-id", productID);
|
|
1157
1170
|
}
|
|
1158
1171
|
if (variationID) {
|
|
1159
1172
|
viewer.setAttribute("variation-id", variationID);
|
|
1160
1173
|
}
|
|
1174
|
+
if (showAR) {
|
|
1175
|
+
viewer.setAttribute("show-ar", showAR);
|
|
1176
|
+
}
|
|
1161
1177
|
viewer.onload = () => {
|
|
1162
1178
|
return accept(viewer);
|
|
1163
1179
|
};
|
|
@@ -1598,7 +1614,11 @@ exports.default = PlattarEmbed;
|
|
|
1598
1614
|
"use strict";
|
|
1599
1615
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
1600
1616
|
if (k2 === undefined) k2 = k;
|
|
1601
|
-
Object.
|
|
1617
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
1618
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
1619
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
1620
|
+
}
|
|
1621
|
+
Object.defineProperty(o, k2, desc);
|
|
1602
1622
|
}) : (function(o, m, k, k2) {
|
|
1603
1623
|
if (k2 === undefined) k2 = k;
|
|
1604
1624
|
o[k2] = m[k];
|
|
@@ -1961,7 +1981,7 @@ exports.Util = Util;
|
|
|
1961
1981
|
},{}],16:[function(require,module,exports){
|
|
1962
1982
|
"use strict";
|
|
1963
1983
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1964
|
-
exports.default = "1.
|
|
1984
|
+
exports.default = "1.128.1";
|
|
1965
1985
|
|
|
1966
1986
|
},{}],17:[function(require,module,exports){
|
|
1967
1987
|
"use strict";
|
|
@@ -3374,7 +3394,11 @@ exports.Analytics = Analytics;
|
|
|
3374
3394
|
"use strict";
|
|
3375
3395
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3376
3396
|
if (k2 === undefined) k2 = k;
|
|
3377
|
-
Object.
|
|
3397
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
3398
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
3399
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
3400
|
+
}
|
|
3401
|
+
Object.defineProperty(o, k2, desc);
|
|
3378
3402
|
}) : (function(o, m, k, k2) {
|
|
3379
3403
|
if (k2 === undefined) k2 = k;
|
|
3380
3404
|
o[k2] = m[k];
|
|
@@ -3497,7 +3521,7 @@ exports.Util = Util;
|
|
|
3497
3521
|
},{}],41:[function(require,module,exports){
|
|
3498
3522
|
"use strict";
|
|
3499
3523
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3500
|
-
exports.default = "1.
|
|
3524
|
+
exports.default = "1.124.1";
|
|
3501
3525
|
|
|
3502
3526
|
},{}],42:[function(require,module,exports){
|
|
3503
3527
|
"use strict";
|
|
@@ -6539,7 +6563,7 @@ class EWallElement extends BaseElement {
|
|
|
6539
6563
|
}
|
|
6540
6564
|
}
|
|
6541
6565
|
|
|
6542
|
-
window.addEventListener(
|
|
6566
|
+
window.addEventListener("load", onLoad, false)
|
|
6543
6567
|
}
|
|
6544
6568
|
|
|
6545
6569
|
get permissions() {
|
|
@@ -6638,6 +6662,9 @@ class ProductElement extends BaseElement {
|
|
|
6638
6662
|
return [{
|
|
6639
6663
|
key: "variation-id",
|
|
6640
6664
|
map: "variation_id"
|
|
6665
|
+
}, {
|
|
6666
|
+
key: "show-ar",
|
|
6667
|
+
map: "show_ar"
|
|
6641
6668
|
}];
|
|
6642
6669
|
}
|
|
6643
6670
|
}
|
|
@@ -6684,6 +6711,9 @@ class ViewerElement extends BaseElement {
|
|
|
6684
6711
|
}, {
|
|
6685
6712
|
key: "product-id",
|
|
6686
6713
|
map: "productId"
|
|
6714
|
+
}, {
|
|
6715
|
+
key: "show-ar",
|
|
6716
|
+
map: "show_ar"
|
|
6687
6717
|
}];
|
|
6688
6718
|
}
|
|
6689
6719
|
}
|
|
@@ -6837,7 +6867,7 @@ class Util {
|
|
|
6837
6867
|
|
|
6838
6868
|
module.exports = Util;
|
|
6839
6869
|
},{}],129:[function(require,module,exports){
|
|
6840
|
-
module.exports = "1.
|
|
6870
|
+
module.exports = "1.128.1";
|
|
6841
6871
|
|
|
6842
6872
|
},{}],130:[function(require,module,exports){
|
|
6843
6873
|
(function (global){(function (){
|