@plattar/plattar-ar-adapter 1.158.3 → 1.163.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 +513 -293
- package/build/es2015/plattar-ar-adapter.min.js +1 -1
- package/build/es2019/plattar-ar-adapter.js +192 -100
- package/build/es2019/plattar-ar-adapter.min.js +1 -1
- package/dist/ar/configurator-ar.d.ts +6 -2
- package/dist/ar/configurator-ar.js +17 -8
- package/dist/ar/launcher-ar.d.ts +2 -0
- package/dist/ar/launcher-ar.js +2 -1
- package/dist/ar/model-ar.d.ts +6 -2
- package/dist/ar/model-ar.js +14 -4
- package/dist/ar/product-ar.d.ts +8 -4
- package/dist/ar/product-ar.js +28 -6
- package/dist/ar/raw-ar.d.ts +7 -3
- package/dist/ar/raw-ar.js +16 -8
- package/dist/ar/scene-ar.d.ts +7 -3
- package/dist/ar/scene-ar.js +16 -8
- package/dist/ar/scene-product-ar.d.ts +2 -2
- package/dist/ar/scene-product-ar.js +5 -4
- package/dist/embed/controllers/configurator-controller.js +12 -2
- package/dist/embed/controllers/plattar-controller.d.ts +6 -0
- package/dist/embed/controllers/plattar-controller.js +12 -0
- package/dist/embed/controllers/product-controller.js +11 -1
- package/dist/embed/controllers/vto-controller.js +7 -2
- package/dist/embed/plattar-embed.d.ts +2 -0
- package/dist/embed/plattar-embed.js +16 -0
- package/dist/index.d.ts +2 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/viewers/ar-viewer.d.ts +8 -1
- package/dist/viewers/ar-viewer.js +8 -2
- package/dist/viewers/quicklook-viewer.d.ts +1 -4
- package/dist/viewers/quicklook-viewer.js +9 -18
- package/dist/viewers/reality-viewer.d.ts +1 -1
- package/dist/viewers/reality-viewer.js +2 -5
- package/dist/viewers/scene-viewer.d.ts +1 -3
- package/dist/viewers/scene-viewer.js +9 -23
- package/package.json +7 -7
|
@@ -13,7 +13,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
13
13
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
14
14
|
function _wrapNativeSuper(Class) { var _cache = typeof Map === "function" ? new Map() : undefined; _wrapNativeSuper = function _wrapNativeSuper(Class) { if (Class === null || !_isNativeFunction(Class)) return Class; if (typeof Class !== "function") { throw new TypeError("Super expression must either be null or a function"); } if (typeof _cache !== "undefined") { if (_cache.has(Class)) return _cache.get(Class); _cache.set(Class, Wrapper); } function Wrapper() { return _construct(Class, arguments, _getPrototypeOf(this).constructor); } Wrapper.prototype = Object.create(Class.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }); return _setPrototypeOf(Wrapper, Class); }; return _wrapNativeSuper(Class); }
|
|
15
15
|
function _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct.bind(); } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }
|
|
16
|
-
function _isNativeFunction(fn) { return Function.toString.call(fn).indexOf("[native code]") !== -1; }
|
|
16
|
+
function _isNativeFunction(fn) { try { return Function.toString.call(fn).indexOf("[native code]") !== -1; } catch (e) { return typeof fn === "function"; } }
|
|
17
17
|
function _get() { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }
|
|
18
18
|
function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
|
|
19
19
|
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
|
@@ -95,33 +95,32 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
95
95
|
var plattar_services_1 = require("@plattar/plattar-services");
|
|
96
96
|
var util_1 = require("../util/util");
|
|
97
97
|
var quicklook_viewer_1 = __importDefault(require("../viewers/quicklook-viewer"));
|
|
98
|
-
var reality_viewer_1 = __importDefault(require("../viewers/reality-viewer"));
|
|
99
98
|
var scene_viewer_1 = __importDefault(require("../viewers/scene-viewer"));
|
|
100
99
|
var launcher_ar_1 = require("./launcher-ar");
|
|
101
100
|
var version_1 = __importDefault(require("../version"));
|
|
102
101
|
/**
|
|
103
102
|
* Performs AR functionality related to Plattar Scenes
|
|
104
103
|
*/
|
|
105
|
-
var ConfiguratorAR = /*#__PURE__*/function (_launcher_ar_1$Launch
|
|
104
|
+
var ConfiguratorAR = /*#__PURE__*/function (_launcher_ar_1$Launch) {
|
|
106
105
|
_inherits(ConfiguratorAR, _launcher_ar_1$Launch);
|
|
107
106
|
var _super = _createSuper(ConfiguratorAR);
|
|
108
|
-
function ConfiguratorAR(
|
|
107
|
+
function ConfiguratorAR(options) {
|
|
109
108
|
var _this;
|
|
110
109
|
_classCallCheck(this, ConfiguratorAR);
|
|
111
110
|
_this = _super.call(this);
|
|
112
111
|
// analytics instance
|
|
113
112
|
_this._analytics = null;
|
|
114
|
-
if (!state) {
|
|
113
|
+
if (!options.state) {
|
|
115
114
|
throw new Error("ConfiguratorAR.constructor(state) - state must be defined");
|
|
116
115
|
}
|
|
117
|
-
_this.
|
|
116
|
+
_this._options = options;
|
|
118
117
|
_this._ar = null;
|
|
119
118
|
return _this;
|
|
120
119
|
}
|
|
121
120
|
_createClass(ConfiguratorAR, [{
|
|
122
121
|
key: "_SetupAnalytics",
|
|
123
122
|
value: function _SetupAnalytics() {
|
|
124
|
-
var scene = this.
|
|
123
|
+
var scene = this._options.state.scene;
|
|
125
124
|
var analytics = null;
|
|
126
125
|
// setup scene stuff (if any)
|
|
127
126
|
if (scene) {
|
|
@@ -137,6 +136,13 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
137
136
|
if (application) {
|
|
138
137
|
analytics.data.push("applicationId", application.id);
|
|
139
138
|
analytics.data.push("applicationTitle", application.attributes.title);
|
|
139
|
+
if (this._options.useARBanner) {
|
|
140
|
+
this.options.banner = {
|
|
141
|
+
title: application.attributes.title,
|
|
142
|
+
subtitle: scene.attributes.title,
|
|
143
|
+
button: 'Visit'
|
|
144
|
+
};
|
|
145
|
+
}
|
|
140
146
|
}
|
|
141
147
|
}
|
|
142
148
|
}
|
|
@@ -146,13 +152,13 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
146
152
|
*/
|
|
147
153
|
}, {
|
|
148
154
|
key: "_Compose",
|
|
149
|
-
value: function
|
|
150
|
-
|
|
155
|
+
value: (function () {
|
|
156
|
+
var _Compose2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(output) {
|
|
151
157
|
var objects, configurator, totalARObjectCount, results;
|
|
152
158
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
153
159
|
while (1) switch (_context.prev = _context.next) {
|
|
154
160
|
case 0:
|
|
155
|
-
objects = this.
|
|
161
|
+
objects = this._options.state.state.array();
|
|
156
162
|
if (!(objects.length <= 0)) {
|
|
157
163
|
_context.next = 3;
|
|
158
164
|
break;
|
|
@@ -190,8 +196,12 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
190
196
|
return _context.stop();
|
|
191
197
|
}
|
|
192
198
|
}, _callee, this);
|
|
193
|
-
}))
|
|
194
|
-
|
|
199
|
+
}));
|
|
200
|
+
function _Compose(_x) {
|
|
201
|
+
return _Compose2.apply(this, arguments);
|
|
202
|
+
}
|
|
203
|
+
return _Compose;
|
|
204
|
+
}()
|
|
195
205
|
/**
|
|
196
206
|
* Initialise the SceneAR instance. This returns a Promise that resolves
|
|
197
207
|
* successfully if initialisation is successful, otherwise it will fail.
|
|
@@ -199,10 +209,11 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
199
209
|
* filure can occur for a number of reasons but it generally means that AR
|
|
200
210
|
* cannot be performed.
|
|
201
211
|
*/
|
|
212
|
+
)
|
|
202
213
|
}, {
|
|
203
214
|
key: "init",
|
|
204
|
-
value: function
|
|
205
|
-
|
|
215
|
+
value: (function () {
|
|
216
|
+
var _init = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
206
217
|
var scene, sceneOpt, modelUrl, _modelUrl, _modelUrl2, arviewer;
|
|
207
218
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
208
219
|
while (1) switch (_context2.prev = _context2.next) {
|
|
@@ -213,71 +224,78 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
213
224
|
}
|
|
214
225
|
throw new Error("ConfiguratorAR.init() - cannot proceed as AR not available in context");
|
|
215
226
|
case 2:
|
|
216
|
-
scene = this.
|
|
227
|
+
scene = this._options.state.scene;
|
|
217
228
|
this._SetupAnalytics();
|
|
218
229
|
sceneOpt = scene.attributes.custom_json || {}; // we need to define our AR module here
|
|
219
230
|
// we are in Safari/Quicklook mode here
|
|
220
231
|
if (!(util_1.Util.isSafari() || util_1.Util.isChromeOnIOS())) {
|
|
221
|
-
_context2.next =
|
|
232
|
+
_context2.next = 27;
|
|
222
233
|
break;
|
|
223
234
|
}
|
|
224
235
|
if (!(sceneOpt.anchor === "face")) {
|
|
225
|
-
_context2.next =
|
|
236
|
+
_context2.next = 18;
|
|
226
237
|
break;
|
|
227
238
|
}
|
|
228
239
|
if (!util_1.Util.canRealityViewer()) {
|
|
229
|
-
_context2.next =
|
|
240
|
+
_context2.next = 17;
|
|
230
241
|
break;
|
|
231
242
|
}
|
|
232
243
|
_context2.next = 10;
|
|
233
244
|
return this._Compose("vto");
|
|
234
245
|
case 10:
|
|
235
246
|
modelUrl = _context2.sent;
|
|
236
|
-
this._ar = new
|
|
247
|
+
this._ar = new quicklook_viewer_1["default"]();
|
|
237
248
|
this._ar.modelUrl = modelUrl;
|
|
249
|
+
this._ar.banner = this.options.banner;
|
|
238
250
|
return _context2.abrupt("return", this);
|
|
239
|
-
case 16:
|
|
240
|
-
throw new Error("ConfiguratorAR.init() - cannot proceed as VTO AR requires Reality Viewer support");
|
|
241
251
|
case 17:
|
|
252
|
+
throw new Error("ConfiguratorAR.init() - cannot proceed as VTO AR requires Reality Viewer support");
|
|
253
|
+
case 18:
|
|
242
254
|
if (!util_1.Util.canQuicklook()) {
|
|
243
|
-
_context2.next =
|
|
255
|
+
_context2.next = 26;
|
|
244
256
|
break;
|
|
245
257
|
}
|
|
246
|
-
_context2.next =
|
|
258
|
+
_context2.next = 21;
|
|
247
259
|
return this._Compose("usdz");
|
|
248
|
-
case
|
|
260
|
+
case 21:
|
|
249
261
|
_modelUrl = _context2.sent;
|
|
250
262
|
this._ar = new quicklook_viewer_1["default"]();
|
|
251
263
|
this._ar.modelUrl = _modelUrl;
|
|
264
|
+
this._ar.banner = this.options.banner;
|
|
252
265
|
return _context2.abrupt("return", this);
|
|
253
|
-
case
|
|
266
|
+
case 26:
|
|
254
267
|
throw new Error("ConfiguratorAR.init() - cannot proceed as IOS device does not support AR Mode");
|
|
255
|
-
case
|
|
268
|
+
case 27:
|
|
256
269
|
if (!util_1.Util.canSceneViewer()) {
|
|
257
|
-
_context2.next =
|
|
270
|
+
_context2.next = 38;
|
|
258
271
|
break;
|
|
259
272
|
}
|
|
260
|
-
_context2.next =
|
|
273
|
+
_context2.next = 30;
|
|
261
274
|
return this._Compose("glb");
|
|
262
|
-
case
|
|
275
|
+
case 30:
|
|
263
276
|
_modelUrl2 = _context2.sent;
|
|
264
277
|
arviewer = new scene_viewer_1["default"]();
|
|
265
278
|
arviewer.modelUrl = _modelUrl2;
|
|
266
279
|
arviewer.isVertical = this.options.anchor === "vertical" ? true : false;
|
|
280
|
+
arviewer.banner = this.options.banner;
|
|
267
281
|
if (sceneOpt.anchor === "vertical") {
|
|
268
282
|
arviewer.isVertical = true;
|
|
269
283
|
}
|
|
270
284
|
this._ar = arviewer;
|
|
271
285
|
return _context2.abrupt("return", this);
|
|
272
|
-
case
|
|
286
|
+
case 38:
|
|
273
287
|
throw new Error("ConfiguratorAR.init() - could not initialise AR correctly, check values");
|
|
274
|
-
case
|
|
288
|
+
case 39:
|
|
275
289
|
case "end":
|
|
276
290
|
return _context2.stop();
|
|
277
291
|
}
|
|
278
292
|
}, _callee2, this);
|
|
279
|
-
}))
|
|
280
|
-
|
|
293
|
+
}));
|
|
294
|
+
function init() {
|
|
295
|
+
return _init.apply(this, arguments);
|
|
296
|
+
}
|
|
297
|
+
return init;
|
|
298
|
+
}())
|
|
281
299
|
}, {
|
|
282
300
|
key: "start",
|
|
283
301
|
value: function start() {
|
|
@@ -318,7 +336,6 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
318
336
|
"../util/util": 15,
|
|
319
337
|
"../version": 16,
|
|
320
338
|
"../viewers/quicklook-viewer": 18,
|
|
321
|
-
"../viewers/reality-viewer": 19,
|
|
322
339
|
"../viewers/scene-viewer": 20,
|
|
323
340
|
"./launcher-ar": 2,
|
|
324
341
|
"@plattar/plattar-analytics": 40,
|
|
@@ -332,11 +349,12 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
332
349
|
value: true
|
|
333
350
|
});
|
|
334
351
|
exports.LauncherAR = void 0;
|
|
335
|
-
var LauncherAR = /*#__PURE__*/function (
|
|
352
|
+
var LauncherAR = /*#__PURE__*/function () {
|
|
336
353
|
function LauncherAR() {
|
|
337
354
|
_classCallCheck(this, LauncherAR);
|
|
338
355
|
this._opt = {
|
|
339
|
-
anchor: "horizontal_vertical"
|
|
356
|
+
anchor: "horizontal_vertical",
|
|
357
|
+
banner: null
|
|
340
358
|
};
|
|
341
359
|
}
|
|
342
360
|
/**
|
|
@@ -345,8 +363,8 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
345
363
|
*/
|
|
346
364
|
_createClass(LauncherAR, [{
|
|
347
365
|
key: "launch",
|
|
348
|
-
value: function
|
|
349
|
-
|
|
366
|
+
value: (function () {
|
|
367
|
+
var _launch = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
|
350
368
|
var value;
|
|
351
369
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
352
370
|
while (1) switch (_context3.prev = _context3.next) {
|
|
@@ -361,11 +379,16 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
361
379
|
return _context3.stop();
|
|
362
380
|
}
|
|
363
381
|
}, _callee3, this);
|
|
364
|
-
}))
|
|
365
|
-
|
|
382
|
+
}));
|
|
383
|
+
function launch() {
|
|
384
|
+
return _launch.apply(this, arguments);
|
|
385
|
+
}
|
|
386
|
+
return launch;
|
|
387
|
+
}()
|
|
366
388
|
/**
|
|
367
389
|
* AR Options used for launching AR
|
|
368
390
|
*/
|
|
391
|
+
)
|
|
369
392
|
}, {
|
|
370
393
|
key: "options",
|
|
371
394
|
get: function get() {
|
|
@@ -402,24 +425,23 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
402
425
|
var ModelAR = /*#__PURE__*/function (_launcher_ar_1$Launch2) {
|
|
403
426
|
_inherits(ModelAR, _launcher_ar_1$Launch2);
|
|
404
427
|
var _super2 = _createSuper(ModelAR);
|
|
405
|
-
function ModelAR() {
|
|
428
|
+
function ModelAR(options) {
|
|
406
429
|
var _this2;
|
|
407
|
-
var modelID = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
|
408
430
|
_classCallCheck(this, ModelAR);
|
|
409
431
|
_this2 = _super2.call(this);
|
|
410
432
|
// analytics instance
|
|
411
433
|
_this2._analytics = null;
|
|
412
|
-
if (!modelID) {
|
|
434
|
+
if (!options.modelID) {
|
|
413
435
|
throw new Error("ModelAR.constructor(modelID) - modelID must be defined");
|
|
414
436
|
}
|
|
415
|
-
_this2.
|
|
437
|
+
_this2._options = options;
|
|
416
438
|
_this2._ar = null;
|
|
417
439
|
return _this2;
|
|
418
440
|
}
|
|
419
441
|
_createClass(ModelAR, [{
|
|
420
442
|
key: "modelID",
|
|
421
443
|
get: function get() {
|
|
422
|
-
return this.
|
|
444
|
+
return this._options.modelID;
|
|
423
445
|
}
|
|
424
446
|
}, {
|
|
425
447
|
key: "_SetupAnalytics",
|
|
@@ -437,6 +459,13 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
437
459
|
analytics.data.push("modelId", model.id);
|
|
438
460
|
analytics.data.push("modelTitle", model.attributes.title);
|
|
439
461
|
this._analytics = analytics;
|
|
462
|
+
if (this._options.useARBanner) {
|
|
463
|
+
this.options.banner = {
|
|
464
|
+
title: project.attributes.title,
|
|
465
|
+
subtitle: model.attributes.title,
|
|
466
|
+
button: 'Visit'
|
|
467
|
+
};
|
|
468
|
+
}
|
|
440
469
|
}
|
|
441
470
|
}
|
|
442
471
|
/**
|
|
@@ -467,12 +496,14 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
467
496
|
if (model.attributes.reality_filename && util_1.Util.canRealityViewer()) {
|
|
468
497
|
_this3._ar = new reality_viewer_1["default"]();
|
|
469
498
|
_this3._ar.modelUrl = plattar_api_1.Server.location().cdn + model.attributes.path + model.attributes.reality_filename;
|
|
499
|
+
_this3._ar.banner = _this3.options.banner;
|
|
470
500
|
return accept(_this3);
|
|
471
501
|
}
|
|
472
502
|
// otherwise, load the USDZ stuff second if available
|
|
473
503
|
if (model.attributes.usdz_filename && util_1.Util.canQuicklook()) {
|
|
474
504
|
_this3._ar = new quicklook_viewer_1["default"]();
|
|
475
505
|
_this3._ar.modelUrl = plattar_api_1.Server.location().cdn + model.attributes.path + model.attributes.usdz_filename;
|
|
506
|
+
_this3._ar.banner = _this3.options.banner;
|
|
476
507
|
return accept(_this3);
|
|
477
508
|
}
|
|
478
509
|
return reject(new Error("ModelAR.init() - cannot proceed as ModelFile does not have a defined .usdz or .reality file"));
|
|
@@ -482,6 +513,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
482
513
|
var arviewer = new scene_viewer_1["default"]();
|
|
483
514
|
arviewer.modelUrl = plattar_api_1.Server.location().cdn + model.attributes.path + model.attributes.original_filename;
|
|
484
515
|
arviewer.isVertical = _this3.options.anchor === "vertical" ? true : false;
|
|
516
|
+
arviewer.banner = _this3.options.banner;
|
|
485
517
|
_this3._ar = arviewer;
|
|
486
518
|
return accept(_this3);
|
|
487
519
|
}
|
|
@@ -566,38 +598,45 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
566
598
|
var ProductAR = /*#__PURE__*/function (_launcher_ar_1$Launch3) {
|
|
567
599
|
_inherits(ProductAR, _launcher_ar_1$Launch3);
|
|
568
600
|
var _super3 = _createSuper(ProductAR);
|
|
569
|
-
|
|
601
|
+
/*
|
|
602
|
+
constructor(productID: string | undefined | null = null, variationID: string | undefined | null = null, variationSKU: string | undefined | null = null) {
|
|
603
|
+
super();
|
|
604
|
+
if (!productID) {
|
|
605
|
+
throw new Error("ProductAR.constructor(productID, variationID) - productID must be defined");
|
|
606
|
+
}
|
|
607
|
+
this._productID = productID;
|
|
608
|
+
this._variationSKU = variationSKU;
|
|
609
|
+
this._variationID = variationID ? variationID : (variationSKU ? null : "default");
|
|
610
|
+
this._ar = null;
|
|
611
|
+
}
|
|
612
|
+
*/
|
|
613
|
+
function ProductAR(options) {
|
|
570
614
|
var _this4;
|
|
571
|
-
var productID = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
|
572
|
-
var variationID = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
573
|
-
var variationSKU = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
|
|
574
615
|
_classCallCheck(this, ProductAR);
|
|
575
616
|
_this4 = _super3.call(this);
|
|
576
617
|
// analytics instance
|
|
577
618
|
_this4._analytics = null;
|
|
578
|
-
if (!productID) {
|
|
619
|
+
if (!options.productID) {
|
|
579
620
|
throw new Error("ProductAR.constructor(productID, variationID) - productID must be defined");
|
|
580
621
|
}
|
|
581
|
-
_this4.
|
|
582
|
-
_this4._variationSKU = variationSKU;
|
|
583
|
-
_this4._variationID = variationID ? variationID : variationSKU ? null : "default";
|
|
622
|
+
_this4._options = options;
|
|
584
623
|
_this4._ar = null;
|
|
585
624
|
return _this4;
|
|
586
625
|
}
|
|
587
626
|
_createClass(ProductAR, [{
|
|
588
627
|
key: "productID",
|
|
589
628
|
get: function get() {
|
|
590
|
-
return this.
|
|
629
|
+
return this._options.productID;
|
|
591
630
|
}
|
|
592
631
|
}, {
|
|
593
632
|
key: "variationID",
|
|
594
633
|
get: function get() {
|
|
595
|
-
return this.
|
|
634
|
+
return this._options.variationID;
|
|
596
635
|
}
|
|
597
636
|
}, {
|
|
598
637
|
key: "variationSKU",
|
|
599
638
|
get: function get() {
|
|
600
|
-
return this.
|
|
639
|
+
return this._options.variationSKU;
|
|
601
640
|
}
|
|
602
641
|
}, {
|
|
603
642
|
key: "_SetupAnalytics",
|
|
@@ -618,6 +657,13 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
618
657
|
if (application) {
|
|
619
658
|
analytics.data.push("applicationId", application.id);
|
|
620
659
|
analytics.data.push("applicationTitle", application.attributes.title);
|
|
660
|
+
if (this._options.useARBanner) {
|
|
661
|
+
this.options.banner = {
|
|
662
|
+
title: product.attributes.title,
|
|
663
|
+
subtitle: variation.attributes.title,
|
|
664
|
+
button: 'Visit'
|
|
665
|
+
};
|
|
666
|
+
}
|
|
621
667
|
}
|
|
622
668
|
}
|
|
623
669
|
if (analytics) {
|
|
@@ -696,12 +742,14 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
696
742
|
if (model.attributes.reality_filename && util_1.Util.canRealityViewer()) {
|
|
697
743
|
_this5._ar = new reality_viewer_1["default"]();
|
|
698
744
|
_this5._ar.modelUrl = plattar_api_1.Server.location().cdn + model.attributes.path + model.attributes.reality_filename;
|
|
745
|
+
_this5._ar.banner = _this5.options.banner;
|
|
699
746
|
return accept(_this5);
|
|
700
747
|
}
|
|
701
748
|
// otherwise, load the USDZ stuff second if available
|
|
702
749
|
if (model.attributes.usdz_filename && util_1.Util.canQuicklook()) {
|
|
703
750
|
_this5._ar = new quicklook_viewer_1["default"]();
|
|
704
751
|
_this5._ar.modelUrl = plattar_api_1.Server.location().cdn + model.attributes.path + model.attributes.usdz_filename;
|
|
752
|
+
_this5._ar.banner = _this5.options.banner;
|
|
705
753
|
return accept(_this5);
|
|
706
754
|
}
|
|
707
755
|
return reject(new Error("ProductAR.init() - cannot proceed as ModelFile does not have a defined .usdz or .reality file"));
|
|
@@ -711,6 +759,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
711
759
|
var arviewer = new scene_viewer_1["default"]();
|
|
712
760
|
arviewer.modelUrl = plattar_api_1.Server.location().cdn + model.attributes.path + model.attributes.original_filename;
|
|
713
761
|
arviewer.isVertical = _this5.options.anchor === "vertical" ? true : false;
|
|
762
|
+
arviewer.banner = _this5.options.banner;
|
|
714
763
|
var scene = product.relationships.find(plattar_api_1.Scene);
|
|
715
764
|
if (scene) {
|
|
716
765
|
var sceneOpt = scene.attributes.custom_json || {};
|
|
@@ -802,21 +851,18 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
802
851
|
var RawAR = /*#__PURE__*/function (_launcher_ar_1$Launch4) {
|
|
803
852
|
_inherits(RawAR, _launcher_ar_1$Launch4);
|
|
804
853
|
var _super4 = _createSuper(RawAR);
|
|
805
|
-
function RawAR() {
|
|
854
|
+
function RawAR(options) {
|
|
806
855
|
var _this6;
|
|
807
|
-
var modelLocation = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
|
808
|
-
var sceneID = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
809
856
|
_classCallCheck(this, RawAR);
|
|
810
857
|
_this6 = _super4.call(this);
|
|
811
858
|
// analytics instance
|
|
812
859
|
_this6._analytics = null;
|
|
813
|
-
if (!modelLocation) {
|
|
860
|
+
if (!options.modelLocation) {
|
|
814
861
|
throw new Error("RawAR.constructor(modelLocation) - modelLocation must be defined");
|
|
815
862
|
}
|
|
816
|
-
var lowerLoc = modelLocation.toLowerCase();
|
|
863
|
+
var lowerLoc = options.modelLocation.toLowerCase();
|
|
817
864
|
if (lowerLoc.endsWith("usdz") || lowerLoc.endsWith("glb") || lowerLoc.endsWith("gltf") || lowerLoc.endsWith("reality")) {
|
|
818
|
-
_this6.
|
|
819
|
-
_this6._sceneID = sceneID;
|
|
865
|
+
_this6._options = options;
|
|
820
866
|
_this6._ar = null;
|
|
821
867
|
} else {
|
|
822
868
|
throw new Error("RawAR.constructor(modelLocation) - modelLocation must be one of gltf, glb, usdz or reality");
|
|
@@ -826,14 +872,14 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
826
872
|
_createClass(RawAR, [{
|
|
827
873
|
key: "modelLocation",
|
|
828
874
|
get: function get() {
|
|
829
|
-
return this.
|
|
875
|
+
return this._options.modelLocation;
|
|
830
876
|
}
|
|
831
877
|
}, {
|
|
832
878
|
key: "_SetupAnalytics",
|
|
833
879
|
value: function _SetupAnalytics() {
|
|
834
880
|
var _this7 = this;
|
|
835
881
|
return new Promise(function (accept, _reject) {
|
|
836
|
-
var sceneID = _this7.
|
|
882
|
+
var sceneID = _this7._options.sceneID;
|
|
837
883
|
if (!sceneID) {
|
|
838
884
|
return accept();
|
|
839
885
|
}
|
|
@@ -852,6 +898,13 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
852
898
|
if (application) {
|
|
853
899
|
analytics.data.push("applicationId", application.id);
|
|
854
900
|
analytics.data.push("applicationTitle", application.attributes.title);
|
|
901
|
+
if (_this7._options.useARBanner) {
|
|
902
|
+
_this7.options.banner = {
|
|
903
|
+
title: application.attributes.title,
|
|
904
|
+
subtitle: scene.attributes.title,
|
|
905
|
+
button: 'Visit'
|
|
906
|
+
};
|
|
907
|
+
}
|
|
855
908
|
}
|
|
856
909
|
accept();
|
|
857
910
|
})["catch"](function (_err) {
|
|
@@ -876,7 +929,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
876
929
|
}
|
|
877
930
|
// send the analytics (if any)
|
|
878
931
|
_this8._SetupAnalytics().then(function () {
|
|
879
|
-
var modelLocation = _this8.
|
|
932
|
+
var modelLocation = _this8._options.modelLocation;
|
|
880
933
|
var lowerLoc = modelLocation.toLowerCase();
|
|
881
934
|
// we need to define our AR module here
|
|
882
935
|
// we are in Safari/Quicklook mode here
|
|
@@ -885,6 +938,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
885
938
|
if (lowerLoc.endsWith("reality") && util_1.Util.canRealityViewer()) {
|
|
886
939
|
_this8._ar = new reality_viewer_1["default"]();
|
|
887
940
|
_this8._ar.modelUrl = modelLocation;
|
|
941
|
+
_this8._ar.banner = _this8.options.banner;
|
|
888
942
|
return accept(_this8);
|
|
889
943
|
}
|
|
890
944
|
// load the usdz experience if dealing with usdz file
|
|
@@ -901,6 +955,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
901
955
|
var arviewer = new scene_viewer_1["default"]();
|
|
902
956
|
arviewer.modelUrl = modelLocation;
|
|
903
957
|
arviewer.isVertical = _this8.options.anchor === "vertical" ? true : false;
|
|
958
|
+
arviewer.banner = _this8.options.banner;
|
|
904
959
|
_this8._ar = arviewer;
|
|
905
960
|
return accept(_this8);
|
|
906
961
|
}
|
|
@@ -978,7 +1033,6 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
978
1033
|
var plattar_services_1 = require("@plattar/plattar-services");
|
|
979
1034
|
var util_1 = require("../util/util");
|
|
980
1035
|
var quicklook_viewer_1 = __importDefault(require("../viewers/quicklook-viewer"));
|
|
981
|
-
var reality_viewer_1 = __importDefault(require("../viewers/reality-viewer"));
|
|
982
1036
|
var scene_viewer_1 = __importDefault(require("../viewers/scene-viewer"));
|
|
983
1037
|
var launcher_ar_1 = require("./launcher-ar");
|
|
984
1038
|
var version_1 = __importDefault(require("../version"));
|
|
@@ -988,26 +1042,23 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
988
1042
|
var SceneAR = /*#__PURE__*/function (_launcher_ar_1$Launch5) {
|
|
989
1043
|
_inherits(SceneAR, _launcher_ar_1$Launch5);
|
|
990
1044
|
var _super5 = _createSuper(SceneAR);
|
|
991
|
-
function SceneAR() {
|
|
1045
|
+
function SceneAR(options) {
|
|
992
1046
|
var _this9;
|
|
993
|
-
var sceneID = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
|
994
|
-
var variationSelection = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
995
1047
|
_classCallCheck(this, SceneAR);
|
|
996
1048
|
_this9 = _super5.call(this);
|
|
997
1049
|
// analytics instance
|
|
998
1050
|
_this9._analytics = null;
|
|
999
|
-
if (!sceneID) {
|
|
1051
|
+
if (!options.sceneID) {
|
|
1000
1052
|
throw new Error("SceneAR.constructor(sceneID) - sceneID must be defined");
|
|
1001
1053
|
}
|
|
1002
|
-
_this9.
|
|
1003
|
-
_this9._variationSelection = variationSelection || {};
|
|
1054
|
+
_this9._options = options;
|
|
1004
1055
|
_this9._ar = null;
|
|
1005
1056
|
return _this9;
|
|
1006
1057
|
}
|
|
1007
1058
|
_createClass(SceneAR, [{
|
|
1008
1059
|
key: "sceneID",
|
|
1009
1060
|
get: function get() {
|
|
1010
|
-
return this.
|
|
1061
|
+
return this._options.sceneID;
|
|
1011
1062
|
}
|
|
1012
1063
|
}, {
|
|
1013
1064
|
key: "_SetupAnalytics",
|
|
@@ -1027,6 +1078,13 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
1027
1078
|
if (application) {
|
|
1028
1079
|
analytics.data.push("applicationId", application.id);
|
|
1029
1080
|
analytics.data.push("applicationTitle", application.attributes.title);
|
|
1081
|
+
if (this._options.useARBanner) {
|
|
1082
|
+
this.options.banner = {
|
|
1083
|
+
title: application.attributes.title,
|
|
1084
|
+
subtitle: scene.attributes.title,
|
|
1085
|
+
button: 'Visit'
|
|
1086
|
+
};
|
|
1087
|
+
}
|
|
1030
1088
|
}
|
|
1031
1089
|
}
|
|
1032
1090
|
}
|
|
@@ -1053,7 +1111,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
1053
1111
|
// add our scene products
|
|
1054
1112
|
sceneProducts.forEach(function (sceneProduct) {
|
|
1055
1113
|
var product = sceneProduct.relationships.find(plattar_api_1.Product);
|
|
1056
|
-
var selection = _this10.
|
|
1114
|
+
var selection = _this10._options.variationSelection;
|
|
1057
1115
|
// we have a specific product selection
|
|
1058
1116
|
if (sceneProduct.attributes.include_in_augment) {
|
|
1059
1117
|
// check if this product is the one we want (from selection optionally)
|
|
@@ -1119,8 +1177,9 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
1119
1177
|
if (sceneOpt.anchor === "face") {
|
|
1120
1178
|
if (util_1.Util.canRealityViewer()) {
|
|
1121
1179
|
return _this11._ComposeScene(scene, "vto").then(function (modelUrl) {
|
|
1122
|
-
_this11._ar = new
|
|
1180
|
+
_this11._ar = new quicklook_viewer_1["default"]();
|
|
1123
1181
|
_this11._ar.modelUrl = modelUrl;
|
|
1182
|
+
_this11._ar.banner = _this11.options.banner;
|
|
1124
1183
|
return accept(_this11);
|
|
1125
1184
|
})["catch"](reject);
|
|
1126
1185
|
} else {
|
|
@@ -1132,6 +1191,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
1132
1191
|
return _this11._ComposeScene(scene, "usdz").then(function (modelUrl) {
|
|
1133
1192
|
_this11._ar = new quicklook_viewer_1["default"]();
|
|
1134
1193
|
_this11._ar.modelUrl = modelUrl;
|
|
1194
|
+
_this11._ar.banner = _this11.options.banner;
|
|
1135
1195
|
return accept(_this11);
|
|
1136
1196
|
})["catch"](reject);
|
|
1137
1197
|
}
|
|
@@ -1143,6 +1203,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
1143
1203
|
var arviewer = new scene_viewer_1["default"]();
|
|
1144
1204
|
arviewer.modelUrl = modelUrl;
|
|
1145
1205
|
arviewer.isVertical = _this11.options.anchor === "vertical" ? true : false;
|
|
1206
|
+
arviewer.banner = _this11.options.banner;
|
|
1146
1207
|
if (sceneOpt.anchor === "vertical") {
|
|
1147
1208
|
arviewer.isVertical = true;
|
|
1148
1209
|
}
|
|
@@ -1196,7 +1257,6 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
1196
1257
|
"../util/util": 15,
|
|
1197
1258
|
"../version": 16,
|
|
1198
1259
|
"../viewers/quicklook-viewer": 18,
|
|
1199
|
-
"../viewers/reality-viewer": 19,
|
|
1200
1260
|
"../viewers/scene-viewer": 20,
|
|
1201
1261
|
"./launcher-ar": 2,
|
|
1202
1262
|
"@plattar/plattar-analytics": 40,
|
|
@@ -1220,19 +1280,17 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
1220
1280
|
var SceneProductAR = /*#__PURE__*/function (_product_ar_1$Product) {
|
|
1221
1281
|
_inherits(SceneProductAR, _product_ar_1$Product);
|
|
1222
1282
|
var _super6 = _createSuper(SceneProductAR);
|
|
1223
|
-
function SceneProductAR() {
|
|
1283
|
+
function SceneProductAR(options) {
|
|
1224
1284
|
var _this12;
|
|
1225
|
-
var sceneProductID = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
|
1226
|
-
var variationID = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
1227
|
-
var variationSKU = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
|
|
1228
1285
|
_classCallCheck(this, SceneProductAR);
|
|
1229
|
-
|
|
1286
|
+
//super(sceneProductID, variationID, variationSKU);
|
|
1287
|
+
_this12 = _super6.call(this, options);
|
|
1230
1288
|
// this is evaluated in the init() function
|
|
1231
1289
|
_this12._attachedProductID = null;
|
|
1232
|
-
if (!
|
|
1290
|
+
if (!options.productID) {
|
|
1233
1291
|
throw new Error("SceneProductAR.constructor(sceneProductID, variationID) - sceneProductID must be defined");
|
|
1234
1292
|
}
|
|
1235
|
-
_this12._sceneProductID =
|
|
1293
|
+
_this12._sceneProductID = options.productID;
|
|
1236
1294
|
return _this12;
|
|
1237
1295
|
}
|
|
1238
1296
|
_createClass(SceneProductAR, [{
|
|
@@ -1292,7 +1350,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
1292
1350
|
/**
|
|
1293
1351
|
* Manages an instance of the <plattar-configurator> HTML Element
|
|
1294
1352
|
*/
|
|
1295
|
-
var ConfiguratorController = /*#__PURE__*/function (_plattar_controller_
|
|
1353
|
+
var ConfiguratorController = /*#__PURE__*/function (_plattar_controller_) {
|
|
1296
1354
|
_inherits(ConfiguratorController, _plattar_controller_);
|
|
1297
1355
|
var _super7 = _createSuper(ConfiguratorController);
|
|
1298
1356
|
function ConfiguratorController() {
|
|
@@ -1304,8 +1362,8 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
1304
1362
|
}
|
|
1305
1363
|
_createClass(ConfiguratorController, [{
|
|
1306
1364
|
key: "getConfiguratorState",
|
|
1307
|
-
value: function
|
|
1308
|
-
|
|
1365
|
+
value: function () {
|
|
1366
|
+
var _getConfiguratorState = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
|
|
1309
1367
|
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
1310
1368
|
while (1) switch (_context4.prev = _context4.next) {
|
|
1311
1369
|
case 0:
|
|
@@ -1322,12 +1380,16 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
1322
1380
|
return _context4.stop();
|
|
1323
1381
|
}
|
|
1324
1382
|
}, _callee4, this);
|
|
1325
|
-
}))
|
|
1326
|
-
|
|
1383
|
+
}));
|
|
1384
|
+
function getConfiguratorState() {
|
|
1385
|
+
return _getConfiguratorState.apply(this, arguments);
|
|
1386
|
+
}
|
|
1387
|
+
return getConfiguratorState;
|
|
1388
|
+
}()
|
|
1327
1389
|
}, {
|
|
1328
1390
|
key: "onAttributesUpdated",
|
|
1329
|
-
value: function
|
|
1330
|
-
|
|
1391
|
+
value: function () {
|
|
1392
|
+
var _onAttributesUpdated = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(attributeName) {
|
|
1331
1393
|
var state, viewer, variationIDs, variationIDsList, variationSKUs, variationSKUList, configState, _variationIDs, _variationIDsList, _configState, _variationSKUs, _variationSKUList;
|
|
1332
1394
|
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
1333
1395
|
while (1) switch (_context5.prev = _context5.next) {
|
|
@@ -1409,12 +1471,16 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
1409
1471
|
return _context5.stop();
|
|
1410
1472
|
}
|
|
1411
1473
|
}, _callee5, this);
|
|
1412
|
-
}))
|
|
1413
|
-
|
|
1474
|
+
}));
|
|
1475
|
+
function onAttributesUpdated(_x2) {
|
|
1476
|
+
return _onAttributesUpdated.apply(this, arguments);
|
|
1477
|
+
}
|
|
1478
|
+
return onAttributesUpdated;
|
|
1479
|
+
}()
|
|
1414
1480
|
}, {
|
|
1415
1481
|
key: "startARQRCode",
|
|
1416
|
-
value: function
|
|
1417
|
-
|
|
1482
|
+
value: function () {
|
|
1483
|
+
var _startARQRCode = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(options) {
|
|
1418
1484
|
var dState, product, controller;
|
|
1419
1485
|
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
1420
1486
|
while (1) switch (_context6.prev = _context6.next) {
|
|
@@ -1457,14 +1523,18 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
1457
1523
|
return _context6.stop();
|
|
1458
1524
|
}
|
|
1459
1525
|
}, _callee6, this, [[0, 17]]);
|
|
1460
|
-
}))
|
|
1461
|
-
|
|
1526
|
+
}));
|
|
1527
|
+
function startARQRCode(_x3) {
|
|
1528
|
+
return _startARQRCode.apply(this, arguments);
|
|
1529
|
+
}
|
|
1530
|
+
return startARQRCode;
|
|
1531
|
+
}()
|
|
1462
1532
|
}, {
|
|
1463
1533
|
key: "startViewerQRCode",
|
|
1464
|
-
value: function
|
|
1465
|
-
|
|
1534
|
+
value: function () {
|
|
1535
|
+
var _startViewerQRCode = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(options) {
|
|
1466
1536
|
var _this15 = this;
|
|
1467
|
-
var sceneID, configState, dState, product, controller, opt, viewer, width, height, dst, showAR, showUI;
|
|
1537
|
+
var sceneID, configState, dState, product, controller, opt, viewer, width, height, dst, showAR, showUI, showBanner;
|
|
1468
1538
|
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
|
|
1469
1539
|
while (1) switch (_context7.prev = _context7.next) {
|
|
1470
1540
|
case 0:
|
|
@@ -1535,6 +1605,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
1535
1605
|
dst = plattar_api_1.Server.location().base + "renderer/configurator.html?scene_id=" + sceneID;
|
|
1536
1606
|
showAR = this.getAttribute("show-ar");
|
|
1537
1607
|
showUI = this.getAttribute("show-ui");
|
|
1608
|
+
showBanner = this.getAttribute("show-ar-banner");
|
|
1538
1609
|
if (showUI && showUI === "true") {
|
|
1539
1610
|
dst = plattar_api_1.Server.location().base + "configurator/dist/index.html?scene_id=" + sceneID;
|
|
1540
1611
|
}
|
|
@@ -1544,6 +1615,9 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
1544
1615
|
if (showAR) {
|
|
1545
1616
|
dst += "&show_ar=" + showAR;
|
|
1546
1617
|
}
|
|
1618
|
+
if (showBanner) {
|
|
1619
|
+
dst += "&show_ar_banner=" + showBanner;
|
|
1620
|
+
}
|
|
1547
1621
|
viewer.setAttribute("url", opt.url || dst);
|
|
1548
1622
|
this._state = plattar_controller_1.ControllerState.QRCode;
|
|
1549
1623
|
this._prevQROpt = opt;
|
|
@@ -1553,17 +1627,21 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
1553
1627
|
};
|
|
1554
1628
|
_this15.append(viewer);
|
|
1555
1629
|
}));
|
|
1556
|
-
case
|
|
1630
|
+
case 49:
|
|
1557
1631
|
case "end":
|
|
1558
1632
|
return _context7.stop();
|
|
1559
1633
|
}
|
|
1560
1634
|
}, _callee7, this, [[5, 23]]);
|
|
1561
|
-
}))
|
|
1562
|
-
|
|
1635
|
+
}));
|
|
1636
|
+
function startViewerQRCode(_x4) {
|
|
1637
|
+
return _startViewerQRCode.apply(this, arguments);
|
|
1638
|
+
}
|
|
1639
|
+
return startViewerQRCode;
|
|
1640
|
+
}()
|
|
1563
1641
|
}, {
|
|
1564
1642
|
key: "startRenderer",
|
|
1565
|
-
value: function
|
|
1566
|
-
|
|
1643
|
+
value: function () {
|
|
1644
|
+
var _startRenderer = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
|
|
1567
1645
|
var _this16 = this;
|
|
1568
1646
|
var sceneID, configState, dState, product, controller, width, height, server, viewer, showAR, showUI;
|
|
1569
1647
|
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
|
|
@@ -1649,12 +1727,16 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
1649
1727
|
return _context8.stop();
|
|
1650
1728
|
}
|
|
1651
1729
|
}, _callee8, this, [[5, 23]]);
|
|
1652
|
-
}))
|
|
1653
|
-
|
|
1730
|
+
}));
|
|
1731
|
+
function startRenderer() {
|
|
1732
|
+
return _startRenderer.apply(this, arguments);
|
|
1733
|
+
}
|
|
1734
|
+
return startRenderer;
|
|
1735
|
+
}()
|
|
1654
1736
|
}, {
|
|
1655
1737
|
key: "initAR",
|
|
1656
|
-
value: function
|
|
1657
|
-
|
|
1738
|
+
value: function () {
|
|
1739
|
+
var _initAR = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9() {
|
|
1658
1740
|
var dState, product, controller, arMode;
|
|
1659
1741
|
return _regeneratorRuntime().wrap(function _callee9$(_context9) {
|
|
1660
1742
|
while (1) switch (_context9.prev = _context9.next) {
|
|
@@ -1710,15 +1792,19 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
1710
1792
|
return _context9.stop();
|
|
1711
1793
|
}
|
|
1712
1794
|
}, _callee9, this, [[2, 19]]);
|
|
1713
|
-
}))
|
|
1714
|
-
|
|
1795
|
+
}));
|
|
1796
|
+
function initAR() {
|
|
1797
|
+
return _initAR.apply(this, arguments);
|
|
1798
|
+
}
|
|
1799
|
+
return initAR;
|
|
1800
|
+
}()
|
|
1715
1801
|
/**
|
|
1716
1802
|
* Private Function - This launches the Static/Inherited AR Mode
|
|
1717
1803
|
*/
|
|
1718
1804
|
}, {
|
|
1719
1805
|
key: "_InitARInherited",
|
|
1720
|
-
value: function
|
|
1721
|
-
|
|
1806
|
+
value: (function () {
|
|
1807
|
+
var _InitARInherited2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10() {
|
|
1722
1808
|
var sceneID, state, first, sceneProductAR;
|
|
1723
1809
|
return _regeneratorRuntime().wrap(function _callee10$(_context10) {
|
|
1724
1810
|
while (1) switch (_context10.prev = _context10.next) {
|
|
@@ -1739,7 +1825,13 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
1739
1825
|
_context10.next = 10;
|
|
1740
1826
|
break;
|
|
1741
1827
|
}
|
|
1742
|
-
sceneProductAR = new
|
|
1828
|
+
//const sceneProductAR: SceneProductAR = new SceneProductAR(first.scene_product_id, first.product_variation_id);
|
|
1829
|
+
sceneProductAR = new scene_product_ar_1.SceneProductAR({
|
|
1830
|
+
productID: first.scene_product_id,
|
|
1831
|
+
variationID: first.product_variation_id,
|
|
1832
|
+
variationSKU: null,
|
|
1833
|
+
useARBanner: this.getBooleanAttribute("show-ar-banner")
|
|
1834
|
+
});
|
|
1743
1835
|
return _context10.abrupt("return", sceneProductAR.init());
|
|
1744
1836
|
case 10:
|
|
1745
1837
|
throw new Error("ConfiguratorController.initAR() - invalid decoded config-state does not have any product states");
|
|
@@ -1748,15 +1840,20 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
1748
1840
|
return _context10.stop();
|
|
1749
1841
|
}
|
|
1750
1842
|
}, _callee10, this);
|
|
1751
|
-
}))
|
|
1752
|
-
|
|
1843
|
+
}));
|
|
1844
|
+
function _InitARInherited() {
|
|
1845
|
+
return _InitARInherited2.apply(this, arguments);
|
|
1846
|
+
}
|
|
1847
|
+
return _InitARInherited;
|
|
1848
|
+
}()
|
|
1753
1849
|
/**
|
|
1754
1850
|
* Private Function - This launches the Dynamic/Generated AR Mode
|
|
1755
1851
|
*/
|
|
1852
|
+
)
|
|
1756
1853
|
}, {
|
|
1757
1854
|
key: "_InitARGenerated",
|
|
1758
|
-
value: function
|
|
1759
|
-
|
|
1855
|
+
value: (function () {
|
|
1856
|
+
var _InitARGenerated2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11() {
|
|
1760
1857
|
var sceneID, configAR;
|
|
1761
1858
|
return _regeneratorRuntime().wrap(function _callee11$(_context11) {
|
|
1762
1859
|
while (1) switch (_context11.prev = _context11.next) {
|
|
@@ -1773,15 +1870,24 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
1773
1870
|
return this.getConfiguratorState();
|
|
1774
1871
|
case 6:
|
|
1775
1872
|
_context11.t1 = _context11.sent;
|
|
1776
|
-
|
|
1873
|
+
_context11.t2 = this.getBooleanAttribute("show-ar-banner");
|
|
1874
|
+
_context11.t3 = {
|
|
1875
|
+
state: _context11.t1,
|
|
1876
|
+
useARBanner: _context11.t2
|
|
1877
|
+
};
|
|
1878
|
+
configAR = new _context11.t0(_context11.t3);
|
|
1777
1879
|
return _context11.abrupt("return", configAR.init());
|
|
1778
|
-
case
|
|
1880
|
+
case 11:
|
|
1779
1881
|
case "end":
|
|
1780
1882
|
return _context11.stop();
|
|
1781
1883
|
}
|
|
1782
1884
|
}, _callee11, this);
|
|
1783
|
-
}))
|
|
1784
|
-
|
|
1885
|
+
}));
|
|
1886
|
+
function _InitARGenerated() {
|
|
1887
|
+
return _InitARGenerated2.apply(this, arguments);
|
|
1888
|
+
}
|
|
1889
|
+
return _InitARGenerated;
|
|
1890
|
+
}())
|
|
1785
1891
|
}, {
|
|
1786
1892
|
key: "removeRenderer",
|
|
1787
1893
|
value: function removeRenderer() {
|
|
@@ -1827,7 +1933,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
1827
1933
|
/**
|
|
1828
1934
|
* All Plattar Controllers are derived from the same interface
|
|
1829
1935
|
*/
|
|
1830
|
-
var PlattarController = /*#__PURE__*/function (
|
|
1936
|
+
var PlattarController = /*#__PURE__*/function () {
|
|
1831
1937
|
function PlattarController(parent) {
|
|
1832
1938
|
_classCallCheck(this, PlattarController);
|
|
1833
1939
|
this._state = ControllerState.None;
|
|
@@ -1856,8 +1962,8 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
1856
1962
|
}
|
|
1857
1963
|
}, {
|
|
1858
1964
|
key: "createConfiguratorState",
|
|
1859
|
-
value: function
|
|
1860
|
-
|
|
1965
|
+
value: (function () {
|
|
1966
|
+
var _createConfiguratorState = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12() {
|
|
1861
1967
|
var sceneID, configState, variationIDs, variationSKUs, decodedState, variationIDList, variationSKUList;
|
|
1862
1968
|
return _regeneratorRuntime().wrap(function _callee12$(_context12) {
|
|
1863
1969
|
while (1) switch (_context12.prev = _context12.next) {
|
|
@@ -1906,12 +2012,17 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
1906
2012
|
return _context12.stop();
|
|
1907
2013
|
}
|
|
1908
2014
|
}, _callee12, this);
|
|
1909
|
-
}))
|
|
1910
|
-
|
|
2015
|
+
}));
|
|
2016
|
+
function createConfiguratorState() {
|
|
2017
|
+
return _createConfiguratorState.apply(this, arguments);
|
|
2018
|
+
}
|
|
2019
|
+
return createConfiguratorState;
|
|
2020
|
+
}()
|
|
1911
2021
|
/**
|
|
1912
2022
|
* Setup messenger observers to detect variation changes and apply to the internal
|
|
1913
2023
|
* configuration state
|
|
1914
2024
|
*/
|
|
2025
|
+
)
|
|
1915
2026
|
}, {
|
|
1916
2027
|
key: "setupMessengerObservers",
|
|
1917
2028
|
value: function setupMessengerObservers(viewer, configState) {
|
|
@@ -1954,8 +2065,8 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
1954
2065
|
*/
|
|
1955
2066
|
}, {
|
|
1956
2067
|
key: "startAR",
|
|
1957
|
-
value: function
|
|
1958
|
-
|
|
2068
|
+
value: (function () {
|
|
2069
|
+
var _startAR = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13() {
|
|
1959
2070
|
var launcher;
|
|
1960
2071
|
return _regeneratorRuntime().wrap(function _callee13$(_context13) {
|
|
1961
2072
|
while (1) switch (_context13.prev = _context13.next) {
|
|
@@ -1970,17 +2081,22 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
1970
2081
|
return _context13.stop();
|
|
1971
2082
|
}
|
|
1972
2083
|
}, _callee13, this);
|
|
1973
|
-
}))
|
|
1974
|
-
|
|
2084
|
+
}));
|
|
2085
|
+
function startAR() {
|
|
2086
|
+
return _startAR.apply(this, arguments);
|
|
2087
|
+
}
|
|
2088
|
+
return startAR;
|
|
2089
|
+
}()
|
|
1975
2090
|
/**
|
|
1976
2091
|
* Decide which QR Code to render according to the qr-type attribute
|
|
1977
2092
|
* @param options
|
|
1978
2093
|
* @returns
|
|
1979
2094
|
*/
|
|
2095
|
+
)
|
|
1980
2096
|
}, {
|
|
1981
2097
|
key: "startQRCode",
|
|
1982
|
-
value: function
|
|
1983
|
-
|
|
2098
|
+
value: (function () {
|
|
2099
|
+
var _startQRCode = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee14(options) {
|
|
1984
2100
|
var qrType;
|
|
1985
2101
|
return _regeneratorRuntime().wrap(function _callee14$(_context14) {
|
|
1986
2102
|
while (1) switch (_context14.prev = _context14.next) {
|
|
@@ -1998,19 +2114,24 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
1998
2114
|
return _context14.stop();
|
|
1999
2115
|
}
|
|
2000
2116
|
}, _callee14, this);
|
|
2001
|
-
}))
|
|
2002
|
-
|
|
2117
|
+
}));
|
|
2118
|
+
function startQRCode(_x5) {
|
|
2119
|
+
return _startQRCode.apply(this, arguments);
|
|
2120
|
+
}
|
|
2121
|
+
return startQRCode;
|
|
2122
|
+
}()
|
|
2003
2123
|
/**
|
|
2004
2124
|
* Displays a QR Code that sends the user direct to AR
|
|
2005
2125
|
* @param options
|
|
2006
2126
|
* @returns
|
|
2007
2127
|
*/
|
|
2128
|
+
)
|
|
2008
2129
|
}, {
|
|
2009
2130
|
key: "startARQRCode",
|
|
2010
|
-
value: function
|
|
2011
|
-
|
|
2131
|
+
value: (function () {
|
|
2132
|
+
var _startARQRCode2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee15(options) {
|
|
2012
2133
|
var _this17 = this;
|
|
2013
|
-
var opt, viewer, width, height, qrOptions, dst, configState, sceneID, embedType, productID, sceneProductID, variationID, variationSKU, arMode;
|
|
2134
|
+
var opt, viewer, width, height, qrOptions, dst, configState, sceneID, embedType, productID, sceneProductID, variationID, variationSKU, arMode, showBanner;
|
|
2014
2135
|
return _regeneratorRuntime().wrap(function _callee15$(_context15) {
|
|
2015
2136
|
while (1) switch (_context15.prev = _context15.next) {
|
|
2016
2137
|
case 0:
|
|
@@ -2044,19 +2165,20 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
2044
2165
|
variationID = this.getAttribute("variation-id");
|
|
2045
2166
|
variationSKU = this.getAttribute("variation-sku");
|
|
2046
2167
|
arMode = this.getAttribute("ar-mode");
|
|
2047
|
-
|
|
2048
|
-
_context15.
|
|
2168
|
+
showBanner = this.getAttribute("show-ar-banner");
|
|
2169
|
+
_context15.prev = 23;
|
|
2170
|
+
_context15.next = 26;
|
|
2049
2171
|
return this.getConfiguratorState();
|
|
2050
|
-
case
|
|
2172
|
+
case 26:
|
|
2051
2173
|
configState = _context15.sent.state.encode();
|
|
2052
|
-
_context15.next =
|
|
2174
|
+
_context15.next = 32;
|
|
2053
2175
|
break;
|
|
2054
|
-
case
|
|
2055
|
-
_context15.prev =
|
|
2056
|
-
_context15.t0 = _context15["catch"](
|
|
2176
|
+
case 29:
|
|
2177
|
+
_context15.prev = 29;
|
|
2178
|
+
_context15.t0 = _context15["catch"](23);
|
|
2057
2179
|
// config state not available for some reason
|
|
2058
2180
|
configState = null;
|
|
2059
|
-
case
|
|
2181
|
+
case 32:
|
|
2060
2182
|
if (configState) {
|
|
2061
2183
|
dst += "&config_state=" + configState;
|
|
2062
2184
|
}
|
|
@@ -2081,6 +2203,9 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
2081
2203
|
if (sceneID) {
|
|
2082
2204
|
dst += "&scene_id=" + sceneID;
|
|
2083
2205
|
}
|
|
2206
|
+
if (showBanner) {
|
|
2207
|
+
dst += "&show_ar_banner=" + showBanner;
|
|
2208
|
+
}
|
|
2084
2209
|
viewer.setAttribute("url", opt.url || dst);
|
|
2085
2210
|
this._state = ControllerState.QRCode;
|
|
2086
2211
|
this._prevQROpt = opt;
|
|
@@ -2090,16 +2215,21 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
2090
2215
|
return accept(viewer);
|
|
2091
2216
|
};
|
|
2092
2217
|
}));
|
|
2093
|
-
case
|
|
2218
|
+
case 45:
|
|
2094
2219
|
case "end":
|
|
2095
2220
|
return _context15.stop();
|
|
2096
2221
|
}
|
|
2097
|
-
}, _callee15, this, [[
|
|
2098
|
-
}))
|
|
2099
|
-
|
|
2222
|
+
}, _callee15, this, [[23, 29]]);
|
|
2223
|
+
}));
|
|
2224
|
+
function startARQRCode(_x6) {
|
|
2225
|
+
return _startARQRCode2.apply(this, arguments);
|
|
2226
|
+
}
|
|
2227
|
+
return startARQRCode;
|
|
2228
|
+
}()
|
|
2100
2229
|
/**
|
|
2101
2230
|
* Returns the Parent Instance
|
|
2102
2231
|
*/
|
|
2232
|
+
)
|
|
2103
2233
|
}, {
|
|
2104
2234
|
key: "parent",
|
|
2105
2235
|
get: function get() {
|
|
@@ -2115,6 +2245,17 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
2115
2245
|
value: function getAttribute(attribute) {
|
|
2116
2246
|
return this.parent ? this.parent.hasAttribute(attribute) ? this.parent.getAttribute(attribute) : null : null;
|
|
2117
2247
|
}
|
|
2248
|
+
/**
|
|
2249
|
+
* Returns the specified attribute from the parent as a boolean
|
|
2250
|
+
* @param attribute - The name of the attribute
|
|
2251
|
+
* @returns - The attribute value
|
|
2252
|
+
*/
|
|
2253
|
+
}, {
|
|
2254
|
+
key: "getBooleanAttribute",
|
|
2255
|
+
value: function getBooleanAttribute(attribute) {
|
|
2256
|
+
var _this$parent$getAttri;
|
|
2257
|
+
return this.parent ? this.parent.hasAttribute(attribute) ? ((_this$parent$getAttri = this.parent.getAttribute(attribute)) === null || _this$parent$getAttri === void 0 ? void 0 : _this$parent$getAttri.toLowerCase()) === "true" ? true : false : false : false;
|
|
2258
|
+
}
|
|
2118
2259
|
/**
|
|
2119
2260
|
* Sets a particular attribute into the HTML DOM
|
|
2120
2261
|
*
|
|
@@ -2177,7 +2318,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
2177
2318
|
* NOTE: As of 14th June 2023, this is now a legacy Controller and only used in legacy embeds
|
|
2178
2319
|
* and should be deprecated from both documentation and previous integrations
|
|
2179
2320
|
*/
|
|
2180
|
-
var ProductController = /*#__PURE__*/function (_plattar_controller_2
|
|
2321
|
+
var ProductController = /*#__PURE__*/function (_plattar_controller_2) {
|
|
2181
2322
|
_inherits(ProductController, _plattar_controller_2);
|
|
2182
2323
|
var _super8 = _createSuper(ProductController);
|
|
2183
2324
|
function ProductController() {
|
|
@@ -2186,8 +2327,8 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
2186
2327
|
}
|
|
2187
2328
|
_createClass(ProductController, [{
|
|
2188
2329
|
key: "getConfiguratorState",
|
|
2189
|
-
value: function
|
|
2190
|
-
|
|
2330
|
+
value: function () {
|
|
2331
|
+
var _getConfiguratorState2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee16() {
|
|
2191
2332
|
return _regeneratorRuntime().wrap(function _callee16$(_context16) {
|
|
2192
2333
|
while (1) switch (_context16.prev = _context16.next) {
|
|
2193
2334
|
case 0:
|
|
@@ -2197,12 +2338,16 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
2197
2338
|
return _context16.stop();
|
|
2198
2339
|
}
|
|
2199
2340
|
}, _callee16);
|
|
2200
|
-
}))
|
|
2201
|
-
|
|
2341
|
+
}));
|
|
2342
|
+
function getConfiguratorState() {
|
|
2343
|
+
return _getConfiguratorState2.apply(this, arguments);
|
|
2344
|
+
}
|
|
2345
|
+
return getConfiguratorState;
|
|
2346
|
+
}()
|
|
2202
2347
|
}, {
|
|
2203
2348
|
key: "onAttributesUpdated",
|
|
2204
|
-
value: function
|
|
2205
|
-
|
|
2349
|
+
value: function () {
|
|
2350
|
+
var _onAttributesUpdated2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee17(attributeName) {
|
|
2206
2351
|
var state, viewer, variationID;
|
|
2207
2352
|
return _regeneratorRuntime().wrap(function _callee17$(_context17) {
|
|
2208
2353
|
while (1) switch (_context17.prev = _context17.next) {
|
|
@@ -2230,8 +2375,12 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
2230
2375
|
return _context17.stop();
|
|
2231
2376
|
}
|
|
2232
2377
|
}, _callee17, this);
|
|
2233
|
-
}))
|
|
2234
|
-
|
|
2378
|
+
}));
|
|
2379
|
+
function onAttributesUpdated(_x7) {
|
|
2380
|
+
return _onAttributesUpdated2.apply(this, arguments);
|
|
2381
|
+
}
|
|
2382
|
+
return onAttributesUpdated;
|
|
2383
|
+
}()
|
|
2235
2384
|
}, {
|
|
2236
2385
|
key: "startViewerQRCode",
|
|
2237
2386
|
value: function startViewerQRCode(options) {
|
|
@@ -2324,6 +2473,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
2324
2473
|
var variationID = _this19.getAttribute("variation-id");
|
|
2325
2474
|
var variationSKU = _this19.getAttribute("variation-sku");
|
|
2326
2475
|
var arMode = _this19.getAttribute("ar-mode");
|
|
2476
|
+
var showBanner = _this19.getAttribute("show-ar-banner");
|
|
2327
2477
|
if (configState) {
|
|
2328
2478
|
dst += "&config_state=" + configState;
|
|
2329
2479
|
}
|
|
@@ -2348,6 +2498,9 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
2348
2498
|
if (sceneID) {
|
|
2349
2499
|
dst += "&scene_id=" + sceneID;
|
|
2350
2500
|
}
|
|
2501
|
+
if (showBanner) {
|
|
2502
|
+
dst += "&show_ar_banner=" + showBanner;
|
|
2503
|
+
}
|
|
2351
2504
|
viewer.setAttribute("url", opt.url || dst);
|
|
2352
2505
|
viewer.onload = function () {
|
|
2353
2506
|
return accept(viewer);
|
|
@@ -2412,7 +2565,13 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
2412
2565
|
if (productID) {
|
|
2413
2566
|
var variationID = _this21.getAttribute("variation-id");
|
|
2414
2567
|
var variationSKU = _this21.getAttribute("variation-sku");
|
|
2415
|
-
|
|
2568
|
+
//const product: ProductAR = new ProductAR(productID, variationID, variationSKU);
|
|
2569
|
+
var product = new product_ar_1.ProductAR({
|
|
2570
|
+
productID: productID,
|
|
2571
|
+
variationID: variationID ? variationID : variationSKU ? null : "default",
|
|
2572
|
+
variationSKU: variationSKU,
|
|
2573
|
+
useARBanner: _this21.getBooleanAttribute("show-ar-banner")
|
|
2574
|
+
});
|
|
2416
2575
|
return product.init().then(accept)["catch"](reject);
|
|
2417
2576
|
}
|
|
2418
2577
|
return reject(new Error("ProductController.initAR() - minimum required attributes not set, use product-id as a minimum"));
|
|
@@ -2458,7 +2617,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
2458
2617
|
/**
|
|
2459
2618
|
* Manages an instance of the <plattar-configurator> HTML Element
|
|
2460
2619
|
*/
|
|
2461
|
-
var VTOController = /*#__PURE__*/function (_plattar_controller_3
|
|
2620
|
+
var VTOController = /*#__PURE__*/function (_plattar_controller_3) {
|
|
2462
2621
|
_inherits(VTOController, _plattar_controller_3);
|
|
2463
2622
|
var _super9 = _createSuper(VTOController);
|
|
2464
2623
|
function VTOController() {
|
|
@@ -2470,8 +2629,8 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
2470
2629
|
}
|
|
2471
2630
|
_createClass(VTOController, [{
|
|
2472
2631
|
key: "getConfiguratorState",
|
|
2473
|
-
value: function
|
|
2474
|
-
|
|
2632
|
+
value: function () {
|
|
2633
|
+
var _getConfiguratorState3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee18() {
|
|
2475
2634
|
return _regeneratorRuntime().wrap(function _callee18$(_context18) {
|
|
2476
2635
|
while (1) switch (_context18.prev = _context18.next) {
|
|
2477
2636
|
case 0:
|
|
@@ -2488,12 +2647,16 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
2488
2647
|
return _context18.stop();
|
|
2489
2648
|
}
|
|
2490
2649
|
}, _callee18, this);
|
|
2491
|
-
}))
|
|
2492
|
-
|
|
2650
|
+
}));
|
|
2651
|
+
function getConfiguratorState() {
|
|
2652
|
+
return _getConfiguratorState3.apply(this, arguments);
|
|
2653
|
+
}
|
|
2654
|
+
return getConfiguratorState;
|
|
2655
|
+
}()
|
|
2493
2656
|
}, {
|
|
2494
2657
|
key: "onAttributesUpdated",
|
|
2495
|
-
value: function
|
|
2496
|
-
|
|
2658
|
+
value: function () {
|
|
2659
|
+
var _onAttributesUpdated3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee19(attributeName) {
|
|
2497
2660
|
var state, viewer, variationIDs, variationIDsList, variationSKUs, variationSKUList, configState, _variationIDs2, _variationIDsList2, _configState2, _variationSKUs2, _variationSKUList2;
|
|
2498
2661
|
return _regeneratorRuntime().wrap(function _callee19$(_context19) {
|
|
2499
2662
|
while (1) switch (_context19.prev = _context19.next) {
|
|
@@ -2575,12 +2738,16 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
2575
2738
|
return _context19.stop();
|
|
2576
2739
|
}
|
|
2577
2740
|
}, _callee19, this);
|
|
2578
|
-
}))
|
|
2579
|
-
|
|
2741
|
+
}));
|
|
2742
|
+
function onAttributesUpdated(_x8) {
|
|
2743
|
+
return _onAttributesUpdated3.apply(this, arguments);
|
|
2744
|
+
}
|
|
2745
|
+
return onAttributesUpdated;
|
|
2746
|
+
}()
|
|
2580
2747
|
}, {
|
|
2581
2748
|
key: "startViewerQRCode",
|
|
2582
|
-
value: function
|
|
2583
|
-
|
|
2749
|
+
value: function () {
|
|
2750
|
+
var _startViewerQRCode2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee20(options) {
|
|
2584
2751
|
var _this23 = this;
|
|
2585
2752
|
var sceneID, opt, viewer, width, height, dst, configState, showAR, productID, sceneProductID, variationID;
|
|
2586
2753
|
return _regeneratorRuntime().wrap(function _callee20$(_context20) {
|
|
@@ -2661,12 +2828,16 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
2661
2828
|
return _context20.stop();
|
|
2662
2829
|
}
|
|
2663
2830
|
}, _callee20, this, [[17, 23]]);
|
|
2664
|
-
}))
|
|
2665
|
-
|
|
2831
|
+
}));
|
|
2832
|
+
function startViewerQRCode(_x9) {
|
|
2833
|
+
return _startViewerQRCode2.apply(this, arguments);
|
|
2834
|
+
}
|
|
2835
|
+
return startViewerQRCode;
|
|
2836
|
+
}()
|
|
2666
2837
|
}, {
|
|
2667
2838
|
key: "startRenderer",
|
|
2668
|
-
value: function
|
|
2669
|
-
|
|
2839
|
+
value: function () {
|
|
2840
|
+
var _startRenderer2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee21() {
|
|
2670
2841
|
var _this24 = this;
|
|
2671
2842
|
var sceneID, width, height, server, viewer, configState, showAR, productID, sceneProductID, variationID;
|
|
2672
2843
|
return _regeneratorRuntime().wrap(function _callee21$(_context21) {
|
|
@@ -2738,12 +2909,16 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
2738
2909
|
return _context21.stop();
|
|
2739
2910
|
}
|
|
2740
2911
|
}, _callee21, this, [[14, 20]]);
|
|
2741
|
-
}))
|
|
2742
|
-
|
|
2912
|
+
}));
|
|
2913
|
+
function startRenderer() {
|
|
2914
|
+
return _startRenderer2.apply(this, arguments);
|
|
2915
|
+
}
|
|
2916
|
+
return startRenderer;
|
|
2917
|
+
}()
|
|
2743
2918
|
}, {
|
|
2744
2919
|
key: "initAR",
|
|
2745
|
-
value: function
|
|
2746
|
-
|
|
2920
|
+
value: function () {
|
|
2921
|
+
var _initAR2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee22() {
|
|
2747
2922
|
var arMode;
|
|
2748
2923
|
return _regeneratorRuntime().wrap(function _callee22$(_context22) {
|
|
2749
2924
|
while (1) switch (_context22.prev = _context22.next) {
|
|
@@ -2773,15 +2948,19 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
2773
2948
|
return _context22.stop();
|
|
2774
2949
|
}
|
|
2775
2950
|
}, _callee22, this);
|
|
2776
|
-
}))
|
|
2777
|
-
|
|
2951
|
+
}));
|
|
2952
|
+
function initAR() {
|
|
2953
|
+
return _initAR2.apply(this, arguments);
|
|
2954
|
+
}
|
|
2955
|
+
return initAR;
|
|
2956
|
+
}()
|
|
2778
2957
|
/**
|
|
2779
2958
|
* Private Function - This launches the Static/Inherited AR Mode
|
|
2780
2959
|
*/
|
|
2781
2960
|
}, {
|
|
2782
2961
|
key: "_InitARInherited",
|
|
2783
|
-
value: function
|
|
2784
|
-
|
|
2962
|
+
value: (function () {
|
|
2963
|
+
var _InitARInherited3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee23() {
|
|
2785
2964
|
var sceneID, state, first, sceneProductAR;
|
|
2786
2965
|
return _regeneratorRuntime().wrap(function _callee23$(_context23) {
|
|
2787
2966
|
while (1) switch (_context23.prev = _context23.next) {
|
|
@@ -2802,7 +2981,12 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
2802
2981
|
_context23.next = 10;
|
|
2803
2982
|
break;
|
|
2804
2983
|
}
|
|
2805
|
-
sceneProductAR = new __1.SceneProductAR(
|
|
2984
|
+
sceneProductAR = new __1.SceneProductAR({
|
|
2985
|
+
productID: first.scene_product_id,
|
|
2986
|
+
variationID: first.product_variation_id,
|
|
2987
|
+
variationSKU: null,
|
|
2988
|
+
useARBanner: this.getBooleanAttribute("show-ar-banner")
|
|
2989
|
+
});
|
|
2806
2990
|
return _context23.abrupt("return", sceneProductAR.init());
|
|
2807
2991
|
case 10:
|
|
2808
2992
|
throw new Error("VTOController.initAR() - invalid decoded config-state does not have any product states");
|
|
@@ -2811,15 +2995,20 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
2811
2995
|
return _context23.stop();
|
|
2812
2996
|
}
|
|
2813
2997
|
}, _callee23, this);
|
|
2814
|
-
}))
|
|
2815
|
-
|
|
2998
|
+
}));
|
|
2999
|
+
function _InitARInherited() {
|
|
3000
|
+
return _InitARInherited3.apply(this, arguments);
|
|
3001
|
+
}
|
|
3002
|
+
return _InitARInherited;
|
|
3003
|
+
}()
|
|
2816
3004
|
/**
|
|
2817
3005
|
* Private Function - This launches the Dynamic/Generated AR Mode
|
|
2818
3006
|
*/
|
|
3007
|
+
)
|
|
2819
3008
|
}, {
|
|
2820
3009
|
key: "_InitARGenerated",
|
|
2821
|
-
value: function
|
|
2822
|
-
|
|
3010
|
+
value: (function () {
|
|
3011
|
+
var _InitARGenerated3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee24() {
|
|
2823
3012
|
var sceneID, configAR;
|
|
2824
3013
|
return _regeneratorRuntime().wrap(function _callee24$(_context24) {
|
|
2825
3014
|
while (1) switch (_context24.prev = _context24.next) {
|
|
@@ -2836,15 +3025,24 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
2836
3025
|
return this.getConfiguratorState();
|
|
2837
3026
|
case 6:
|
|
2838
3027
|
_context24.t1 = _context24.sent;
|
|
2839
|
-
|
|
3028
|
+
_context24.t2 = this.getBooleanAttribute("show-ar-banner");
|
|
3029
|
+
_context24.t3 = {
|
|
3030
|
+
state: _context24.t1,
|
|
3031
|
+
useARBanner: _context24.t2
|
|
3032
|
+
};
|
|
3033
|
+
configAR = new _context24.t0(_context24.t3);
|
|
2840
3034
|
return _context24.abrupt("return", configAR.init());
|
|
2841
|
-
case
|
|
3035
|
+
case 11:
|
|
2842
3036
|
case "end":
|
|
2843
3037
|
return _context24.stop();
|
|
2844
3038
|
}
|
|
2845
3039
|
}, _callee24, this);
|
|
2846
|
-
}))
|
|
2847
|
-
|
|
3040
|
+
}));
|
|
3041
|
+
function _InitARGenerated() {
|
|
3042
|
+
return _InitARGenerated3.apply(this, arguments);
|
|
3043
|
+
}
|
|
3044
|
+
return _InitARGenerated;
|
|
3045
|
+
}())
|
|
2848
3046
|
}, {
|
|
2849
3047
|
key: "removeRenderer",
|
|
2850
3048
|
value: function removeRenderer() {
|
|
@@ -2904,7 +3102,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
2904
3102
|
* This is the primary <plattar-embed /> node that allows easy embedding
|
|
2905
3103
|
* of Plattar related content
|
|
2906
3104
|
*/
|
|
2907
|
-
var PlattarEmbed = /*#__PURE__*/function (_HTMLElement
|
|
3105
|
+
var PlattarEmbed = /*#__PURE__*/function (_HTMLElement) {
|
|
2908
3106
|
_inherits(PlattarEmbed, _HTMLElement);
|
|
2909
3107
|
var _super10 = _createSuper(PlattarEmbed);
|
|
2910
3108
|
function PlattarEmbed() {
|
|
@@ -3079,8 +3277,8 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
3079
3277
|
}
|
|
3080
3278
|
}, {
|
|
3081
3279
|
key: "initAR",
|
|
3082
|
-
value: function
|
|
3083
|
-
|
|
3280
|
+
value: function () {
|
|
3281
|
+
var _initAR3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee25() {
|
|
3084
3282
|
return _regeneratorRuntime().wrap(function _callee25$(_context25) {
|
|
3085
3283
|
while (1) switch (_context25.prev = _context25.next) {
|
|
3086
3284
|
case 0:
|
|
@@ -3096,12 +3294,16 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
3096
3294
|
return _context25.stop();
|
|
3097
3295
|
}
|
|
3098
3296
|
}, _callee25, this);
|
|
3099
|
-
}))
|
|
3100
|
-
|
|
3297
|
+
}));
|
|
3298
|
+
function initAR() {
|
|
3299
|
+
return _initAR3.apply(this, arguments);
|
|
3300
|
+
}
|
|
3301
|
+
return initAR;
|
|
3302
|
+
}()
|
|
3101
3303
|
}, {
|
|
3102
3304
|
key: "startAR",
|
|
3103
|
-
value: function
|
|
3104
|
-
|
|
3305
|
+
value: function () {
|
|
3306
|
+
var _startAR2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee26() {
|
|
3105
3307
|
return _regeneratorRuntime().wrap(function _callee26$(_context26) {
|
|
3106
3308
|
while (1) switch (_context26.prev = _context26.next) {
|
|
3107
3309
|
case 0:
|
|
@@ -3117,12 +3319,16 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
3117
3319
|
return _context26.stop();
|
|
3118
3320
|
}
|
|
3119
3321
|
}, _callee26, this);
|
|
3120
|
-
}))
|
|
3121
|
-
|
|
3322
|
+
}));
|
|
3323
|
+
function startAR() {
|
|
3324
|
+
return _startAR2.apply(this, arguments);
|
|
3325
|
+
}
|
|
3326
|
+
return startAR;
|
|
3327
|
+
}()
|
|
3122
3328
|
}, {
|
|
3123
3329
|
key: "startViewer",
|
|
3124
|
-
value: function
|
|
3125
|
-
|
|
3330
|
+
value: function () {
|
|
3331
|
+
var _startViewer = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee27() {
|
|
3126
3332
|
return _regeneratorRuntime().wrap(function _callee27$(_context27) {
|
|
3127
3333
|
while (1) switch (_context27.prev = _context27.next) {
|
|
3128
3334
|
case 0:
|
|
@@ -3138,12 +3344,16 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
3138
3344
|
return _context27.stop();
|
|
3139
3345
|
}
|
|
3140
3346
|
}, _callee27, this);
|
|
3141
|
-
}))
|
|
3142
|
-
|
|
3347
|
+
}));
|
|
3348
|
+
function startViewer() {
|
|
3349
|
+
return _startViewer.apply(this, arguments);
|
|
3350
|
+
}
|
|
3351
|
+
return startViewer;
|
|
3352
|
+
}()
|
|
3143
3353
|
}, {
|
|
3144
3354
|
key: "startQRCode",
|
|
3145
|
-
value: function
|
|
3146
|
-
|
|
3355
|
+
value: function () {
|
|
3356
|
+
var _startQRCode2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee28() {
|
|
3147
3357
|
var options,
|
|
3148
3358
|
_args28 = arguments;
|
|
3149
3359
|
return _regeneratorRuntime().wrap(function _callee28$(_context28) {
|
|
@@ -3162,8 +3372,12 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
3162
3372
|
return _context28.stop();
|
|
3163
3373
|
}
|
|
3164
3374
|
}, _callee28, this);
|
|
3165
|
-
}))
|
|
3166
|
-
|
|
3375
|
+
}));
|
|
3376
|
+
function startQRCode() {
|
|
3377
|
+
return _startQRCode2.apply(this, arguments);
|
|
3378
|
+
}
|
|
3379
|
+
return startQRCode;
|
|
3380
|
+
}()
|
|
3167
3381
|
/**
|
|
3168
3382
|
* This will remove the currently active Renderer
|
|
3169
3383
|
*
|
|
@@ -3188,6 +3402,25 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
3188
3402
|
this._controller.onAttributesUpdated(attributeName);
|
|
3189
3403
|
}
|
|
3190
3404
|
}
|
|
3405
|
+
}, {
|
|
3406
|
+
key: "addEventListener",
|
|
3407
|
+
value: function addEventListener(type, listener, options) {
|
|
3408
|
+
var _this27 = this;
|
|
3409
|
+
// add to the element event listener
|
|
3410
|
+
_get(_getPrototypeOf(PlattarEmbed.prototype), "addEventListener", this).call(this, type, listener, options);
|
|
3411
|
+
var eventType = 'arclick';
|
|
3412
|
+
if (type === eventType) {
|
|
3413
|
+
// automatically enable `show-ar-banner` to true if an arclick event is added
|
|
3414
|
+
this.setAttribute('show-ar-banner', 'true');
|
|
3415
|
+
// if this is a redirect url from an AR Action - we need to fire the event listener now
|
|
3416
|
+
var url = new URL(location.href);
|
|
3417
|
+
if (url.searchParams.get('plattar_ar_action') === 'true') {
|
|
3418
|
+
setTimeout(function () {
|
|
3419
|
+
_this27.dispatchEvent(new Event(eventType));
|
|
3420
|
+
}, 200);
|
|
3421
|
+
}
|
|
3422
|
+
}
|
|
3423
|
+
}
|
|
3191
3424
|
}]);
|
|
3192
3425
|
return PlattarEmbed;
|
|
3193
3426
|
}( /*#__PURE__*/_wrapNativeSuper(HTMLElement));
|
|
@@ -3334,7 +3567,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
3334
3567
|
* Manages a Configuration State of multiple Products with multiple Variations
|
|
3335
3568
|
* Allows easily changing
|
|
3336
3569
|
*/
|
|
3337
|
-
var ConfiguratorState = /*#__PURE__*/function (
|
|
3570
|
+
var ConfiguratorState = /*#__PURE__*/function () {
|
|
3338
3571
|
function ConfiguratorState() {
|
|
3339
3572
|
var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
|
3340
3573
|
_classCallCheck(this, ConfiguratorState);
|
|
@@ -3377,14 +3610,14 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
3377
3610
|
_createClass(ConfiguratorState, [{
|
|
3378
3611
|
key: "setVariationSKU",
|
|
3379
3612
|
value: function setVariationSKU(productVariationSKU) {
|
|
3380
|
-
var
|
|
3613
|
+
var _this28 = this;
|
|
3381
3614
|
var variationIDs = this._mappedVariationSKUValues.get(productVariationSKU);
|
|
3382
3615
|
if (!variationIDs) {
|
|
3383
3616
|
console.warn("ConfiguratorState.setVariationSKU() - Variation SKU of " + productVariationSKU + " is not defined in any variations");
|
|
3384
3617
|
return;
|
|
3385
3618
|
}
|
|
3386
3619
|
variationIDs.forEach(function (variationID) {
|
|
3387
|
-
|
|
3620
|
+
_this28.setVariationID(variationID);
|
|
3388
3621
|
});
|
|
3389
3622
|
}
|
|
3390
3623
|
/**
|
|
@@ -3701,8 +3934,8 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
3701
3934
|
*/
|
|
3702
3935
|
}, {
|
|
3703
3936
|
key: "decodeState",
|
|
3704
|
-
value: function
|
|
3705
|
-
|
|
3937
|
+
value: (function () {
|
|
3938
|
+
var _decodeState = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee29() {
|
|
3706
3939
|
var sceneID,
|
|
3707
3940
|
state,
|
|
3708
3941
|
configState,
|
|
@@ -3740,18 +3973,23 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
3740
3973
|
return _context29.stop();
|
|
3741
3974
|
}
|
|
3742
3975
|
}, _callee29);
|
|
3743
|
-
}))
|
|
3744
|
-
|
|
3976
|
+
}));
|
|
3977
|
+
function decodeState() {
|
|
3978
|
+
return _decodeState.apply(this, arguments);
|
|
3979
|
+
}
|
|
3980
|
+
return decodeState;
|
|
3981
|
+
}()
|
|
3745
3982
|
/**
|
|
3746
3983
|
* Generates a new ConfiguratorState instance from all SceneProducts and default
|
|
3747
3984
|
* variations from the provided Scene ID
|
|
3748
3985
|
* @param sceneID - the Scene ID to generate
|
|
3749
3986
|
* @returns - Promise that resolves into a ConfiguratorState instance
|
|
3750
3987
|
*/
|
|
3988
|
+
)
|
|
3751
3989
|
}, {
|
|
3752
3990
|
key: "decodeScene",
|
|
3753
|
-
value: function
|
|
3754
|
-
|
|
3991
|
+
value: (function () {
|
|
3992
|
+
var _decodeScene = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee30() {
|
|
3755
3993
|
var sceneID,
|
|
3756
3994
|
configState,
|
|
3757
3995
|
fscene,
|
|
@@ -3833,8 +4071,12 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
3833
4071
|
return _context30.stop();
|
|
3834
4072
|
}
|
|
3835
4073
|
}, _callee30);
|
|
3836
|
-
}))
|
|
3837
|
-
|
|
4074
|
+
}));
|
|
4075
|
+
function decodeScene() {
|
|
4076
|
+
return _decodeScene.apply(this, arguments);
|
|
4077
|
+
}
|
|
4078
|
+
return decodeScene;
|
|
4079
|
+
}())
|
|
3838
4080
|
}]);
|
|
3839
4081
|
return ConfiguratorState;
|
|
3840
4082
|
}();
|
|
@@ -3956,7 +4198,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
3956
4198
|
Object.defineProperty(exports, "__esModule", {
|
|
3957
4199
|
value: true
|
|
3958
4200
|
});
|
|
3959
|
-
exports["default"] = "1.
|
|
4201
|
+
exports["default"] = "1.163.1";
|
|
3960
4202
|
}, {}],
|
|
3961
4203
|
17: [function (require, module, exports) {
|
|
3962
4204
|
"use strict";
|
|
@@ -3964,36 +4206,38 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
3964
4206
|
Object.defineProperty(exports, "__esModule", {
|
|
3965
4207
|
value: true
|
|
3966
4208
|
});
|
|
3967
|
-
|
|
3968
|
-
|
|
3969
|
-
|
|
3970
|
-
|
|
3971
|
-
|
|
3972
|
-
|
|
4209
|
+
exports.ARViewer = void 0;
|
|
4210
|
+
var ARViewer = /*#__PURE__*/function () {
|
|
4211
|
+
function ARViewer() {
|
|
4212
|
+
_classCallCheck(this, ARViewer);
|
|
4213
|
+
this.modelUrl = null;
|
|
4214
|
+
this.banner = null;
|
|
4215
|
+
}
|
|
4216
|
+
_createClass(ARViewer, [{
|
|
4217
|
+
key: "composedActionURL",
|
|
4218
|
+
get: function get() {
|
|
4219
|
+
var link = new URL(location.href);
|
|
4220
|
+
link.searchParams.set("plattar_ar_action", "true");
|
|
4221
|
+
return encodeURI(link.href);
|
|
4222
|
+
}
|
|
4223
|
+
}]);
|
|
4224
|
+
return ARViewer;
|
|
4225
|
+
}();
|
|
4226
|
+
exports.ARViewer = ARViewer;
|
|
3973
4227
|
}, {}],
|
|
3974
4228
|
18: [function (require, module, exports) {
|
|
3975
4229
|
"use strict";
|
|
3976
4230
|
|
|
3977
|
-
var __importDefault = this && this.__importDefault || function (mod) {
|
|
3978
|
-
return mod && mod.__esModule ? mod : {
|
|
3979
|
-
"default": mod
|
|
3980
|
-
};
|
|
3981
|
-
};
|
|
3982
4231
|
Object.defineProperty(exports, "__esModule", {
|
|
3983
4232
|
value: true
|
|
3984
4233
|
});
|
|
3985
|
-
var ar_viewer_1 =
|
|
3986
|
-
var QuicklookViewer = /*#__PURE__*/function (_ar_viewer_1$
|
|
3987
|
-
_inherits(QuicklookViewer, _ar_viewer_1$
|
|
4234
|
+
var ar_viewer_1 = require("./ar-viewer");
|
|
4235
|
+
var QuicklookViewer = /*#__PURE__*/function (_ar_viewer_1$ARViewer) {
|
|
4236
|
+
_inherits(QuicklookViewer, _ar_viewer_1$ARViewer);
|
|
3988
4237
|
var _super11 = _createSuper(QuicklookViewer);
|
|
3989
4238
|
function QuicklookViewer() {
|
|
3990
|
-
var _this28;
|
|
3991
4239
|
_classCallCheck(this, QuicklookViewer);
|
|
3992
|
-
|
|
3993
|
-
_this28.araction = null;
|
|
3994
|
-
_this28.titleHTML = "&checkoutTitle=" + document.title + "&checkoutSubtitle=" + document.title;
|
|
3995
|
-
_this28.arcallback = function () {};
|
|
3996
|
-
return _this28;
|
|
4240
|
+
return _super11.call(this);
|
|
3997
4241
|
}
|
|
3998
4242
|
_createClass(QuicklookViewer, [{
|
|
3999
4243
|
key: "nodeType",
|
|
@@ -4015,29 +4259,26 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
4015
4259
|
var anchor = document.createElement("a");
|
|
4016
4260
|
anchor.setAttribute("rel", "ar");
|
|
4017
4261
|
anchor.appendChild(document.createElement("img"));
|
|
4262
|
+
var banner = this.banner;
|
|
4018
4263
|
var url = this.modelUrl;
|
|
4019
|
-
|
|
4020
|
-
|
|
4264
|
+
if (banner) {
|
|
4265
|
+
url += "#callToAction=".concat(banner.button);
|
|
4266
|
+
url += "&checkoutTitle=".concat(banner.title);
|
|
4267
|
+
url += "&checkoutSubtitle=".concat(banner.subtitle);
|
|
4021
4268
|
var handleQuicklook = function handleQuicklook(event) {
|
|
4022
4269
|
if (event.data === "_apple_ar_quicklook_button_tapped") {
|
|
4023
|
-
_this29.
|
|
4270
|
+
window.location.assign(_this29.composedActionURL);
|
|
4024
4271
|
}
|
|
4025
|
-
document.body.removeChild(anchor);
|
|
4026
|
-
anchor.removeEventListener("message", handleQuicklook, false);
|
|
4027
4272
|
};
|
|
4028
4273
|
anchor.addEventListener("message", handleQuicklook, false);
|
|
4029
|
-
document.body.appendChild(anchor);
|
|
4030
|
-
url += "#callToAction=" + araction;
|
|
4031
|
-
if (this.titleHTML) {
|
|
4032
|
-
url += this.titleHTML;
|
|
4033
|
-
}
|
|
4034
4274
|
}
|
|
4275
|
+
document.body.appendChild(anchor);
|
|
4035
4276
|
anchor.setAttribute("href", encodeURI(url));
|
|
4036
4277
|
anchor.click();
|
|
4037
4278
|
}
|
|
4038
4279
|
}]);
|
|
4039
4280
|
return QuicklookViewer;
|
|
4040
|
-
}(ar_viewer_1
|
|
4281
|
+
}(ar_viewer_1.ARViewer);
|
|
4041
4282
|
exports["default"] = QuicklookViewer;
|
|
4042
4283
|
}, {
|
|
4043
4284
|
"./ar-viewer": 17
|
|
@@ -4045,17 +4286,12 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
4045
4286
|
19: [function (require, module, exports) {
|
|
4046
4287
|
"use strict";
|
|
4047
4288
|
|
|
4048
|
-
var __importDefault = this && this.__importDefault || function (mod) {
|
|
4049
|
-
return mod && mod.__esModule ? mod : {
|
|
4050
|
-
"default": mod
|
|
4051
|
-
};
|
|
4052
|
-
};
|
|
4053
4289
|
Object.defineProperty(exports, "__esModule", {
|
|
4054
4290
|
value: true
|
|
4055
4291
|
});
|
|
4056
|
-
var ar_viewer_1 =
|
|
4057
|
-
var RealityViewer = /*#__PURE__*/function (_ar_viewer_1$
|
|
4058
|
-
_inherits(RealityViewer, _ar_viewer_1$
|
|
4292
|
+
var ar_viewer_1 = require("./ar-viewer");
|
|
4293
|
+
var RealityViewer = /*#__PURE__*/function (_ar_viewer_1$ARViewer2) {
|
|
4294
|
+
_inherits(RealityViewer, _ar_viewer_1$ARViewer2);
|
|
4059
4295
|
var _super12 = _createSuper(RealityViewer);
|
|
4060
4296
|
function RealityViewer() {
|
|
4061
4297
|
_classCallCheck(this, RealityViewer);
|
|
@@ -4085,7 +4321,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
4085
4321
|
}
|
|
4086
4322
|
}]);
|
|
4087
4323
|
return RealityViewer;
|
|
4088
|
-
}(ar_viewer_1
|
|
4324
|
+
}(ar_viewer_1.ARViewer);
|
|
4089
4325
|
exports["default"] = RealityViewer;
|
|
4090
4326
|
}, {
|
|
4091
4327
|
"./ar-viewer": 17
|
|
@@ -4093,25 +4329,18 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
4093
4329
|
20: [function (require, module, exports) {
|
|
4094
4330
|
"use strict";
|
|
4095
4331
|
|
|
4096
|
-
var __importDefault = this && this.__importDefault || function (mod) {
|
|
4097
|
-
return mod && mod.__esModule ? mod : {
|
|
4098
|
-
"default": mod
|
|
4099
|
-
};
|
|
4100
|
-
};
|
|
4101
4332
|
Object.defineProperty(exports, "__esModule", {
|
|
4102
4333
|
value: true
|
|
4103
4334
|
});
|
|
4104
|
-
var ar_viewer_1 =
|
|
4105
|
-
var SceneViewer = /*#__PURE__*/function (_ar_viewer_1$
|
|
4106
|
-
_inherits(SceneViewer, _ar_viewer_1$
|
|
4335
|
+
var ar_viewer_1 = require("./ar-viewer");
|
|
4336
|
+
var SceneViewer = /*#__PURE__*/function (_ar_viewer_1$ARViewer3) {
|
|
4337
|
+
_inherits(SceneViewer, _ar_viewer_1$ARViewer3);
|
|
4107
4338
|
var _super13 = _createSuper(SceneViewer);
|
|
4108
4339
|
function SceneViewer() {
|
|
4109
4340
|
var _this30;
|
|
4110
4341
|
_classCallCheck(this, SceneViewer);
|
|
4111
4342
|
_this30 = _super13.call(this);
|
|
4112
|
-
_this30.araction = null;
|
|
4113
4343
|
_this30.isVertical = false;
|
|
4114
|
-
_this30.titleHTML = "<b>" + document.title;
|
|
4115
4344
|
_this30.isVertical = false;
|
|
4116
4345
|
return _this30;
|
|
4117
4346
|
}
|
|
@@ -4131,34 +4360,25 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
4131
4360
|
if (!this.modelUrl) {
|
|
4132
4361
|
throw new Error("SceneViewer.start() - model url not set, use SceneViewer.modelUrl");
|
|
4133
4362
|
}
|
|
4134
|
-
var
|
|
4135
|
-
var
|
|
4136
|
-
|
|
4137
|
-
|
|
4138
|
-
|
|
4139
|
-
|
|
4140
|
-
}
|
|
4141
|
-
if (!composedLink) {
|
|
4142
|
-
throw new Error("SceneViewer.start() - failed to create composition link, check parameters");
|
|
4143
|
-
}
|
|
4144
|
-
var linkOverride = encodeURIComponent(location.href + '#no-ar-fallback');
|
|
4145
|
-
var intent = 'intent://arvr.google.com/scene-viewer/1.1';
|
|
4146
|
-
intent += '?file=' + this.modelUrl;
|
|
4147
|
-
intent += '&mode=ar_preferred';
|
|
4148
|
-
intent += '&link=' + composedLink;
|
|
4149
|
-
intent += '&title=<b>' + this.titleHTML;
|
|
4363
|
+
var linkOverride = encodeURIComponent("".concat(location.href, "#no-ar-fallback"));
|
|
4364
|
+
var intent = "intent://arvr.google.com/scene-viewer/1.1?file=".concat(this.modelUrl, "&mode=ar_preferred");
|
|
4365
|
+
var banner = this.banner;
|
|
4366
|
+
if (banner) {
|
|
4367
|
+
intent += "&title=<b>".concat(banner.title, "</b><br>").concat(banner.subtitle);
|
|
4368
|
+
intent += "&link=".concat(this.composedActionURL);
|
|
4369
|
+
}
|
|
4150
4370
|
if (this.isVertical) {
|
|
4151
4371
|
intent += '&enable_vertical_placement=true';
|
|
4152
4372
|
}
|
|
4153
4373
|
intent += ' #Intent;scheme=https;package=com.google.ar.core;action=android.intent.action.VIEW;';
|
|
4154
|
-
intent +=
|
|
4374
|
+
intent += "S.browser_fallback_url=".concat(linkOverride, ";end;");
|
|
4155
4375
|
var anchor = document.createElement("a");
|
|
4156
4376
|
anchor.setAttribute("href", intent);
|
|
4157
4377
|
anchor.click();
|
|
4158
4378
|
}
|
|
4159
4379
|
}]);
|
|
4160
4380
|
return SceneViewer;
|
|
4161
|
-
}(ar_viewer_1
|
|
4381
|
+
}(ar_viewer_1.ARViewer);
|
|
4162
4382
|
exports["default"] = SceneViewer;
|
|
4163
4383
|
}, {
|
|
4164
4384
|
"./ar-viewer": 17
|
|
@@ -6817,7 +7037,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
6817
7037
|
api_read: "https://localhost:3000/v3/",
|
|
6818
7038
|
api_write: "https://localhost:3000/v3/",
|
|
6819
7039
|
cdn: "https://cdn-dev.plattar.space/",
|
|
6820
|
-
cdn_image: "https://images-dev.plattar.space/
|
|
7040
|
+
cdn_image: "https://images-dev.plattar.space/",
|
|
6821
7041
|
analytics: "https://localhost:3000/api/v2/analytics/",
|
|
6822
7042
|
type: "dev"
|
|
6823
7043
|
};
|
|
@@ -8808,7 +9028,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
8808
9028
|
"../types/trigger/trigger-image.js": 105
|
|
8809
9029
|
}],
|
|
8810
9030
|
107: [function (require, module, exports) {
|
|
8811
|
-
module.exports = "1.
|
|
9031
|
+
module.exports = "1.159.1";
|
|
8812
9032
|
}, {}],
|
|
8813
9033
|
108: [function (require, module, exports) {
|
|
8814
9034
|
var QRCodeStyling = require("qr-code-styling");
|
|
@@ -9013,7 +9233,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
9013
9233
|
this._qrCode = new QRCodeStyling(this._options);
|
|
9014
9234
|
this._qrCode.append(div);
|
|
9015
9235
|
this._UpdateCanvas(width, height);
|
|
9016
|
-
div.style.display = "
|
|
9236
|
+
div.style.display = "flex";
|
|
9017
9237
|
return;
|
|
9018
9238
|
}
|
|
9019
9239
|
var newHash = hash({
|
|
@@ -9113,7 +9333,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
9113
9333
|
"./version": 111
|
|
9114
9334
|
}],
|
|
9115
9335
|
111: [function (require, module, exports) {
|
|
9116
|
-
module.exports = "1.
|
|
9336
|
+
module.exports = "1.160.1";
|
|
9117
9337
|
}, {}],
|
|
9118
9338
|
112: [function (require, module, exports) {
|
|
9119
9339
|
"use strict";
|