@perceptimagery/dita-configurator-staging 0.1.7302 → 0.1.7400
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 +23 -6
- 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$1 = "0.1.
|
|
114
|
+
const version$1 = "0.1.7400";
|
|
115
115
|
function modifyLensArr(arr, element) {
|
|
116
116
|
const index = arr.findIndex((e) => e["sku"] === element["sku"]);
|
|
117
117
|
if (index !== -1) {
|
|
@@ -41462,8 +41462,9 @@ bool bvhIntersectFirstHit(
|
|
|
41462
41462
|
}
|
|
41463
41463
|
async intialize() {
|
|
41464
41464
|
var _a;
|
|
41465
|
-
const
|
|
41466
|
-
const
|
|
41465
|
+
const canvas = document.querySelector("canvas.sprie-config-webgl");
|
|
41466
|
+
const newWidth = canvas.clientWidth;
|
|
41467
|
+
const newHeight = canvas.clientHeight;
|
|
41467
41468
|
this.camera = new PerspectiveCamera(
|
|
41468
41469
|
12,
|
|
41469
41470
|
newWidth / newHeight,
|
|
@@ -41477,8 +41478,7 @@ bool bvhIntersectFirstHit(
|
|
|
41477
41478
|
alpha: true,
|
|
41478
41479
|
antialias: true
|
|
41479
41480
|
});
|
|
41480
|
-
this.
|
|
41481
|
-
this.renderer.setPixelRatio(Math.min(window.devicePixelRatio, 2));
|
|
41481
|
+
this.resizeRenderer();
|
|
41482
41482
|
const rgbeLoader = new RGBELoader();
|
|
41483
41483
|
rgbeLoader.load(
|
|
41484
41484
|
"https://sprie-jarvis-public.s3.eu-west-2.amazonaws.com/environment_desaturated.hdr",
|
|
@@ -41516,6 +41516,17 @@ bool bvhIntersectFirstHit(
|
|
|
41516
41516
|
temp5.FAST_CHROMA = "";
|
|
41517
41517
|
diamondMaterial.defines = temp5;
|
|
41518
41518
|
}
|
|
41519
|
+
resizeRenderer() {
|
|
41520
|
+
var _a;
|
|
41521
|
+
const pixelRatio = Math.min(window.devicePixelRatio, 2);
|
|
41522
|
+
const resoWidth = Math.floor(this.canvas.clientWidth * pixelRatio);
|
|
41523
|
+
const resoHeight = Math.floor(this.canvas.clientHeight * pixelRatio);
|
|
41524
|
+
const needResize = this.canvas.width !== resoWidth || this.canvas.height !== resoHeight;
|
|
41525
|
+
if (needResize) {
|
|
41526
|
+
(_a = this.renderer) == null ? void 0 : _a.setSize(resoWidth, resoHeight, false);
|
|
41527
|
+
}
|
|
41528
|
+
return needResize;
|
|
41529
|
+
}
|
|
41519
41530
|
cleanUp() {
|
|
41520
41531
|
if (this.renderer) {
|
|
41521
41532
|
this.renderer.dispose();
|
|
@@ -41961,6 +41972,7 @@ bool bvhIntersectFirstHit(
|
|
|
41961
41972
|
-0.2564218846390263
|
|
41962
41973
|
);
|
|
41963
41974
|
const rendererSize = this.renderer.getSize(new Vector2());
|
|
41975
|
+
console.log(rendererSize);
|
|
41964
41976
|
if (rendererSize.x > rendererSize.y) {
|
|
41965
41977
|
this.camera.position.set(
|
|
41966
41978
|
2.2,
|
|
@@ -41977,7 +41989,7 @@ bool bvhIntersectFirstHit(
|
|
|
41977
41989
|
12
|
|
41978
41990
|
);
|
|
41979
41991
|
controls.minDistance = 3;
|
|
41980
|
-
controls.maxDistance =
|
|
41992
|
+
controls.maxDistance = 14;
|
|
41981
41993
|
controls.rotateSpeed = 0.8;
|
|
41982
41994
|
}
|
|
41983
41995
|
controls.enableDamping = true;
|
|
@@ -42089,7 +42101,12 @@ bool bvhIntersectFirstHit(
|
|
|
42089
42101
|
composer.addPass(renderPass);
|
|
42090
42102
|
composer.addPass(outputPass);
|
|
42091
42103
|
const animate = () => {
|
|
42104
|
+
var _a;
|
|
42092
42105
|
controls.update();
|
|
42106
|
+
if (this.resizeRenderer()) {
|
|
42107
|
+
this.camera.aspect = this.canvas.clientWidth / this.canvas.clientHeight;
|
|
42108
|
+
(_a = this.camera) == null ? void 0 : _a.updateProjectionMatrix();
|
|
42109
|
+
}
|
|
42093
42110
|
const initialBackground = this.scene.background;
|
|
42094
42111
|
this.scene.background = null;
|
|
42095
42112
|
this.scene.overrideMaterial = depthMaterial;
|