{"action":"created","issue":{"url":"https://api.github.com/repos/photonstorm/phaser3/issues/3","labels_url":"https://api.github.com/repos/photonstorm/phaser3/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/photonstorm/phaser3/issues/3/comments","events_url":"https://api.github.com/repos/photonstorm/phaser3/issues/3/events","html_url":"https://github.com/photonstorm/phaser3/issues/3","id":106291263,"number":3,"title":"Support rendering through 'camera views'","user":{"login":"pnstickne","id":1430176,"avatar_url":"https://avatars.githubusercontent.com/u/1430176?v=3","gravatar_id":"","url":"https://api.github.com/users/pnstickne","html_url":"https://github.com/pnstickne","followers_url":"https://api.github.com/users/pnstickne/followers","following_url":"https://api.github.com/users/pnstickne/following{/other_user}","gists_url":"https://api.github.com/users/pnstickne/gists{/gist_id}","starred_url":"https://api.github.com/users/pnstickne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pnstickne/subscriptions","organizations_url":"https://api.github.com/users/pnstickne/orgs","repos_url":"https://api.github.com/users/pnstickne/repos","events_url":"https://api.github.com/users/pnstickne/events{/privacy}","received_events_url":"https://api.github.com/users/pnstickne/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-09-14T08:09:31Z","updated_at":"2015-09-14T11:27:13Z","closed_at":null,"body":"Currently the same approach as in Pixi is taken where the layers themselves act as a transformation up the root, which each being 'a parent' of the contained sprites - and there is some base layer (call it a stage or rootLayer or whatnot) that serves as the 'root' of the rendering tree.\r\n\r\nIt would be nice to have a separation of that for purposes of rendering a view - ie. instead of 'rendering a layer' it would 'render a view' (which contained a layer and a transformation *but is not a parent of the layer*). This would allow for really interesting split-screen as well as mini-maps (that don't necessarily inhabit world-space), etc.\r\n\r\nThus the view(s)/camera(s) would be *separate* of the world itself.\r\n\r\n(This is different than render-to-texture, although the multicamera demo is pretty darn neat.)"},"comment":{"url":"https://api.github.com/repos/photonstorm/phaser3/issues/comments/140044570","html_url":"https://github.com/photonstorm/phaser3/issues/3#issuecomment-140044570","issue_url":"https://api.github.com/repos/photonstorm/phaser3/issues/3","id":140044570,"user":{"login":"pjbaron","id":614817,"avatar_url":"https://avatars.githubusercontent.com/u/614817?v=3","gravatar_id":"","url":"https://api.github.com/users/pjbaron","html_url":"https://github.com/pjbaron","followers_url":"https://api.github.com/users/pjbaron/followers","following_url":"https://api.github.com/users/pjbaron/following{/other_user}","gists_url":"https://api.github.com/users/pjbaron/gists{/gist_id}","starred_url":"https://api.github.com/users/pjbaron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pjbaron/subscriptions","organizations_url":"https://api.github.com/users/pjbaron/orgs","repos_url":"https://api.github.com/users/pjbaron/repos","events_url":"https://api.github.com/users/pjbaron/events{/privacy}","received_events_url":"https://api.github.com/users/pjbaron/received_events","type":"User","site_admin":false},"created_at":"2015-09-14T11:27:13Z","updated_at":"2015-09-14T11:27:13Z","body":"Split screen is fully supported with the render-to-texture version already implemented (see multi-invaders demo).\nCurrently panning is supported by translating a layer which is larger than the draw area (or render-to-texture area) as seen in the scroll demo and the sci-fly demo.\nI would also like to support panning via offsets to the immediate children of a layer which will give a very cheap (cpu) pan and be more suitable if the world is very large and has a tiling background for instance.  This is not essential because a layer is only a logical construct and doesn't exist as a texture until it is drawn, and then only the bits that fit the destination are drawn anyway... so a huge layer does not use a huge texture... but I think it will make neater code for things like the tiling backgrounds.\nI think that possibly the strongest argument in favour of this is that a \"camera\" is a really easy concept for most people to understand and visualise how it will work.  However I'm not yet seeing a compelling argument in favour of disconnecting it from the draw hierarchy and adding that extra level of complexity (slight as it might be) to the draw system.\nI believe it would be possible to simply rename a layer as 'camera', add a couple of 'camera-like' movement/zoom functions, and stay entirely within the existing hierarchy.\nDate: Mon, 14 Sep 2015 04:04:20 -0700\nFrom: notifications@github.com\nTo: phaser3@noreply.github.com\nCC: sibaroni@hotmail.com\nSubject: Re: [phaser3] Support rendering through 'camera views' (#3)\n\nFor use-cases, split screens ( http://forums.pcsx2.net/attachment.php?aid=45892 , http://cdn.themis-media.com/media/global/images/galleries/display/50/50264.jpg ) and panning in games such as https://en.wikipedia.org/wiki/Worms_(series)\n\n\n—\nReply to this email directly or view it on GitHub.\n\n\n  \n  \n\n\n \t\t \t   \t\t  "}}