@plattar/plattar-ar-adapter 1.167.11 → 1.167.12
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 +36 -25
- package/build/es2015/plattar-ar-adapter.min.js +1 -1
- package/build/es2019/plattar-ar-adapter.js +14 -3
- package/build/es2019/plattar-ar-adapter.min.js +1 -1
- package/dist/embed/controllers/configurator-controller.js +1 -1
- package/dist/embed/controllers/plattar-controller.js +11 -0
- package/dist/embed/controllers/vto-controller.js +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
|
@@ -1651,16 +1651,17 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
1651
1651
|
case 4:
|
|
1652
1652
|
// optional attributes
|
|
1653
1653
|
configState = null;
|
|
1654
|
-
|
|
1655
|
-
_context8.
|
|
1654
|
+
this._state = plattar_controller_1.ControllerState.Renderer;
|
|
1655
|
+
_context8.prev = 6;
|
|
1656
|
+
_context8.next = 9;
|
|
1656
1657
|
return this.getConfiguratorState();
|
|
1657
|
-
case
|
|
1658
|
+
case 9:
|
|
1658
1659
|
dState = _context8.sent;
|
|
1659
1660
|
// if this is declared, we have a furniture scene that we need to re-create the embed
|
|
1660
1661
|
// with new attributes
|
|
1661
1662
|
product = dState.state.firstOfType("product");
|
|
1662
1663
|
if (!product) {
|
|
1663
|
-
_context8.next =
|
|
1664
|
+
_context8.next = 21;
|
|
1664
1665
|
break;
|
|
1665
1666
|
}
|
|
1666
1667
|
this.parent.lockObserver();
|
|
@@ -1670,22 +1671,22 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
1670
1671
|
this.parent.unlockObserver();
|
|
1671
1672
|
controller = this.parent.create();
|
|
1672
1673
|
if (!controller) {
|
|
1673
|
-
_context8.next =
|
|
1674
|
+
_context8.next = 20;
|
|
1674
1675
|
break;
|
|
1675
1676
|
}
|
|
1676
1677
|
return _context8.abrupt("return", controller.startRenderer());
|
|
1677
|
-
case 19:
|
|
1678
|
-
return _context8.abrupt("return", Promise.reject(new Error("ConfiguratorController.startRenderer() - legacy product transition failed")));
|
|
1679
1678
|
case 20:
|
|
1679
|
+
return _context8.abrupt("return", Promise.reject(new Error("ConfiguratorController.startRenderer() - legacy product transition failed")));
|
|
1680
|
+
case 21:
|
|
1680
1681
|
configState = dState;
|
|
1681
|
-
_context8.next =
|
|
1682
|
+
_context8.next = 27;
|
|
1682
1683
|
break;
|
|
1683
|
-
case
|
|
1684
|
-
_context8.prev =
|
|
1685
|
-
_context8.t0 = _context8["catch"](
|
|
1684
|
+
case 24:
|
|
1685
|
+
_context8.prev = 24;
|
|
1686
|
+
_context8.t0 = _context8["catch"](6);
|
|
1686
1687
|
// config state is not available
|
|
1687
1688
|
configState = null;
|
|
1688
|
-
case
|
|
1689
|
+
case 27:
|
|
1689
1690
|
// required attributes with defaults for plattar-configurator node
|
|
1690
1691
|
width = this.getAttribute("width") || "500px";
|
|
1691
1692
|
height = this.getAttribute("height") || "500px";
|
|
@@ -1707,7 +1708,6 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
1707
1708
|
if (showUI) {
|
|
1708
1709
|
viewer.setAttribute("show-ui", showUI);
|
|
1709
1710
|
}
|
|
1710
|
-
this._state = plattar_controller_1.ControllerState.Renderer;
|
|
1711
1711
|
return _context8.abrupt("return", new Promise(function (accept, reject) {
|
|
1712
1712
|
_this16.append(viewer);
|
|
1713
1713
|
if (configState) {
|
|
@@ -1719,7 +1719,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
1719
1719
|
case "end":
|
|
1720
1720
|
return _context8.stop();
|
|
1721
1721
|
}
|
|
1722
|
-
}, _callee8, this, [[
|
|
1722
|
+
}, _callee8, this, [[6, 24]]);
|
|
1723
1723
|
}));
|
|
1724
1724
|
function startRenderer() {
|
|
1725
1725
|
return _startRenderer.apply(this, arguments);
|
|
@@ -2289,9 +2289,20 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
2289
2289
|
}, {
|
|
2290
2290
|
key: "append",
|
|
2291
2291
|
value: function append(element) {
|
|
2292
|
+
if (this._element !== element) {
|
|
2293
|
+
return;
|
|
2294
|
+
}
|
|
2295
|
+
// ensure append only allows a single element in the shadow DOM
|
|
2292
2296
|
var shadow = this.parent.shadowRoot || this.parent.attachShadow({
|
|
2293
2297
|
mode: 'open'
|
|
2294
2298
|
});
|
|
2299
|
+
if (shadow) {
|
|
2300
|
+
var child = shadow.lastElementChild;
|
|
2301
|
+
while (child) {
|
|
2302
|
+
shadow.removeChild(child);
|
|
2303
|
+
child = shadow.lastElementChild;
|
|
2304
|
+
}
|
|
2305
|
+
}
|
|
2295
2306
|
shadow.append(element);
|
|
2296
2307
|
}
|
|
2297
2308
|
/**
|
|
@@ -2853,6 +2864,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
2853
2864
|
}
|
|
2854
2865
|
throw new Error("VTOController.startRenderer() - minimum required attributes not set, use scene-id as a minimum");
|
|
2855
2866
|
case 4:
|
|
2867
|
+
this._state = plattar_controller_1.ControllerState.Renderer;
|
|
2856
2868
|
// required attributes with defaults for plattar-facear node
|
|
2857
2869
|
width = this.getAttribute("width") || "500px";
|
|
2858
2870
|
height = this.getAttribute("height") || "500px";
|
|
@@ -2865,19 +2877,19 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
2865
2877
|
viewer.setAttribute("scene-id", sceneID);
|
|
2866
2878
|
// optional attributes
|
|
2867
2879
|
configState = null;
|
|
2868
|
-
_context21.prev =
|
|
2869
|
-
_context21.next =
|
|
2880
|
+
_context21.prev = 15;
|
|
2881
|
+
_context21.next = 18;
|
|
2870
2882
|
return this.getConfiguratorState();
|
|
2871
|
-
case
|
|
2883
|
+
case 18:
|
|
2872
2884
|
configState = _context21.sent;
|
|
2873
|
-
_context21.next =
|
|
2885
|
+
_context21.next = 24;
|
|
2874
2886
|
break;
|
|
2875
|
-
case
|
|
2876
|
-
_context21.prev =
|
|
2877
|
-
_context21.t0 = _context21["catch"](
|
|
2887
|
+
case 21:
|
|
2888
|
+
_context21.prev = 21;
|
|
2889
|
+
_context21.t0 = _context21["catch"](15);
|
|
2878
2890
|
// config state not available
|
|
2879
2891
|
configState = null;
|
|
2880
|
-
case
|
|
2892
|
+
case 24:
|
|
2881
2893
|
showAR = this.getAttribute("show-ar");
|
|
2882
2894
|
productID = this.getAttribute("product-id");
|
|
2883
2895
|
sceneProductID = this.getAttribute("scene-product-id");
|
|
@@ -2897,7 +2909,6 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
2897
2909
|
if (variationID) {
|
|
2898
2910
|
viewer.setAttribute("variation-id", variationID);
|
|
2899
2911
|
}
|
|
2900
|
-
this._state = plattar_controller_1.ControllerState.Renderer;
|
|
2901
2912
|
return _context21.abrupt("return", new Promise(function (accept, reject) {
|
|
2902
2913
|
_this24.append(viewer);
|
|
2903
2914
|
if (configState) {
|
|
@@ -2909,7 +2920,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
2909
2920
|
case "end":
|
|
2910
2921
|
return _context21.stop();
|
|
2911
2922
|
}
|
|
2912
|
-
}, _callee21, this, [[
|
|
2923
|
+
}, _callee21, this, [[15, 21]]);
|
|
2913
2924
|
}));
|
|
2914
2925
|
function startRenderer() {
|
|
2915
2926
|
return _startRenderer2.apply(this, arguments);
|
|
@@ -4235,7 +4246,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
4235
4246
|
Object.defineProperty(exports, "__esModule", {
|
|
4236
4247
|
value: true
|
|
4237
4248
|
});
|
|
4238
|
-
exports["default"] = "1.167.
|
|
4249
|
+
exports["default"] = "1.167.12";
|
|
4239
4250
|
}, {}],
|
|
4240
4251
|
17: [function (require, module, exports) {
|
|
4241
4252
|
"use strict";
|