@plattar/plattar-ar-adapter 1.130.1 → 1.130.2

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.
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ViewerController = void 0;
4
4
  const plattar_api_1 = require("@plattar/plattar-api");
5
5
  const product_ar_1 = require("../../ar/product-ar");
6
+ const scene_ar_1 = require("../../ar/scene-ar");
6
7
  const scene_product_ar_1 = require("../../ar/scene-product-ar");
7
- const configurator_state_1 = require("../../util/configurator-state");
8
8
  const util_1 = require("../../util/util");
9
9
  const plattar_controller_1 = require("./plattar-controller");
10
10
  /**
@@ -142,16 +142,11 @@ class ViewerController extends plattar_controller_1.PlattarController {
142
142
  return product.init().then(accept).catch(reject);
143
143
  }
144
144
  const sceneID = this.getAttribute("scene-id");
145
- // use the first default product-variation id if available
145
+ // fallback to using default SceneAR implementation
146
146
  if (sceneID) {
147
- return configurator_state_1.ConfiguratorState.decodeScene(sceneID).then((state) => {
148
- const first = state.first();
149
- if (first) {
150
- const sceneProductAR = new scene_product_ar_1.SceneProductAR(first.scene_product_id, first.product_variation_id);
151
- return sceneProductAR.init().then(accept).catch(reject);
152
- }
153
- return reject(new Error("ViewerController.initAR() - your scene does not contain any valid products"));
154
- }).catch(reject);
147
+ const sceneAR = new scene_ar_1.SceneAR(sceneID);
148
+ sceneAR.init().then(accept).catch(reject);
149
+ return;
155
150
  }
156
151
  return reject(new Error("ViewerController.initAR() - minimum required attributes not set, use scene-id as a minimum"));
157
152
  });
package/dist/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- declare const _default: "1.130.1";
1
+ declare const _default: "1.130.2";
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.130.1";
3
+ exports.default = "1.130.2";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plattar/plattar-ar-adapter",
3
- "version": "1.130.1",
3
+ "version": "1.130.2",
4
4
  "description": "Plattar AR Adapter for interfacing with Google & Apple WebAR",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",