Maintain device pixel ratio during resize, so the render won't be blurry when the users set the scale for the whole webpage.
This commit is contained in:
parent
8b626098e9
commit
b47d6b0ce4
@ -142,6 +142,9 @@ OV.Viewer = class
|
||||
|
||||
ResizeRenderer (width, height)
|
||||
{
|
||||
if (window.devicePixelRatio) {
|
||||
this.renderer.setPixelRatio (window.devicePixelRatio);
|
||||
}
|
||||
this.camera.aspect = width / height;
|
||||
this.camera.updateProjectionMatrix ();
|
||||
this.renderer.setSize (width, height);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user