@perceptimagery/dita-configurator-staging 0.2.1301 → 0.2.1304
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/dist/index.js +15 -17
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -18,7 +18,6 @@ var __publicField = (obj, key, value) => {
|
|
|
18
18
|
return value;
|
|
19
19
|
};
|
|
20
20
|
(function() {
|
|
21
|
-
var _a, _b;
|
|
22
21
|
"use strict";
|
|
23
22
|
class FetcherServiceFactory {
|
|
24
23
|
constructor(config2) {
|
|
@@ -112,7 +111,7 @@ var __publicField = (obj, key, value) => {
|
|
|
112
111
|
host: "https://api.sprie.io"
|
|
113
112
|
};
|
|
114
113
|
const config$1 = Object.freeze(Config$2);
|
|
115
|
-
const version$1 = "0.2.
|
|
114
|
+
const version$1 = "0.2.1304";
|
|
116
115
|
function modifyLensArr$1(arr, element) {
|
|
117
116
|
const index = arr.findIndex((e) => e["sku"] === element["sku"]);
|
|
118
117
|
if (index !== -1) {
|
|
@@ -226,7 +225,7 @@ var __publicField = (obj, key, value) => {
|
|
|
226
225
|
if (desktopContainer && desktopContainer.hasAttribute("open")) {
|
|
227
226
|
desktopContainer.removeAttribute("open");
|
|
228
227
|
}
|
|
229
|
-
const mobileContainer = document.querySelector(".popover.hidden-lap-and-up.popover
|
|
228
|
+
const mobileContainer = document.querySelector(".popover.hidden-lap-and-up.popover-full");
|
|
230
229
|
if (mobileContainer && mobileContainer.hasAttribute("open")) {
|
|
231
230
|
mobileContainer.removeAttribute("open");
|
|
232
231
|
}
|
|
@@ -42918,18 +42917,18 @@ bool bvhIntersectFirstHit(
|
|
|
42918
42917
|
this.isInitialised = true;
|
|
42919
42918
|
}
|
|
42920
42919
|
resizeRenderer() {
|
|
42921
|
-
var
|
|
42920
|
+
var _a;
|
|
42922
42921
|
const pixelRatio = Math.min(window.devicePixelRatio, 2);
|
|
42923
42922
|
const resoWidth = Math.floor(this.canvas.clientWidth * pixelRatio);
|
|
42924
42923
|
const resoHeight = Math.floor(this.canvas.clientHeight * pixelRatio);
|
|
42925
42924
|
const needResize = this.canvas.width !== resoWidth || this.canvas.height !== resoHeight;
|
|
42926
42925
|
if (needResize) {
|
|
42927
|
-
(
|
|
42926
|
+
(_a = this.renderer) == null ? void 0 : _a.setSize(resoWidth, resoHeight, false);
|
|
42928
42927
|
}
|
|
42929
42928
|
return needResize;
|
|
42930
42929
|
}
|
|
42931
42930
|
initGemstoneDependencies() {
|
|
42932
|
-
var
|
|
42931
|
+
var _a;
|
|
42933
42932
|
rgbeLoader.load(
|
|
42934
42933
|
"https://sprie-jarvis-public.s3.eu-west-2.amazonaws.com/environment_gemstones.hdr",
|
|
42935
42934
|
(reflectionMap) => {
|
|
@@ -42944,7 +42943,7 @@ bool bvhIntersectFirstHit(
|
|
|
42944
42943
|
gemstoneMaterial.uniforms.resolution.value = this.canvasSize;
|
|
42945
42944
|
const temp5 = {};
|
|
42946
42945
|
const isCubeMap = isCubeTexture(envMap);
|
|
42947
|
-
const w2 = (isCubeMap ? (
|
|
42946
|
+
const w2 = (isCubeMap ? (_a = envMap == null ? void 0 : envMap.image[0]) == null ? void 0 : _a.width : envMap == null ? void 0 : envMap.image.width) ?? 1024;
|
|
42948
42947
|
const cubeSize = w2 / 4;
|
|
42949
42948
|
const _lodMax = Math.floor(Math.log2(cubeSize));
|
|
42950
42949
|
const _cubeSize = Math.pow(2, _lodMax);
|
|
@@ -43255,8 +43254,9 @@ bool bvhIntersectFirstHit(
|
|
|
43255
43254
|
-0.13425621157020154,
|
|
43256
43255
|
-0.2564218846390263
|
|
43257
43256
|
);
|
|
43258
|
-
|
|
43259
|
-
|
|
43257
|
+
this.renderer.getSize(new Vector2());
|
|
43258
|
+
const isMobile = /iPhone|iPad|iPod|Android/i.test(navigator.userAgent);
|
|
43259
|
+
if (!isMobile) {
|
|
43260
43260
|
this.camera.position.set(
|
|
43261
43261
|
2.2,
|
|
43262
43262
|
2.2,
|
|
@@ -43384,11 +43384,11 @@ bool bvhIntersectFirstHit(
|
|
|
43384
43384
|
composer.addPass(renderPass);
|
|
43385
43385
|
composer.addPass(outputPass);
|
|
43386
43386
|
const animate = () => {
|
|
43387
|
-
var
|
|
43387
|
+
var _a;
|
|
43388
43388
|
controls.update();
|
|
43389
43389
|
if (this.resizeRenderer()) {
|
|
43390
43390
|
this.camera.aspect = this.canvas.clientWidth / this.canvas.clientHeight;
|
|
43391
|
-
(
|
|
43391
|
+
(_a = this.camera) == null ? void 0 : _a.updateProjectionMatrix();
|
|
43392
43392
|
}
|
|
43393
43393
|
const initialBackground = this.scene.background;
|
|
43394
43394
|
this.scene.background = null;
|
|
@@ -43435,7 +43435,6 @@ bool bvhIntersectFirstHit(
|
|
|
43435
43435
|
}
|
|
43436
43436
|
async Init() {
|
|
43437
43437
|
if (!this.customRenderer.isInitialised) {
|
|
43438
|
-
console.log("Intializing custom rendereer");
|
|
43439
43438
|
await this.customRenderer.intialize();
|
|
43440
43439
|
this.customRenderer.setupAndRenderScene();
|
|
43441
43440
|
}
|
|
@@ -43560,9 +43559,9 @@ bool bvhIntersectFirstHit(
|
|
|
43560
43559
|
const orgName = (settings == null ? void 0 : settings.orgName) || "";
|
|
43561
43560
|
reactExports.useEffect(() => {
|
|
43562
43561
|
(async () => {
|
|
43563
|
-
var
|
|
43562
|
+
var _a;
|
|
43564
43563
|
configurator.current = new ThreeDConfigurator();
|
|
43565
|
-
await ((
|
|
43564
|
+
await ((_a = configurator.current) == null ? void 0 : _a.Init(apiService2.apiKey));
|
|
43566
43565
|
const apiRes = await apiService2.FetchAssetBySKUOrBarcode({
|
|
43567
43566
|
sku,
|
|
43568
43567
|
barcode: null
|
|
@@ -51258,8 +51257,8 @@ bool bvhIntersectFirstHit(
|
|
|
51258
51257
|
});
|
|
51259
51258
|
let CustomEventEmitter = _CustomEventEmitter2;
|
|
51260
51259
|
const ShopifyConfig = {
|
|
51261
|
-
getCartUrl:
|
|
51262
|
-
addToCartUrl:
|
|
51260
|
+
getCartUrl: window.Shopify.routes.root + "/cart.js",
|
|
51261
|
+
addToCartUrl: window.Shopify.routes.root + "/cart/add.js"
|
|
51263
51262
|
};
|
|
51264
51263
|
const configShopify = Object.freeze(ShopifyConfig);
|
|
51265
51264
|
class ShopifyServiceFactory {
|
|
@@ -51295,7 +51294,6 @@ bool bvhIntersectFirstHit(
|
|
|
51295
51294
|
* @returns
|
|
51296
51295
|
*/
|
|
51297
51296
|
async Post(data) {
|
|
51298
|
-
console.log(this.config.addToCartUrl);
|
|
51299
51297
|
const response = await fetch(this.config.addToCartUrl, this.RequestOptions("POST", data || {}));
|
|
51300
51298
|
const result = response.json();
|
|
51301
51299
|
return result;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@perceptimagery/dita-configurator-staging",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1304",
|
|
4
4
|
"author": "Rohan Satpute <rohan@perceptimagery.com>",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"preview": "vite preview"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@perceptimagery/3d-configurator": "^1.2.
|
|
18
|
+
"@perceptimagery/3d-configurator": "^1.2.1",
|
|
19
19
|
"@perceptimagery/sprie-asset-auth": "^1.2.1016",
|
|
20
20
|
"dat.gui": "^0.7.9",
|
|
21
21
|
"events": "^3.3.0",
|