mirror of
https://github.com/skillbert/rsmv.git
synced 2025-12-23 21:47:48 -05:00
fix item cam aspect
This commit is contained in:
@@ -430,8 +430,8 @@ export class ThreeJsRenderer extends TypedEmitter<ThreeJsRendererEvents>{
|
||||
let size = this.renderer.getRenderTarget() ?? this.renderer.getContext().canvas ?? this.canvas;
|
||||
let aspect = size.width / size.height;
|
||||
if (cam instanceof THREE.PerspectiveCamera && cam.aspect != aspect) {
|
||||
this.camera.aspect = aspect;
|
||||
this.camera.updateProjectionMatrix();
|
||||
cam.aspect = aspect;
|
||||
cam.updateProjectionMatrix();
|
||||
}
|
||||
|
||||
this.renderer.clearColor();
|
||||
|
||||
Reference in New Issue
Block a user