mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-05 01:38:44 +00:00
Use 3JS size api instead of direct domElement access (avoids implicit pixel density scaling)
This commit is contained in:
1 parent
fc4eaff7f6
commit
162ef43a30
1 file changed
+5
-2
@@ -753,8 +753,11 @@ class Editor {
|
||||
}
|
||||
|
||||
// Store original renderer and camera state
|
||||
const originalWidth = this.renderer.domElement.width;
|
||||
const originalHeight = this.renderer.domElement.height;
|
||||
const sizeVector = new THREE.Vector2();
|
||||
this.renderer.getSize(sizeVector);
|
||||
|
||||
const originalWidth = sizeVector.x;
|
||||
const originalHeight = sizeVector.y;
|
||||
const originalPixelRatio = this.renderer.getPixelRatio();
|
||||
const originalCameraAspect = this.camera.aspect;
|
||||
const originalRenderCameraAspect =
|
||||
|
||||
Reference in new issue
Block a user