|
@@ -222,8 +222,8 @@ html, body {
|
|
<pre class="prettyprint showlinemods notranslate notranslate" translate="no"> function resizeRendererToDisplaySize(renderer) {
|
|
<pre class="prettyprint showlinemods notranslate notranslate" translate="no"> function resizeRendererToDisplaySize(renderer) {
|
|
const canvas = renderer.domElement;
|
|
const canvas = renderer.domElement;
|
|
const pixelRatio = window.devicePixelRatio;
|
|
const pixelRatio = window.devicePixelRatio;
|
|
- const width = Math.floor(canvas.clientWidth * pixelRatio);
|
|
|
|
- const height = Math.floor(canvas.clientHeight * pixelRatio);
|
|
|
|
|
|
+ const width = Math.floor( canvas.clientWidth * pixelRatio );
|
|
|
|
+ const height = Math.floor( canvas.clientHeight * pixelRatio );
|
|
const needResize = canvas.width !== width || canvas.height !== height;
|
|
const needResize = canvas.width !== width || canvas.height !== height;
|
|
if (needResize) {
|
|
if (needResize) {
|
|
renderer.setSize(width, height, false);
|
|
renderer.setSize(width, height, false);
|