@inweb/viewer-three 26.7.1 → 26.7.6
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/viewer-three.js +21 -18
- package/dist/viewer-three.js.map +1 -1
- package/dist/viewer-three.min.js +1 -1
- package/dist/viewer-three.module.js +5 -2
- package/dist/viewer-three.module.js.map +1 -1
- package/package.json +5 -5
- package/src/Viewer/Viewer.ts +6 -1
- package/src/Viewer/components/CameraComponent.ts +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inweb/viewer-three",
|
|
3
|
-
"version": "26.7.
|
|
3
|
+
"version": "26.7.6",
|
|
4
4
|
"description": "JavaScript library for rendering CAD and BIM files in a browser using Three.js",
|
|
5
5
|
"homepage": "https://cloud.opendesign.com/docs/index.html",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|
|
@@ -35,10 +35,10 @@
|
|
|
35
35
|
"docs": "typedoc"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@inweb/client": "~26.7.
|
|
39
|
-
"@inweb/eventemitter2": "~26.7.
|
|
40
|
-
"@inweb/markup": "~26.7.
|
|
41
|
-
"@inweb/viewer-core": "~26.7.
|
|
38
|
+
"@inweb/client": "~26.7.6",
|
|
39
|
+
"@inweb/eventemitter2": "~26.7.6",
|
|
40
|
+
"@inweb/markup": "~26.7.6",
|
|
41
|
+
"@inweb/viewer-core": "~26.7.6"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@types/three": "^0.173.0",
|
package/src/Viewer/Viewer.ts
CHANGED
|
@@ -154,14 +154,19 @@ export class Viewer
|
|
|
154
154
|
|
|
155
155
|
this.scene = new Scene();
|
|
156
156
|
this.helpers = new Scene();
|
|
157
|
+
this.target = new Vector3();
|
|
157
158
|
|
|
158
159
|
const pixelRatio = window.devicePixelRatio;
|
|
159
160
|
const rect = canvas.parentElement.getBoundingClientRect();
|
|
160
161
|
const width = rect.width || 1;
|
|
161
162
|
const height = rect.height || 1;
|
|
162
163
|
const aspect = width / height;
|
|
164
|
+
|
|
163
165
|
this.camera = new PerspectiveCamera(45, aspect, 0.01, 1000);
|
|
164
|
-
this.camera.up.set(0,
|
|
166
|
+
this.camera.up.set(0, 1, 0);
|
|
167
|
+
this.camera.position.set(0, 0, 1);
|
|
168
|
+
this.camera.lookAt(this.target);
|
|
169
|
+
this.camera.updateProjectionMatrix();
|
|
165
170
|
|
|
166
171
|
this.renderer = new WebGLRenderer({
|
|
167
172
|
canvas,
|