@perceptimagery/dita-configurator-staging 0.1.6101 → 0.1.6200

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.
Files changed (2) hide show
  1. package/dist/index.js +24 -8
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -111,7 +111,7 @@ var __publicField = (obj, key, value) => {
111
111
  host: "https://api.sprie.io"
112
112
  };
113
113
  const config = Object.freeze(Config$1);
114
- const version = "0.1.6101";
114
+ const version = "0.1.6200";
115
115
  function modifyLensArr(arr, element) {
116
116
  const index = arr.findIndex((e) => e["sku"] === element["sku"]);
117
117
  if (index !== -1) {
@@ -37351,7 +37351,7 @@ var __publicField = (obj, key, value) => {
37351
37351
  const Modelscene = model;
37352
37352
  const rgbeLoader = new RGBELoader();
37353
37353
  rgbeLoader.load(
37354
- "https://threejs.org/examples/textures/equirectangular/royal_esplanade_1k.hdr",
37354
+ "https://sprie-jarvis-public.s3.eu-west-2.amazonaws.com/royal_esplanade_1k_desaturated.hdr",
37355
37355
  (environmentMap) => {
37356
37356
  const env = environmentMap;
37357
37357
  env.mapping = EquirectangularReflectionMapping;
@@ -38623,8 +38623,17 @@ var __publicField = (obj, key, value) => {
38623
38623
  const frameVariantId = selectedFrame.metadata.find(
38624
38624
  (item) => item.key == "variantId"
38625
38625
  );
38626
+ const baseCurve = selectedFrame.metadata.find(
38627
+ (item) => item.key == "baseCurve"
38628
+ );
38629
+ let lensVariantKey = "variantId";
38630
+ if (baseCurve.value == "2B") {
38631
+ lensVariantKey = "2bVariantId";
38632
+ } else if (baseCurve.value == "6B") {
38633
+ lensVariantKey = "6bVariantId";
38634
+ }
38626
38635
  const lensVariantId = selectedLens.metadata.find(
38627
- (item) => item.key == "variantId"
38636
+ (item) => item.key == lensVariantKey
38628
38637
  );
38629
38638
  const frameId = frameVariantId ? frameVariantId.value : null;
38630
38639
  const lensId = lensVariantId ? lensVariantId.value : null;
@@ -38633,11 +38642,18 @@ var __publicField = (obj, key, value) => {
38633
38642
  lensIdentifier: lensId
38634
38643
  };
38635
38644
  customEvent.emitEvent("onAddToCart", eventData);
38636
- if (frameId && lensId) {
38637
- window.open(
38638
- "https://dita.com/cart/" + frameId + ":1," + lensId + ":1",
38639
- "_self"
38640
- );
38645
+ if (frameId) {
38646
+ if (lensId) {
38647
+ window.open(
38648
+ "https://dita.com/cart/" + frameId + ":1," + lensId + ":1",
38649
+ "_self"
38650
+ );
38651
+ } else {
38652
+ window.open(
38653
+ "https://dita.com/cart/" + frameId + ":1",
38654
+ "_self"
38655
+ );
38656
+ }
38641
38657
  } else {
38642
38658
  console.log(
38643
38659
  "Either the selected frame or the lens has an invalid identifier."
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@perceptimagery/dita-configurator-staging",
3
- "version": "0.1.6101",
3
+ "version": "0.1.6200",
4
4
  "author": "Abhishek Deb <abhishek@perceptimagery.com>",
5
5
  "license": "UNLICENSED",
6
6
  "main": "dist/index.js",