|
|
@@ -239,8 +239,8 @@ HD-DPI - дисплеи с высокой плотностью точек на
|
|
|
function resizeRendererToDisplaySize(renderer) {
|
|
|
const canvas = renderer.domElement;
|
|
|
const pixelRatio = window.devicePixelRatio;
|
|
|
- const width = canvas.clientWidth * pixelRatio;
|
|
|
- const height = canvas.clientHeight * pixelRatio;
|
|
|
+ const width = canvas.clientWidth * pixelRatio | 0;
|
|
|
+ const height = canvas.clientHeight * pixelRatio | 0;
|
|
|
const needResize = canvas.width !== width || canvas.height !== height;
|
|
|
if (needResize) {
|
|
|
renderer.setSize(width, height, false);
|