{"action":"created","issue":{"url":"https://api.github.com/repos/mrdoob/three.js/issues/9500","repository_url":"https://api.github.com/repos/mrdoob/three.js","labels_url":"https://api.github.com/repos/mrdoob/three.js/issues/9500/labels{/name}","comments_url":"https://api.github.com/repos/mrdoob/three.js/issues/9500/comments","events_url":"https://api.github.com/repos/mrdoob/three.js/issues/9500/events","html_url":"https://github.com/mrdoob/three.js/issues/9500","id":170830879,"number":9500,"title":"setPixelRatio scales the viewport on iPad","user":{"login":"GianlucaGuarini","id":879612,"avatar_url":"https://avatars.githubusercontent.com/u/879612?v=3","gravatar_id":"","url":"https://api.github.com/users/GianlucaGuarini","html_url":"https://github.com/GianlucaGuarini","followers_url":"https://api.github.com/users/GianlucaGuarini/followers","following_url":"https://api.github.com/users/GianlucaGuarini/following{/other_user}","gists_url":"https://api.github.com/users/GianlucaGuarini/gists{/gist_id}","starred_url":"https://api.github.com/users/GianlucaGuarini/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GianlucaGuarini/subscriptions","organizations_url":"https://api.github.com/users/GianlucaGuarini/orgs","repos_url":"https://api.github.com/users/GianlucaGuarini/repos","events_url":"https://api.github.com/users/GianlucaGuarini/events{/privacy}","received_events_url":"https://api.github.com/users/GianlucaGuarini/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-08-12T09:17:48Z","updated_at":"2016-08-16T13:30:08Z","closed_at":null,"body":"##### Description of the problem \r\nIn my app I change the frameratio in runtime in order to avoid slow performances on slow devices. My code looks like this:\r\n```js\r\nif (this.fps.frame % this.fps.framerate === 0) {\r\n   // set the framerate in runtime each second\r\n   this.renderer.setPixelRatio(\r\n      (window.devicePixelRatio || 1) * Math.max(this.fps.framerate / 60, 0.2)\r\n   );\r\n}\r\n```\r\n\r\nThis code works beautifully on all browsers on desktop however on iPads the viewport gets somehow scaled even if the canvas stays of the same size. Side note: this problem does not appear using the CanvasRenderer.\r\n\r\n##### Three.js version\r\n- [x] r74 up to r79\r\n\r\n##### Browser\r\n\r\n- [x] Safari\r\n- [x] FIrefox\r\n\r\n##### OS\r\n\r\n- [x] iPad (iOS 9.3)\r\n\r\n##### Screenshot\r\nThe console logs the pixelRatio calculated\r\n![acvebn4p7n](https://cloud.githubusercontent.com/assets/879612/17618387/c8678eec-607f-11e6-8000-9932269101b5.gif)\r\n\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/mrdoob/three.js/issues/comments/240101603","html_url":"https://github.com/mrdoob/three.js/issues/9500#issuecomment-240101603","issue_url":"https://api.github.com/repos/mrdoob/three.js/issues/9500","id":240101603,"user":{"login":"GianlucaGuarini","id":879612,"avatar_url":"https://avatars.githubusercontent.com/u/879612?v=3","gravatar_id":"","url":"https://api.github.com/users/GianlucaGuarini","html_url":"https://github.com/GianlucaGuarini","followers_url":"https://api.github.com/users/GianlucaGuarini/followers","following_url":"https://api.github.com/users/GianlucaGuarini/following{/other_user}","gists_url":"https://api.github.com/users/GianlucaGuarini/gists{/gist_id}","starred_url":"https://api.github.com/users/GianlucaGuarini/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GianlucaGuarini/subscriptions","organizations_url":"https://api.github.com/users/GianlucaGuarini/orgs","repos_url":"https://api.github.com/users/GianlucaGuarini/repos","events_url":"https://api.github.com/users/GianlucaGuarini/events{/privacy}","received_events_url":"https://api.github.com/users/GianlucaGuarini/received_events","type":"User","site_admin":false},"created_at":"2016-08-16T13:30:08Z","updated_at":"2016-08-16T13:30:08Z","body":"@mrdoob should I make a pull request to solve this issue or do you know already where could be the problem? I have spent ~2 hours on it and I could not figure out what's wrong."}}
{"actor":{"display_login":"GianlucaGuarini"}}