@inweb/viewer-three 26.8.0 → 26.8.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.
- package/dist/plugins/loaders/IFCXLoader.js +1827 -881
- package/dist/plugins/loaders/IFCXLoader.js.map +1 -1
- package/dist/plugins/loaders/IFCXLoader.min.js +1 -1
- package/dist/plugins/loaders/IFCXLoader.module.js +477 -154
- package/dist/plugins/loaders/IFCXLoader.module.js.map +1 -1
- package/dist/viewer-three.js +8 -3
- package/dist/viewer-three.js.map +1 -1
- package/dist/viewer-three.min.js +1 -1
- package/dist/viewer-three.module.js +4 -3
- package/dist/viewer-three.module.js.map +1 -1
- package/package.json +5 -5
- package/plugins/loaders/IFCX/IFCXLoader.ts +4 -7
- package/plugins/loaders/IFCX/render.js +686 -181
- package/plugins/loaders/IFCXCloudLoader.ts +1 -1
- package/src/Viewer/components/LightComponent.ts +9 -3
|
@@ -1911,11 +1911,12 @@ class LightComponent {
|
|
|
1911
1911
|
if (this.viewer.extents.isEmpty()) return;
|
|
1912
1912
|
const extentsCenter = this.viewer.extents.getCenter(new Vector3);
|
|
1913
1913
|
const extentsSize = this.viewer.extents.getBoundingSphere(new Sphere).radius;
|
|
1914
|
-
this.
|
|
1914
|
+
const front = (new Vector3).copy(this.viewer.camera.up).cross(new Vector3(1, 0, 0)).negate();
|
|
1915
|
+
this.directionalLight.position.copy(this.viewer.camera.up).applyAxisAngle(front, -Math.PI * 30 / 180).multiplyScalar(extentsSize * 2).add(extentsCenter);
|
|
1915
1916
|
this.directionalLight.target.position.copy(extentsCenter);
|
|
1916
|
-
this.frontLight.position.
|
|
1917
|
+
this.frontLight.position.copy(front).multiplyScalar(extentsSize * 2).add(extentsCenter);
|
|
1917
1918
|
this.frontLight.target.position.copy(extentsCenter);
|
|
1918
|
-
this.hemisphereLight.position.
|
|
1919
|
+
this.hemisphereLight.position.copy(front).multiplyScalar(extentsSize * 3).add(extentsCenter);
|
|
1919
1920
|
this.viewer.scene.add(this.ambientLight);
|
|
1920
1921
|
this.viewer.scene.add(this.directionalLight);
|
|
1921
1922
|
this.viewer.scene.add(this.frontLight);
|