@plattar/plattar-ar-adapter 1.194.1 → 2.5.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.
|
@@ -8,7 +8,7 @@ function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArra
|
|
|
8
8
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
9
9
|
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
10
10
|
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
11
|
-
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var
|
|
11
|
+
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var n = 0, F = function F() {}; return { s: F, n: function (_n2) { function n() { return _n2.apply(this, arguments); } n.toString = function () { return _n2.toString(); }; return n; }(function () { return n >= r.length ? { done: !0 } : { done: !1, value: r[n++] }; }), e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
12
12
|
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
13
13
|
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
14
14
|
function _readOnlyError(r) { throw new TypeError('"' + r + '" is read-only'); }
|
|
@@ -5624,7 +5624,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
5624
5624
|
Object.defineProperty(exports, "__esModule", {
|
|
5625
5625
|
value: true
|
|
5626
5626
|
});
|
|
5627
|
-
exports["default"] = "
|
|
5627
|
+
exports["default"] = "2.5.1";
|
|
5628
5628
|
}, {}],
|
|
5629
5629
|
21: [function (require, module, exports) {
|
|
5630
5630
|
"use strict";
|
|
@@ -11323,9 +11323,21 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
11323
11323
|
return "none";
|
|
11324
11324
|
}
|
|
11325
11325
|
}, {
|
|
11326
|
-
key: "
|
|
11326
|
+
key: "elementFullLocation",
|
|
11327
11327
|
get: function get() {
|
|
11328
|
-
|
|
11328
|
+
var server = this.hasAttribute("server") ? this.getAttribute("server") : "production";
|
|
11329
|
+
var serverLocation = Util.getServerLocation(server);
|
|
11330
|
+
if (serverLocation === undefined) {
|
|
11331
|
+
throw new Error("BaseElement.elementFullLocation - attribute \"server\" must be one of \"production\", \"staging\", \"review\" or \"dev\" but was \"".concat(server, "\""));
|
|
11332
|
+
}
|
|
11333
|
+
var embedLocation = Util.getElementLocation(this.elementType);
|
|
11334
|
+
if (embedLocation === undefined) {
|
|
11335
|
+
throw new Error("BaseElement.elementFullLocation - element named \"".concat(this.elementType, "\" is invalid"));
|
|
11336
|
+
}
|
|
11337
|
+
if (serverLocation === Util.getServerLocation('dev')) {
|
|
11338
|
+
return "".concat(serverLocation, "renderer/").concat(embedLocation).concat(this.allMappedAttributesQuery);
|
|
11339
|
+
}
|
|
11340
|
+
return "".concat(serverLocation).concat(embedLocation).concat(this.allMappedAttributesQuery);
|
|
11329
11341
|
}
|
|
11330
11342
|
}]);
|
|
11331
11343
|
}(/*#__PURE__*/_wrapNativeSuper(HTMLElement));
|
|
@@ -11354,13 +11366,27 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
11354
11366
|
return "configurator";
|
|
11355
11367
|
}
|
|
11356
11368
|
}, {
|
|
11357
|
-
key: "
|
|
11369
|
+
key: "elementFullLocation",
|
|
11358
11370
|
get: function get() {
|
|
11359
11371
|
if (this.hasAttribute("show-ui")) {
|
|
11360
11372
|
var state = this.getAttribute("show-ui");
|
|
11361
|
-
|
|
11373
|
+
if (state === "true") {
|
|
11374
|
+
var server = this.hasAttribute("server") ? this.getAttribute("server") : "production";
|
|
11375
|
+
switch (server) {
|
|
11376
|
+
case "production":
|
|
11377
|
+
return "https://configurator.plattar.com/index.html".concat(this.allMappedAttributesQuery);
|
|
11378
|
+
case "staging":
|
|
11379
|
+
return "https://configurator-staging.plattar.com/index.html".concat(this.allMappedAttributesQuery);
|
|
11380
|
+
case "review":
|
|
11381
|
+
return "https://configurator-review.plattar.com/index.html".concat(this.allMappedAttributesQuery);
|
|
11382
|
+
case "dev":
|
|
11383
|
+
return "https://localhost/configurator/dist/index.html".concat(this.allMappedAttributesQuery);
|
|
11384
|
+
default:
|
|
11385
|
+
throw new Error("ConfiguratorElement.elementFullLocation - attribute \"server\" must be one of \"production\", \"staging\", \"review\" or \"dev\" but was \"".concat(server, "\""));
|
|
11386
|
+
}
|
|
11387
|
+
}
|
|
11362
11388
|
}
|
|
11363
|
-
return _superPropGet(ConfiguratorElement, "
|
|
11389
|
+
return _superPropGet(ConfiguratorElement, "elementFullLocation", this, 1);
|
|
11364
11390
|
}
|
|
11365
11391
|
}, {
|
|
11366
11392
|
key: "optionalAttributes",
|
|
@@ -11431,15 +11457,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
11431
11457
|
}
|
|
11432
11458
|
var element = this._element;
|
|
11433
11459
|
this._server = element.hasAttribute("server") ? element.getAttribute("server") : "production";
|
|
11434
|
-
var
|
|
11435
|
-
if (serverLocation === undefined) {
|
|
11436
|
-
throw new Error("ElementController - attribute \"server\" must be one of \"production\", \"staging\", \"review\" or \"dev\"");
|
|
11437
|
-
}
|
|
11438
|
-
var embedLocation = element.elementLocation;
|
|
11439
|
-
if (embedLocation === undefined) {
|
|
11440
|
-
throw new Error("ElementController - element named \"" + elementType + "\" is invalid");
|
|
11441
|
-
}
|
|
11442
|
-
var source = serverLocation + embedLocation + element.allMappedAttributesQuery;
|
|
11460
|
+
var source = element.elementFullLocation;
|
|
11443
11461
|
|
|
11444
11462
|
// ensure iframe ID is randomly generated as we could have multiple iframes
|
|
11445
11463
|
// with same Scene ID - such as viewer and editor running on same page
|
|
@@ -12035,11 +12053,11 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
12035
12053
|
value: function getServerLocation(server) {
|
|
12036
12054
|
switch (server) {
|
|
12037
12055
|
case "production":
|
|
12038
|
-
return "https://
|
|
12056
|
+
return "https://renderer.plattar.com/";
|
|
12039
12057
|
case "staging":
|
|
12040
|
-
return "https://staging.plattar.
|
|
12058
|
+
return "https://renderer-staging.plattar.com/";
|
|
12041
12059
|
case "review":
|
|
12042
|
-
return "https://review.plattar.com/";
|
|
12060
|
+
return "https://renderer-review.plattar.com/";
|
|
12043
12061
|
case "dev":
|
|
12044
12062
|
return "https://localhost/";
|
|
12045
12063
|
default:
|
|
@@ -12051,7 +12069,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
12051
12069
|
value: function getElementLocation(etype) {
|
|
12052
12070
|
var isValid = Util.isValidType(etype);
|
|
12053
12071
|
if (isValid) {
|
|
12054
|
-
return "
|
|
12072
|
+
return "".concat(etype, ".html");
|
|
12055
12073
|
}
|
|
12056
12074
|
return undefined;
|
|
12057
12075
|
}
|
|
@@ -12097,7 +12115,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
12097
12115
|
module.exports = Util;
|
|
12098
12116
|
}, {}],
|
|
12099
12117
|
140: [function (require, module, exports) {
|
|
12100
|
-
module.exports = "
|
|
12118
|
+
module.exports = "2.5.3";
|
|
12101
12119
|
}, {}],
|
|
12102
12120
|
141: [function (require, module, exports) {
|
|
12103
12121
|
'use strict';
|
|
@@ -16515,11 +16533,11 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
16515
16533
|
if (r) {
|
|
16516
16534
|
var _r6 = null === (t = n.backgroundOptions) || void 0 === t ? void 0 : t.gradient,
|
|
16517
16535
|
_o = null === (e = n.backgroundOptions) || void 0 === e ? void 0 : e.color;
|
|
16518
|
-
var
|
|
16536
|
+
var s = n.height,
|
|
16519
16537
|
_a2 = n.width;
|
|
16520
16538
|
if (_r6 || _o) {
|
|
16521
16539
|
var _t33 = this._window.document.createElementNS("http://www.w3.org/2000/svg", "rect");
|
|
16522
|
-
this._backgroundClipPath = this._window.document.createElementNS("http://www.w3.org/2000/svg", "clipPath"), this._backgroundClipPath.setAttribute("id", "clip-path-background-color-".concat(this._instanceId)), this._defs.appendChild(this._backgroundClipPath), (null === (i = n.backgroundOptions) || void 0 === i ? void 0 : i.round) && (
|
|
16540
|
+
this._backgroundClipPath = this._window.document.createElementNS("http://www.w3.org/2000/svg", "clipPath"), this._backgroundClipPath.setAttribute("id", "clip-path-background-color-".concat(this._instanceId)), this._defs.appendChild(this._backgroundClipPath), (null === (i = n.backgroundOptions) || void 0 === i ? void 0 : i.round) && (s = _a2 = Math.min(n.width, n.height), _t33.setAttribute("rx", String(s / 2 * n.backgroundOptions.round))), _t33.setAttribute("x", String(this._roundSize((n.width - _a2) / 2))), _t33.setAttribute("y", String(this._roundSize((n.height - s) / 2))), _t33.setAttribute("width", String(_a2)), _t33.setAttribute("height", String(s)), this._backgroundClipPath.appendChild(_t33), this._createColor({
|
|
16523
16541
|
options: _r6,
|
|
16524
16542
|
color: _o,
|
|
16525
16543
|
additionalRotation: 0,
|
|
@@ -16579,17 +16597,17 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
16579
16597
|
_e4 = n + 2 * _t34,
|
|
16580
16598
|
_i3 = d - _t34 * h,
|
|
16581
16599
|
_r7 = u - _t34 * h,
|
|
16582
|
-
|
|
16600
|
+
s = [],
|
|
16583
16601
|
_a3 = this._roundSize(_e4 / 2);
|
|
16584
16602
|
for (var _i4 = 0; _i4 < _e4; _i4++) {
|
|
16585
|
-
|
|
16586
|
-
for (var _r8 = 0; _r8 < _e4; _r8++) _i4 >= _t34 - 1 && _i4 <= _e4 - _t34 && _r8 >= _t34 - 1 && _r8 <= _e4 - _t34 || Math.sqrt((_i4 - _a3) * (_i4 - _a3) + (_r8 - _a3) * (_r8 - _a3)) > _a3 ?
|
|
16603
|
+
s[_i4] = [];
|
|
16604
|
+
for (var _r8 = 0; _r8 < _e4; _r8++) _i4 >= _t34 - 1 && _i4 <= _e4 - _t34 && _r8 >= _t34 - 1 && _r8 <= _e4 - _t34 || Math.sqrt((_i4 - _a3) * (_i4 - _a3) + (_r8 - _a3) * (_r8 - _a3)) > _a3 ? s[_i4][_r8] = 0 : s[_i4][_r8] = this._qr.isDark(_r8 - 2 * _t34 < 0 ? _r8 : _r8 >= n ? _r8 - 2 * _t34 : _r8 - _t34, _i4 - 2 * _t34 < 0 ? _i4 : _i4 >= n ? _i4 - 2 * _t34 : _i4 - _t34) ? 1 : 0;
|
|
16587
16605
|
}
|
|
16588
16606
|
var _loop3 = function _loop3(_t35) {
|
|
16589
16607
|
var _loop4 = function _loop4(_n) {
|
|
16590
|
-
|
|
16608
|
+
s[_t35][_n] && (c.draw(_i3 + _n * h, _r7 + _t35 * h, h, function (e, i) {
|
|
16591
16609
|
var r;
|
|
16592
|
-
return !!(null === (r =
|
|
16610
|
+
return !!(null === (r = s[_t35 + i]) || void 0 === r ? void 0 : r[_n + e]);
|
|
16593
16611
|
}), c._element && _this84._dotsClipPath && _this84._dotsClipPath.appendChild(c._element));
|
|
16594
16612
|
};
|
|
16595
16613
|
for (var _n = 0; _n < _e4; _n++) {
|