Переглянути джерело

Merge pull request #4 from jherrm/master

Enable High DPI display support.
deltakosh 12 роки тому
батько
коміт
c23d3cef55
1 змінених файлів з 1 додано та 1 видалено
  1. 1 1
      Babylon/babylon.engine.js

+ 1 - 1
Babylon/babylon.engine.js

@@ -27,7 +27,7 @@
         this._workingContext = this._workingCanvas.getContext("2d");
 
         // Viewport
-        this._hardwareScalingLevel = 1.0;
+        this._hardwareScalingLevel = 1.0 / window.devicePixelRatio || 1.0;
         this.resize();
 
         // Caps