{"action":"created","issue":{"url":"https://api.github.com/repos/processing/p5.js/issues/3053","repository_url":"https://api.github.com/repos/processing/p5.js","labels_url":"https://api.github.com/repos/processing/p5.js/issues/3053/labels{/name}","comments_url":"https://api.github.com/repos/processing/p5.js/issues/3053/comments","events_url":"https://api.github.com/repos/processing/p5.js/issues/3053/events","html_url":"https://github.com/processing/p5.js/issues/3053","id":337637684,"node_id":"MDU6SXNzdWUzMzc2Mzc2ODQ=","number":3053,"title":"Only 'default' cameras resize with window","user":{"login":"AidanNelson","id":6486359,"node_id":"MDQ6VXNlcjY0ODYzNTk=","avatar_url":"https://avatars2.githubusercontent.com/u/6486359?v=4","gravatar_id":"","url":"https://api.github.com/users/AidanNelson","html_url":"https://github.com/AidanNelson","followers_url":"https://api.github.com/users/AidanNelson/followers","following_url":"https://api.github.com/users/AidanNelson/following{/other_user}","gists_url":"https://api.github.com/users/AidanNelson/gists{/gist_id}","starred_url":"https://api.github.com/users/AidanNelson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AidanNelson/subscriptions","organizations_url":"https://api.github.com/users/AidanNelson/orgs","repos_url":"https://api.github.com/users/AidanNelson/repos","events_url":"https://api.github.com/users/AidanNelson/events{/privacy}","received_events_url":"https://api.github.com/users/AidanNelson/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"AidanNelson","id":6486359,"node_id":"MDQ6VXNlcjY0ODYzNTk=","avatar_url":"https://avatars2.githubusercontent.com/u/6486359?v=4","gravatar_id":"","url":"https://api.github.com/users/AidanNelson","html_url":"https://github.com/AidanNelson","followers_url":"https://api.github.com/users/AidanNelson/followers","following_url":"https://api.github.com/users/AidanNelson/following{/other_user}","gists_url":"https://api.github.com/users/AidanNelson/gists{/gist_id}","starred_url":"https://api.github.com/users/AidanNelson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AidanNelson/subscriptions","organizations_url":"https://api.github.com/users/AidanNelson/orgs","repos_url":"https://api.github.com/users/AidanNelson/repos","events_url":"https://api.github.com/users/AidanNelson/events{/privacy}","received_events_url":"https://api.github.com/users/AidanNelson/received_events","type":"User","site_admin":false},"assignees":[{"login":"AidanNelson","id":6486359,"node_id":"MDQ6VXNlcjY0ODYzNTk=","avatar_url":"https://avatars2.githubusercontent.com/u/6486359?v=4","gravatar_id":"","url":"https://api.github.com/users/AidanNelson","html_url":"https://github.com/AidanNelson","followers_url":"https://api.github.com/users/AidanNelson/followers","following_url":"https://api.github.com/users/AidanNelson/following{/other_user}","gists_url":"https://api.github.com/users/AidanNelson/gists{/gist_id}","starred_url":"https://api.github.com/users/AidanNelson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AidanNelson/subscriptions","organizations_url":"https://api.github.com/users/AidanNelson/orgs","repos_url":"https://api.github.com/users/AidanNelson/repos","events_url":"https://api.github.com/users/AidanNelson/events{/privacy}","received_events_url":"https://api.github.com/users/AidanNelson/received_events","type":"User","site_admin":false}],"milestone":null,"comments":0,"created_at":"2018-07-02T19:37:26Z","updated_at":"2018-07-11T17:45:28Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"<!--\r\nHi there! \r\n\r\nPLEASE NOTE: The github issues are for bugs and feature requests for the p5.js library itself. If you have a general question or bug programming with p5.js please post it in the p5.js forum: https://forum.processing.org/two/.\r\n\r\nTo check any option, replace the \"[ ]\" with a \"[x]\". Be sure to check out how it looks in the Preview tab! Feel free to remove any portion of the template that is not relevant for your issue.\r\n-->\r\n\r\n#### Nature of issue?\r\n\r\n- [ ] Found a bug\r\n- [X] Existing feature enhancement\r\n- [ ] New feature request\r\n\r\n#### Most appropriate sub-area of p5.js?\r\n\r\n- [ ] Color\r\n- [ ] Core/Environment/Rendering\r\n- [ ] Data\r\n- [ ] Events\r\n- [ ] Image\r\n- [ ] IO\r\n- [ ] Math\r\n- [ ] Typography\r\n- [ ] Utilities\r\n- [X] WebGL\r\n- [ ] Other (specify if possible)\r\n\r\n#### Which platform were you using when you encountered this?\r\n\r\n- [X] Mobile/Tablet (touch devices)\r\n- [X] Desktop/Laptop\r\n- [ ] Others (specify if possible)\r\n\r\n\r\n#### Feature enhancement details:\r\n\r\nOnly a default camera will update its projection matrix in a webGL renderer's `resize` method.  This update happens according to a 'default' or 'custom' camera flag placed on the renderer.  I think default behavior should have every camera update its projection matrix (so that its aspect ratio isn't incorrect), and this could be accomplished by ...\r\n\r\n* adding a projMatrixType flag with 'perspective' and 'ortho' as possible options\r\n* resetting the camera's projection matrix according to that type ('perspective' or 'ortho') using current projection values (FOV, near/far) whether or not they are default and an updated aspect radio.\r\n\r\nMy only worry is whether this update would make it more difficult to intentionally use an 'incorrect' aspect ratio for ... some funhouse mirror type scenario? This would still be possible by manually setting the aspect ratio when calling 'perspective'\r\n\r\nThoughts?\r\n\r\ncorrect aspect ratio with custom camera:\r\n![correct aspect ratio](https://user-images.githubusercontent.com/6486359/42182842-a1af19b6-7e0d-11e8-929d-d0cce139f302.png)\r\n\r\nincorrect aspect ratio after resize:\r\n![incorrect aspect radio](https://user-images.githubusercontent.com/6486359/42182844-a3ade7c4-7e0d-11e8-9a0b-ce36cc5fb5e0.png)\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/processing/p5.js/issues/comments/404254343","html_url":"https://github.com/processing/p5.js/issues/3053#issuecomment-404254343","issue_url":"https://api.github.com/repos/processing/p5.js/issues/3053","id":404254343,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNDI1NDM0Mw==","user":{"login":"Spongman","id":1088194,"node_id":"MDQ6VXNlcjEwODgxOTQ=","avatar_url":"https://avatars2.githubusercontent.com/u/1088194?v=4","gravatar_id":"","url":"https://api.github.com/users/Spongman","html_url":"https://github.com/Spongman","followers_url":"https://api.github.com/users/Spongman/followers","following_url":"https://api.github.com/users/Spongman/following{/other_user}","gists_url":"https://api.github.com/users/Spongman/gists{/gist_id}","starred_url":"https://api.github.com/users/Spongman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Spongman/subscriptions","organizations_url":"https://api.github.com/users/Spongman/orgs","repos_url":"https://api.github.com/users/Spongman/repos","events_url":"https://api.github.com/users/Spongman/events{/privacy}","received_events_url":"https://api.github.com/users/Spongman/received_events","type":"User","site_admin":false},"created_at":"2018-07-11T17:45:28Z","updated_at":"2018-07-11T17:45:28Z","author_association":"CONTRIBUTOR","body":"is this an issue that can occur in user code? i didn't think `Renderer` methods were exposed through the API.\r\n\r\ndoes this happen if you call `resizeCanvas()`?"}}
{"actor":{"display_login":"Spongman"}}