@plattar/plattar-ar-adapter 1.129.1 → 1.130.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 +67 -11
- package/build/es2015/plattar-ar-adapter.min.js +1 -1
- package/build/es2019/plattar-ar-adapter.js +51 -13
- package/build/es2019/plattar-ar-adapter.min.js +2 -2
- package/dist/ar/launcher-ar.d.ts +8 -0
- package/dist/ar/launcher-ar.js +11 -1
- package/dist/ar/model-ar.js +4 -2
- package/dist/ar/product-ar.js +11 -2
- package/dist/ar/raw-ar.js +4 -2
- package/dist/ar/scene-ar.js +7 -2
- package/dist/index.d.ts +2 -0
- package/dist/index.js +3 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -3
|
@@ -120,6 +120,10 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
120
120
|
var LauncherAR = /*#__PURE__*/function () {
|
|
121
121
|
function LauncherAR() {
|
|
122
122
|
_classCallCheck(this, LauncherAR);
|
|
123
|
+
|
|
124
|
+
this._opt = {
|
|
125
|
+
anchor: "horizontal_vertical"
|
|
126
|
+
};
|
|
123
127
|
}
|
|
124
128
|
/**
|
|
125
129
|
* Initialise and launch with a single function call. this is mostly for convenience.
|
|
@@ -139,6 +143,15 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
139
143
|
})["catch"](reject);
|
|
140
144
|
});
|
|
141
145
|
}
|
|
146
|
+
/**
|
|
147
|
+
* AR Options used for launching AR
|
|
148
|
+
*/
|
|
149
|
+
|
|
150
|
+
}, {
|
|
151
|
+
key: "options",
|
|
152
|
+
get: function get() {
|
|
153
|
+
return this._opt;
|
|
154
|
+
}
|
|
142
155
|
}]);
|
|
143
156
|
|
|
144
157
|
return LauncherAR;
|
|
@@ -272,8 +285,10 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
272
285
|
|
|
273
286
|
|
|
274
287
|
if (util_1.Util.canSceneViewer()) {
|
|
275
|
-
|
|
276
|
-
|
|
288
|
+
var arviewer = new scene_viewer_1["default"]();
|
|
289
|
+
arviewer.modelUrl = plattar_api_1.Server.location().cdn + model.attributes.path + model.attributes.original_filename;
|
|
290
|
+
arviewer.isVertical = _this3.options.anchor === "vertical" ? true : false;
|
|
291
|
+
_this3._ar = arviewer;
|
|
277
292
|
return accept(_this3);
|
|
278
293
|
} // otherwise, we didn't have AR available - it should never really reach this stage as this should be caught
|
|
279
294
|
// earlier in the process
|
|
@@ -516,8 +531,20 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
516
531
|
|
|
517
532
|
|
|
518
533
|
if (util_1.Util.canSceneViewer()) {
|
|
519
|
-
|
|
520
|
-
|
|
534
|
+
var arviewer = new scene_viewer_1["default"]();
|
|
535
|
+
arviewer.modelUrl = plattar_api_1.Server.location().cdn + model.attributes.path + model.attributes.original_filename;
|
|
536
|
+
arviewer.isVertical = _this5.options.anchor === "vertical" ? true : false;
|
|
537
|
+
var scene = product.relationships.find(plattar_api_1.Scene);
|
|
538
|
+
|
|
539
|
+
if (scene) {
|
|
540
|
+
var sceneOpt = scene.attributes.custom_json || {};
|
|
541
|
+
|
|
542
|
+
if (sceneOpt.anchor === "vertical") {
|
|
543
|
+
arviewer.isVertical = true;
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
_this5._ar = arviewer;
|
|
521
548
|
return accept(_this5);
|
|
522
549
|
} // otherwise, we didn't have AR available - it should never really reach this stage as this should be caught
|
|
523
550
|
// earlier in the process
|
|
@@ -687,8 +714,10 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
687
714
|
|
|
688
715
|
if (util_1.Util.canSceneViewer()) {
|
|
689
716
|
if (lowerLoc.endsWith("glb") || lowerLoc.endsWith("gltf")) {
|
|
690
|
-
|
|
691
|
-
|
|
717
|
+
var arviewer = new scene_viewer_1["default"]();
|
|
718
|
+
arviewer.modelUrl = modelLocation;
|
|
719
|
+
arviewer.isVertical = _this7.options.anchor === "vertical" ? true : false;
|
|
720
|
+
_this7._ar = arviewer;
|
|
692
721
|
return accept(_this7);
|
|
693
722
|
}
|
|
694
723
|
|
|
@@ -916,8 +945,15 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
916
945
|
|
|
917
946
|
if (util_1.Util.canSceneViewer()) {
|
|
918
947
|
return _this9._ComposeScene(scene, "glb").then(function (modelUrl) {
|
|
919
|
-
|
|
920
|
-
|
|
948
|
+
var arviewer = new scene_viewer_1["default"]();
|
|
949
|
+
arviewer.modelUrl = modelUrl;
|
|
950
|
+
arviewer.isVertical = _this9.options.anchor === "vertical" ? true : false;
|
|
951
|
+
|
|
952
|
+
if (sceneOpt.anchor === "vertical") {
|
|
953
|
+
arviewer.isVertical = true;
|
|
954
|
+
}
|
|
955
|
+
|
|
956
|
+
_this9._ar = arviewer;
|
|
921
957
|
return accept(_this9);
|
|
922
958
|
})["catch"](reject);
|
|
923
959
|
} // otherwise, we didn't have AR available - it should never really reach this stage as this should be caught
|
|
@@ -2691,11 +2727,20 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
2691
2727
|
Object.defineProperty(exports, "__esModule", {
|
|
2692
2728
|
value: true
|
|
2693
2729
|
});
|
|
2694
|
-
exports.ConfiguratorState = exports.Util = exports.RawAR = exports.ModelAR = exports.SceneAR = exports.SceneProductAR = exports.ProductAR = exports.version = exports.PlattarQRCode = exports.PlattarWeb = void 0;
|
|
2730
|
+
exports.ConfiguratorState = exports.Util = exports.RawAR = exports.ModelAR = exports.SceneAR = exports.SceneProductAR = exports.ProductAR = exports.LauncherAR = exports.version = exports.PlattarQRCode = exports.PlattarWeb = void 0;
|
|
2695
2731
|
exports.PlattarWeb = __importStar(require("@plattar/plattar-web"));
|
|
2696
2732
|
exports.PlattarQRCode = __importStar(require("@plattar/plattar-qrcode"));
|
|
2697
2733
|
exports.version = __importStar(require("./version"));
|
|
2698
2734
|
|
|
2735
|
+
var launcher_ar_1 = require("./ar/launcher-ar");
|
|
2736
|
+
|
|
2737
|
+
Object.defineProperty(exports, "LauncherAR", {
|
|
2738
|
+
enumerable: true,
|
|
2739
|
+
get: function get() {
|
|
2740
|
+
return launcher_ar_1.LauncherAR;
|
|
2741
|
+
}
|
|
2742
|
+
});
|
|
2743
|
+
|
|
2699
2744
|
var product_ar_1 = require("./ar/product-ar");
|
|
2700
2745
|
|
|
2701
2746
|
Object.defineProperty(exports, "ProductAR", {
|
|
@@ -2771,6 +2816,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
2771
2816
|
|
|
2772
2817
|
console.log("using @plattar/plattar-ar-adapter v" + version_1["default"]);
|
|
2773
2818
|
}, {
|
|
2819
|
+
"./ar/launcher-ar": 1,
|
|
2774
2820
|
"./ar/model-ar": 2,
|
|
2775
2821
|
"./ar/product-ar": 3,
|
|
2776
2822
|
"./ar/raw-ar": 4,
|
|
@@ -3205,7 +3251,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
3205
3251
|
Object.defineProperty(exports, "__esModule", {
|
|
3206
3252
|
value: true
|
|
3207
3253
|
});
|
|
3208
|
-
exports["default"] = "1.
|
|
3254
|
+
exports["default"] = "1.130.1";
|
|
3209
3255
|
}, {}],
|
|
3210
3256
|
17: [function (require, module, exports) {
|
|
3211
3257
|
"use strict";
|
|
@@ -9602,6 +9648,11 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
9602
9648
|
get: function get() {
|
|
9603
9649
|
return this._controller ? this._controller.context : undefined;
|
|
9604
9650
|
}
|
|
9651
|
+
}, {
|
|
9652
|
+
key: "parent",
|
|
9653
|
+
get: function get() {
|
|
9654
|
+
return this._controller ? this._controller.parent : undefined;
|
|
9655
|
+
}
|
|
9605
9656
|
}, {
|
|
9606
9657
|
key: "element",
|
|
9607
9658
|
get: function get() {
|
|
@@ -9881,6 +9932,11 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
9881
9932
|
get: function get() {
|
|
9882
9933
|
return messenger.self;
|
|
9883
9934
|
}
|
|
9935
|
+
}, {
|
|
9936
|
+
key: "parent",
|
|
9937
|
+
get: function get() {
|
|
9938
|
+
return messenger.parent;
|
|
9939
|
+
}
|
|
9884
9940
|
}, {
|
|
9885
9941
|
key: "controller",
|
|
9886
9942
|
get: function get() {
|
|
@@ -10531,7 +10587,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
10531
10587
|
module.exports = Util;
|
|
10532
10588
|
}, {}],
|
|
10533
10589
|
129: [function (require, module, exports) {
|
|
10534
|
-
module.exports = "1.
|
|
10590
|
+
module.exports = "1.129.1";
|
|
10535
10591
|
}, {}],
|
|
10536
10592
|
130: [function (require, module, exports) {
|
|
10537
10593
|
(function (global) {
|