{"action":"created","issue":{"url":"https://api.github.com/repos/phrack/ShootOFF/issues/472","repository_url":"https://api.github.com/repos/phrack/ShootOFF","labels_url":"https://api.github.com/repos/phrack/ShootOFF/issues/472/labels{/name}","comments_url":"https://api.github.com/repos/phrack/ShootOFF/issues/472/comments","events_url":"https://api.github.com/repos/phrack/ShootOFF/issues/472/events","html_url":"https://github.com/phrack/ShootOFF/issues/472","id":164682171,"number":472,"title":"Translate clicks in the feed window into clicks on the projector arena when autocalibrated","user":{"login":"cbdmaul","id":5543934,"avatar_url":"https://avatars.githubusercontent.com/u/5543934?v=3","gravatar_id":"","url":"https://api.github.com/users/cbdmaul","html_url":"https://github.com/cbdmaul","followers_url":"https://api.github.com/users/cbdmaul/followers","following_url":"https://api.github.com/users/cbdmaul/following{/other_user}","gists_url":"https://api.github.com/users/cbdmaul/gists{/gist_id}","starred_url":"https://api.github.com/users/cbdmaul/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cbdmaul/subscriptions","organizations_url":"https://api.github.com/users/cbdmaul/orgs","repos_url":"https://api.github.com/users/cbdmaul/repos","events_url":"https://api.github.com/users/cbdmaul/events{/privacy}","received_events_url":"https://api.github.com/users/cbdmaul/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/phrack/ShootOFF/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":{"login":"cbdmaul","id":5543934,"avatar_url":"https://avatars.githubusercontent.com/u/5543934?v=3","gravatar_id":"","url":"https://api.github.com/users/cbdmaul","html_url":"https://github.com/cbdmaul","followers_url":"https://api.github.com/users/cbdmaul/followers","following_url":"https://api.github.com/users/cbdmaul/following{/other_user}","gists_url":"https://api.github.com/users/cbdmaul/gists{/gist_id}","starred_url":"https://api.github.com/users/cbdmaul/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cbdmaul/subscriptions","organizations_url":"https://api.github.com/users/cbdmaul/orgs","repos_url":"https://api.github.com/users/cbdmaul/repos","events_url":"https://api.github.com/users/cbdmaul/events{/privacy}","received_events_url":"https://api.github.com/users/cbdmaul/received_events","type":"User","site_admin":false},"assignees":[{"login":"cbdmaul","id":5543934,"avatar_url":"https://avatars.githubusercontent.com/u/5543934?v=3","gravatar_id":"","url":"https://api.github.com/users/cbdmaul","html_url":"https://github.com/cbdmaul","followers_url":"https://api.github.com/users/cbdmaul/followers","following_url":"https://api.github.com/users/cbdmaul/following{/other_user}","gists_url":"https://api.github.com/users/cbdmaul/gists{/gist_id}","starred_url":"https://api.github.com/users/cbdmaul/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cbdmaul/subscriptions","organizations_url":"https://api.github.com/users/cbdmaul/orgs","repos_url":"https://api.github.com/users/cbdmaul/repos","events_url":"https://api.github.com/users/cbdmaul/events{/privacy}","received_events_url":"https://api.github.com/users/cbdmaul/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/phrack/ShootOFF/milestones/11","html_url":"https://github.com/phrack/ShootOFF/milestones/3.8%20Plugin%20Discovery%20and%20Technical%20Debt","labels_url":"https://api.github.com/repos/phrack/ShootOFF/milestones/11/labels","id":1544262,"number":11,"title":"3.8 Plugin Discovery and Technical Debt","description":"Make modular plugins easier for regular users to discover and install. Pay off architectural debt that has been accruing and is getting at risk of making porting to other platforms intractable.","creator":{"login":"phrack","id":174818,"avatar_url":"https://avatars.githubusercontent.com/u/174818?v=3","gravatar_id":"","url":"https://api.github.com/users/phrack","html_url":"https://github.com/phrack","followers_url":"https://api.github.com/users/phrack/followers","following_url":"https://api.github.com/users/phrack/following{/other_user}","gists_url":"https://api.github.com/users/phrack/gists{/gist_id}","starred_url":"https://api.github.com/users/phrack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phrack/subscriptions","organizations_url":"https://api.github.com/users/phrack/orgs","repos_url":"https://api.github.com/users/phrack/repos","events_url":"https://api.github.com/users/phrack/events{/privacy}","received_events_url":"https://api.github.com/users/phrack/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":82,"state":"open","created_at":"2016-01-26T15:14:46Z","updated_at":"2016-08-16T21:58:28Z","due_on":null,"closed_at":null},"comments":8,"created_at":"2016-07-09T19:37:10Z","updated_at":"2016-08-17T12:01:43Z","closed_at":null,"body":"1. Autocalibration required for very good alignment (otherwise, would be much too confusing to users, I would rather it didn't work at all than have unexpected behavior)\r\n\r\n2. Check the autocalibrated bounds area of the camera feed when there are feed clicks\r\n\r\n3. If the click was not on a shot marker, pass them to the arena (In the autocalibated bounds)\r\n\r\n4. The arena will have to translate them to the size of the projector resolution\r\n\r\n5. Handle them like a normal click in the arena\r\n\r\nIt will likely require disabling shot detection when any target is selected or moved, so a warning to the user may be necessary.\r\n\r\nI'll work on this issue today if my other duties go smoothly.  I want it bad enough."},"comment":{"url":"https://api.github.com/repos/phrack/ShootOFF/issues/comments/240391099","html_url":"https://github.com/phrack/ShootOFF/issues/472#issuecomment-240391099","issue_url":"https://api.github.com/repos/phrack/ShootOFF/issues/472","id":240391099,"user":{"login":"phrack","id":174818,"avatar_url":"https://avatars.githubusercontent.com/u/174818?v=3","gravatar_id":"","url":"https://api.github.com/users/phrack","html_url":"https://github.com/phrack","followers_url":"https://api.github.com/users/phrack/followers","following_url":"https://api.github.com/users/phrack/following{/other_user}","gists_url":"https://api.github.com/users/phrack/gists{/gist_id}","starred_url":"https://api.github.com/users/phrack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phrack/subscriptions","organizations_url":"https://api.github.com/users/phrack/orgs","repos_url":"https://api.github.com/users/phrack/repos","events_url":"https://api.github.com/users/phrack/events{/privacy}","received_events_url":"https://api.github.com/users/phrack/received_events","type":"User","site_admin":false},"created_at":"2016-08-17T12:01:43Z","updated_at":"2016-08-17T12:01:43Z","body":"If there are actually enough examples that are really our case and not just loosely kinda our case for the current working solution (except pass through) to be eccentric, I'll be pleasantly surprised. I'll be ecstatic if there is a simplification that genuinely simplifies the feature set. Here is the example I started from, it was basically all that was out there at the time this code was first written that was even close: http://andrewtill.blogspot.com/2012/12/dragging-to-resize-javafx-region.html. \r\n\r\nRequirements:\r\n\r\n- All regions in a target must stay the same size relative to each other when the target is resized.\r\n- All regions in a target must stay the same position relative to each other when they target is resized.\r\n- All regions in a target must stay the same size and position relative to each other when animated (except for those changes expected due to the animation). \r\n- All parts of a region that a user can see that would be shootable in a real target must be shootable in the virtual target.\r\n\r\nAll of the examples last time I looked were part of just one of these. They all resized or moved one thing at a time and indepently of every other node. They all also demonstrated themselves on a [Shape](https://docs.oracle.com/javase/8/javafx/api/javafx/scene/shape/Shape.html) or some other JavaFX specialization of a Node that comes with primitives to make resizing and moving much easier than what you get from [Node](https://docs.oracle.com/javase/8/javafx/api/javafx/scene/Node.html). We have two complications:\r\n\r\n- We have to not only resize one thing, but many things all at the same time. The only targets we have that are just one region are the silhouettes, one of the poppers, and the reset target. Only the reset target uses a Shape. The regions must stay the same size relative to each other or the target breaks. Their origins won't move if you resize each individually without a position adjustment so the target will also break if that isn't handled. The position adjustment is hard to get right if you do decide to resize individually. One of the JavaFX's transformation classes has a hint at the formula, but I haven't found it again this morning. I found it's best to just do it at the group level so JavaFX will deal with it.\r\n- We have Shapes and [ImageViews](https://docs.oracle.com/javase/8/javafx/api/javafx/scene/image/ImageView.html) in many of our targets. The only common type for these is Node, which does not have specialized convenience methods.\r\n\r\nHaving established that, here are complications I found:\r\n\r\n- All Nodes reset the coordinate system internally.\r\n- All Nodes provide three different views of their coordinate system, only the local one and the parent one are useful I think.\r\n- All Nodes can have transformations applied to them. These transformations are affected by any transformations applied to their parents, so that has to be accounted for.\r\n- It's easy to resize a region visually and not realize it was not \"physically\" resized. What I mean by that is the target will look the right size but the exposed views of the coordinates are not transformed so unless you transform them yourself to detect a hit or physically resize the target, you will miss actual hits.\r\n\r\nRegarding the x and y fields. Those were used for moving and resizing with the mouse because I started from the example I linked to which uses them. In fixing resizing a few versions ago I got rid of them for resizing, but not for moving (I haven't touched the moving code since the first version because it always worked). They can probably be removed for moving too."}}
{"actor":{"display_login":"phrack"}}