@plattar/plattar-ar-adapter 1.117.2 → 1.119.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.
@@ -28,4 +28,7 @@ export declare class ProductAR extends LauncherAR {
28
28
  * Launches the internal AR instance using an appropriate version of AR Viewers
29
29
  */
30
30
  start(): void;
31
+ canQuicklook(): boolean;
32
+ canRealityViewer(): boolean;
33
+ canSceneViewer(): boolean;
31
34
  }
@@ -161,5 +161,14 @@ class ProductAR extends launcher_ar_1.LauncherAR {
161
161
  // this was initialised via the init() function
162
162
  this._ar.start();
163
163
  }
164
+ canQuicklook() {
165
+ return this._ar && this._ar.nodeType === "Quick Look" ? true : false;
166
+ }
167
+ canRealityViewer() {
168
+ return this._ar && this._ar.nodeType === "Reality Viewer" ? true : false;
169
+ }
170
+ canSceneViewer() {
171
+ return this._ar && this._ar.nodeType === "Scene Viewer" ? true : false;
172
+ }
164
173
  }
165
174
  exports.ProductAR = ProductAR;
@@ -144,6 +144,7 @@ class PlattarEmbed extends HTMLElement {
144
144
  }
145
145
  const opt = options || {
146
146
  color: "#101721",
147
+ qrType: "default",
147
148
  margin: 0
148
149
  };
149
150
  if (this._viewer) {
@@ -161,6 +162,9 @@ class PlattarEmbed extends HTMLElement {
161
162
  if (opt.margin) {
162
163
  viewer.setAttribute("margin", "" + opt.margin);
163
164
  }
165
+ if (opt.qrType) {
166
+ viewer.setAttribute("qr-type", opt.qrType);
167
+ }
164
168
  const dst = plattar_api_1.Server.location().base + "renderer/viewer.html?scene_id=" + this._sceneID;
165
169
  viewer.setAttribute("url", dst);
166
170
  viewer.onload = () => {
@@ -182,6 +186,9 @@ class PlattarEmbed extends HTMLElement {
182
186
  if (opt.margin) {
183
187
  viewer.setAttribute("margin", "" + opt.margin);
184
188
  }
189
+ if (opt.qrType) {
190
+ viewer.setAttribute("qr-type", opt.qrType);
191
+ }
185
192
  let dst = plattar_api_1.Server.location().base + "renderer/product.html?product_id=" + this._productID;
186
193
  if (this._variationID) {
187
194
  dst += "&variation_id=" + this._variationID;
package/dist/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- declare const _default: "1.117.2";
1
+ declare const _default: "1.119.1";
2
2
  export default _default;
package/dist/version.js CHANGED
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.default = "1.117.2";
3
+ exports.default = "1.119.1";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plattar/plattar-ar-adapter",
3
- "version": "1.117.2",
3
+ "version": "1.119.1",
4
4
  "description": "Plattar AR Adapter for interfacing with Google & Apple WebAR",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
@@ -37,17 +37,17 @@
37
37
  },
38
38
  "homepage": "https://www.plattar.com",
39
39
  "dependencies": {
40
- "@plattar/plattar-analytics": "^1.117.1",
41
- "@plattar/plattar-api": "^1.116.3",
42
- "@plattar/plattar-qrcode": "1.114.1",
43
- "@plattar/plattar-web": "^1.113.10"
40
+ "@plattar/plattar-analytics": "^1.117.2",
41
+ "@plattar/plattar-api": "^1.118.1",
42
+ "@plattar/plattar-qrcode": "1.119.1",
43
+ "@plattar/plattar-web": "^1.117.1"
44
44
  },
45
45
  "devDependencies": {
46
- "@babel/cli": "^7.15.7",
47
- "@babel/core": "^7.15.8",
48
- "@babel/preset-env": "^7.15.6",
46
+ "@babel/cli": "^7.16.0",
47
+ "@babel/core": "^7.16.0",
48
+ "@babel/preset-env": "^7.16.4",
49
49
  "browserify": "^17.0.0",
50
- "typescript": "^4.4.3",
50
+ "typescript": "^4.5.2",
51
51
  "uglify-es": "^3.3.9"
52
52
  },
53
53
  "publishConfig": {