{"action":"created","issue":{"url":"https://api.github.com/repos/borismus/webvr-boilerplate/issues/104","labels_url":"https://api.github.com/repos/borismus/webvr-boilerplate/issues/104/labels{/name}","comments_url":"https://api.github.com/repos/borismus/webvr-boilerplate/issues/104/comments","events_url":"https://api.github.com/repos/borismus/webvr-boilerplate/issues/104/events","html_url":"https://github.com/borismus/webvr-boilerplate/issues/104","id":127024910,"number":104,"title":"Canvas resized on every frame on Nexus 6","user":{"login":"brianchirls","id":492291,"avatar_url":"https://avatars.githubusercontent.com/u/492291?v=3","gravatar_id":"","url":"https://api.github.com/users/brianchirls","html_url":"https://github.com/brianchirls","followers_url":"https://api.github.com/users/brianchirls/followers","following_url":"https://api.github.com/users/brianchirls/following{/other_user}","gists_url":"https://api.github.com/users/brianchirls/gists{/gist_id}","starred_url":"https://api.github.com/users/brianchirls/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brianchirls/subscriptions","organizations_url":"https://api.github.com/users/brianchirls/orgs","repos_url":"https://api.github.com/users/brianchirls/repos","events_url":"https://api.github.com/users/brianchirls/events{/privacy}","received_events_url":"https://api.github.com/users/brianchirls/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-01-16T13:30:11Z","updated_at":"2016-01-20T13:05:42Z","closed_at":null,"body":"The following code in `resizeIfNeeded_` checks the size of the canvas against the desired value and resizes if they don't match:\r\n\r\n```javascript\r\n  var size = this.renderer.getSize();\r\n  if (size.width != window.innerWidth || size.height != window.innerHeight) {\r\n  // ...\r\n```\r\n\r\nOn the Nexus 6, for some reason, the `devicePixelRatio` is 3.5, which due to floating point shenanigans, causes three.js to report a height value of `386.85714285714283`. This never matches `window.innerHeight`, so a new render target is allocated, initialized (and garbage collected) on every single frame.\r\n\r\nThe height and width should be rounded when they're compared to the window dimensions, so this doesn't happen. This should probably be adjusted in `VREffect` as well. I'll post an issue there when I have a moment."},"comment":{"url":"https://api.github.com/repos/borismus/webvr-boilerplate/issues/comments/173197636","html_url":"https://github.com/borismus/webvr-boilerplate/issues/104#issuecomment-173197636","issue_url":"https://api.github.com/repos/borismus/webvr-boilerplate/issues/104","id":173197636,"user":{"login":"brianchirls","id":492291,"avatar_url":"https://avatars.githubusercontent.com/u/492291?v=3","gravatar_id":"","url":"https://api.github.com/users/brianchirls","html_url":"https://github.com/brianchirls","followers_url":"https://api.github.com/users/brianchirls/followers","following_url":"https://api.github.com/users/brianchirls/following{/other_user}","gists_url":"https://api.github.com/users/brianchirls/gists{/gist_id}","starred_url":"https://api.github.com/users/brianchirls/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brianchirls/subscriptions","organizations_url":"https://api.github.com/users/brianchirls/orgs","repos_url":"https://api.github.com/users/brianchirls/repos","events_url":"https://api.github.com/users/brianchirls/events{/privacy}","received_events_url":"https://api.github.com/users/brianchirls/received_events","type":"User","site_admin":false},"created_at":"2016-01-20T13:05:42Z","updated_at":"2016-01-20T13:05:42Z","body":"@borismus I'm happy to put one together - it's just a single line of code. But, since you don't have a CONTRIBUTING.md... should pull requests update the build as well?"}}