@plattar/plattar-ar-adapter 1.130.2 → 1.130.3
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 +38 -26
- package/build/es2015/plattar-ar-adapter.min.js +1 -1
- package/build/es2019/plattar-ar-adapter.js +32 -35
- package/build/es2019/plattar-ar-adapter.min.js +1 -9
- package/dist/embed/controllers/configurator-controller.js +8 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +4 -4
|
@@ -702,6 +702,10 @@ class ConfiguratorController extends plattar_controller_1.PlattarController {
|
|
|
702
702
|
// optional attributes
|
|
703
703
|
const configState = this.getAttribute("config-state");
|
|
704
704
|
const showAR = this.getAttribute("show-ar");
|
|
705
|
+
const showUI = this.getAttribute("show-ui");
|
|
706
|
+
if (showUI && showUI === "true") {
|
|
707
|
+
dst = plattar_api_1.Server.location().base + "configurator/dist/index.html?scene_id=" + sceneID;
|
|
708
|
+
}
|
|
705
709
|
if (configState) {
|
|
706
710
|
dst += "&config_state=" + configState;
|
|
707
711
|
}
|
|
@@ -739,12 +743,16 @@ class ConfiguratorController extends plattar_controller_1.PlattarController {
|
|
|
739
743
|
// optional attributes
|
|
740
744
|
const configState = this.getAttribute("config-state");
|
|
741
745
|
const showAR = this.getAttribute("show-ar");
|
|
746
|
+
const showUI = this.getAttribute("show-ui");
|
|
742
747
|
if (configState) {
|
|
743
748
|
viewer.setAttribute("config-state", configState);
|
|
744
749
|
}
|
|
745
750
|
if (showAR) {
|
|
746
751
|
viewer.setAttribute("show-ar", showAR);
|
|
747
752
|
}
|
|
753
|
+
if (showUI) {
|
|
754
|
+
viewer.setAttribute("show-ui", showUI);
|
|
755
|
+
}
|
|
748
756
|
viewer.onload = () => {
|
|
749
757
|
return accept(viewer);
|
|
750
758
|
};
|
|
@@ -2078,7 +2086,7 @@ exports.Util = Util;
|
|
|
2078
2086
|
},{}],16:[function(require,module,exports){
|
|
2079
2087
|
"use strict";
|
|
2080
2088
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2081
|
-
exports.default = "1.130.
|
|
2089
|
+
exports.default = "1.130.3";
|
|
2082
2090
|
|
|
2083
2091
|
},{}],17:[function(require,module,exports){
|
|
2084
2092
|
"use strict";
|
|
@@ -6251,6 +6259,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6251
6259
|
exports.default = "1.120.1";
|
|
6252
6260
|
|
|
6253
6261
|
},{}],115:[function(require,module,exports){
|
|
6262
|
+
const Util = require("../../util/util");
|
|
6254
6263
|
const ElementController = require("../controllers/element-controller");
|
|
6255
6264
|
|
|
6256
6265
|
class BaseElement extends HTMLElement {
|
|
@@ -6388,10 +6397,14 @@ class BaseElement extends HTMLElement {
|
|
|
6388
6397
|
get elementType() {
|
|
6389
6398
|
return "none";
|
|
6390
6399
|
}
|
|
6400
|
+
|
|
6401
|
+
get elementLocation() {
|
|
6402
|
+
return Util.getElementLocation(this.elementType);
|
|
6403
|
+
}
|
|
6391
6404
|
}
|
|
6392
6405
|
|
|
6393
6406
|
module.exports = BaseElement;
|
|
6394
|
-
},{"../controllers/element-controller":117}],116:[function(require,module,exports){
|
|
6407
|
+
},{"../../util/util":128,"../controllers/element-controller":117}],116:[function(require,module,exports){
|
|
6395
6408
|
const BaseElement = require("./base/base-element.js");
|
|
6396
6409
|
|
|
6397
6410
|
class ConfiguratorElement extends BaseElement {
|
|
@@ -6407,6 +6420,16 @@ class ConfiguratorElement extends BaseElement {
|
|
|
6407
6420
|
return "configurator";
|
|
6408
6421
|
}
|
|
6409
6422
|
|
|
6423
|
+
get elementLocation() {
|
|
6424
|
+
if (this.hasAttribute("show-ui")) {
|
|
6425
|
+
const state = this.getAttribute("show-ui");
|
|
6426
|
+
|
|
6427
|
+
return state === "true" ? "configurator/dist/index.html" : super.elementLocation;
|
|
6428
|
+
}
|
|
6429
|
+
|
|
6430
|
+
return super.elementLocation;
|
|
6431
|
+
}
|
|
6432
|
+
|
|
6410
6433
|
get optionalAttributes() {
|
|
6411
6434
|
return [{
|
|
6412
6435
|
key: "config-state",
|
|
@@ -6464,7 +6487,7 @@ class ElementController {
|
|
|
6464
6487
|
throw new Error("ElementController - attribute \"server\" must be one of \"production\", \"staging\" or \"dev\"");
|
|
6465
6488
|
}
|
|
6466
6489
|
|
|
6467
|
-
const embedLocation =
|
|
6490
|
+
const embedLocation = element.elementLocation;
|
|
6468
6491
|
|
|
6469
6492
|
if (embedLocation === undefined) {
|
|
6470
6493
|
throw new Error("ElementController - element named \"" + elementType + "\" is invalid");
|
|
@@ -6554,15 +6577,7 @@ class IFrameController {
|
|
|
6554
6577
|
if (element.hasAttribute("fullscreen")) {
|
|
6555
6578
|
const style = document.createElement('style');
|
|
6556
6579
|
|
|
6557
|
-
style.textContent =
|
|
6558
|
-
._PlattarFullScreen {
|
|
6559
|
-
width: 100%;
|
|
6560
|
-
height: 100%;
|
|
6561
|
-
position: absolute;
|
|
6562
|
-
top: 0;
|
|
6563
|
-
left: 0;
|
|
6564
|
-
}
|
|
6565
|
-
`;
|
|
6580
|
+
style.textContent = `._PlattarFullScreen { width: 100%; height: 100%; position: absolute; top: 0; left: 0; }`;
|
|
6566
6581
|
|
|
6567
6582
|
this._iframe.className = "_PlattarFullScreen";
|
|
6568
6583
|
|
|
@@ -6900,9 +6915,9 @@ module.exports = {
|
|
|
6900
6915
|
class Util {
|
|
6901
6916
|
static getServerLocation(server) {
|
|
6902
6917
|
switch (server) {
|
|
6903
|
-
case "production": return "https://app.plattar.com/
|
|
6904
|
-
case "staging": return "https://staging.plattar.space/
|
|
6905
|
-
case "dev": return "https://localhost/
|
|
6918
|
+
case "production": return "https://app.plattar.com/";
|
|
6919
|
+
case "staging": return "https://staging.plattar.space/";
|
|
6920
|
+
case "dev": return "https://localhost/";
|
|
6906
6921
|
default: return undefined;
|
|
6907
6922
|
}
|
|
6908
6923
|
}
|
|
@@ -6911,25 +6926,7 @@ class Util {
|
|
|
6911
6926
|
const isValid = Util.isValidType(etype);
|
|
6912
6927
|
|
|
6913
6928
|
if (isValid) {
|
|
6914
|
-
return etype + ".html";
|
|
6915
|
-
}
|
|
6916
|
-
|
|
6917
|
-
return undefined;
|
|
6918
|
-
}
|
|
6919
|
-
|
|
6920
|
-
static getElementBundleLocation(etype, server) {
|
|
6921
|
-
const location = Util.getServerLocation(server);
|
|
6922
|
-
|
|
6923
|
-
if (!location) {
|
|
6924
|
-
return undefined;
|
|
6925
|
-
}
|
|
6926
|
-
|
|
6927
|
-
const isValid = Util.isValidType(etype);
|
|
6928
|
-
|
|
6929
|
-
if (isValid) {
|
|
6930
|
-
const isMinified = location === "dev" ? false : true;
|
|
6931
|
-
|
|
6932
|
-
return isMinified ? (etype + "-bundle.min.js") : (etype + "-bundle.js");
|
|
6929
|
+
return "renderer/" + etype + ".html";
|
|
6933
6930
|
}
|
|
6934
6931
|
|
|
6935
6932
|
return undefined;
|
|
@@ -6972,7 +6969,7 @@ class Util {
|
|
|
6972
6969
|
|
|
6973
6970
|
module.exports = Util;
|
|
6974
6971
|
},{}],129:[function(require,module,exports){
|
|
6975
|
-
module.exports = "1.
|
|
6972
|
+
module.exports = "1.130.1";
|
|
6976
6973
|
|
|
6977
6974
|
},{}],130:[function(require,module,exports){
|
|
6978
6975
|
(function (global){(function (){
|