Skip to content

Commit 6f85c10

Browse files
authored
Merge pull request #5481 from manyfold3d/move-camera
Adjust camera parameters to match up better to new renderer
2 parents da77c62 + ba17b59 commit 6f85c10

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

app/javascript/offscreen_renderer.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export class OffscreenRenderer {
7171
this.scene = new THREE.Scene()
7272
this.scene.background = new THREE.Color(this.settings.backgroundColour ?? '#000000')
7373
this.camera = new THREE.PerspectiveCamera(
74-
45,
74+
50,
7575
this.canvas.clientWidth / this.canvas.clientHeight,
7676
0.1,
7777
100000
@@ -234,8 +234,7 @@ export class OffscreenRenderer {
234234
object.position.set(-centre.x, -bbox.min.y, -centre.z)
235235

236236
// Configure camera
237-
this.camera.position.z = this.camera.position.x = bsphere.radius * 1.63
238-
this.camera.position.y = bsphere.radius * 0.75
237+
this.camera.position.z = this.camera.position.y = this.camera.position.x = bsphere.radius * 1.6
239238
this.controls.target.set(0, modelHeight / 2, 0)
240239
this.scene.add(object)
241240
// Add the grid

0 commit comments

Comments
 (0)