set pixel ratio to DPR

This commit is contained in:
Haowei Wen 2020-08-23 19:58:48 +08:00
parent 7a82f90967
commit d13eec6035
No known key found for this signature in database
GPG Key ID: 5BC167F73EA558E4
1 changed files with 1 additions and 0 deletions

View File

@ -62,6 +62,7 @@ class SkinViewer {
this.camera.position.z = 60;
this.renderer = new WebGLRenderer({ alpha: true, preserveDrawingBuffer: true });
this.renderer.setPixelRatio(window.devicePixelRatio);
this.domElement.appendChild(this.renderer.domElement);
this.playerObject = new PlayerObject(this.skinTexture, this.capeTexture);