-
Notifications
You must be signed in to change notification settings - Fork 224
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Polygon / Transform Editing Updates Enhancement and Fixes #358
Comments
Thanks for bringing this up, this is an important topic. I'll get back to this in more detail today.
|
|
Well, if you can pull this off this would be really amazing. If there is anything I can help with, let me know. Or if there is any topic you want me to dive in in more detail. |
Thanks for the support. I agree that the original dimensions would be good to display, but for now will leave that for a separate enhancement issue after this is complete. Likely along with the original width/height, for bitmaps the most useful display would be a ratio of the current pixel density, taking into account the original dimensions and the current target resolution. |
o/ Really, lets make this good. Please. Why are there only bounding boxes for Composite Items? Why, when I pull the lower left handle, the object transforms to the upper right? What do you think? |
Agreed that this is important. There are several things to consider:
This particular issue, is about making Transform tool working properly with this 2 things, and also un-commenting the "origin" point modifying functionality. resizing/repositioning/rotating transformation should be applicable to both "bound box" , and also "dimension". And for that they both need to have origin points (so we can rotate them) Does this make sense? |
Couldn't Composite and CustomSizeObject be two different things? So that CompositeItem is only a container with a Position and Scale Transform as well as an AABB (We are clear about what AABB is, right? It's the smallest possible Rectangle that snuggles around all the objects inside and that is axis aligned, so that it always has 2 sides parallel to the x and 2 sides parallel to the y axis.) Setting the scale on CompositeItem would alter the scale of all of the objects, keeping their relative positions to each other adequate. |
We can have an empty object that has size. But that does not mean we cannot also make our Composite be such an object as well. In fact we already have this kind of "components" this are dimension component and polygon component. They are the ones to mean the 2 things I described earlier. |
What is the value of having an object size be different than it's graphical/world dimensions? Is there a use case for this that I'm unaware of? Again, keeping in line with the way other professional graphic editors work, they do not have this concept. |
If you are talking about - Bounding Box for collisions and physics. It has nothing to do with graphical representation. Even in Unity, you can see them modify the box unrelated to graphical representation, so that the collision happens few pixels inside the image. If you are talking about - Dimension (not the bounding box for collisions/physics) then you are correct. I hope I explained things well. But if we are all still not fully understanding each other, maybe it's worth doing a voice group chat for this reason? Let me know. |
Thanks for taking the time to explain, it was explained clearly. Reading what you described, my first inclination is to suggest that things that exist in the world should be different classes than things that exist in the UI. On top of needing the slightly different behavior, the UI is usually in screen space, not world space. (rendered with a separate projection) How does a composite logically differ from a group (as other programs implement it)? Did you intend composite items to exist in both world and screen space? |
Agreed regarding the UI, although this part can bed one later. I do not thing composite logically differs from a group. It's exact same thing. I am not sure about the last question. composite items just exist, they are just Node groups that group items together, they exist everywhere you "put" them. They coordinates are currently in world space, but thanks to pixel per world they can be easily adjusted to anywhere. |
I wanted to file this as a separate issue for discussion, because it's touching a number of components, including the libGDX runtime.
Currently my focus is addressing the behavior of polygons, which has an overlap with Issue #351 and #165. The scope is getting larger the more I dig into the code, so decided to make a separate issue.
My thoughts are to make editing polygons more closely match the basic behavior in other vector/polygon editors such as Illustrator, Flash, Maya, etc.
Issues to fix:
Number 5 is arguably the most involved, and may result in a breaking change.
The issue comes to a head when working on point data directly, or any source data where the internal dimension may change. For example, you have a 20x20 octagon polygon at 1.0 scale. When you drag the left most point 10 pixels left, the implicit size is now 30x20. When you set the width to 40, now the vertexes must be stretched accordingly to 40x20. But, what if the scale was then set to 2.0? The actual width is now actually 80, but in the object is set to 40. What was of more value for the width, 80 or 40?
My thoughts are for non-library polygons, to remove scaleX/scaleY as values to be set. The width/height and transform tool dimensions will function to reposition the vertices.
In fact, I'll argue that even though libGDX implements scaleX/scaleY and width/height on the same element, that we should restrict their use in the entire editor. The restriction would be that for any element only scale OR size should be editable, but not both at the same time. One then becomes implicit to the other. Or even better, remove scaleX/scaleY completely as editable values, as it is what introduces the issue, no other graphic tool behaves similarly, and there is little value added for a visual editor.
Consider another example of this conundrum. When a source image size changes, what does the user want? For all instances to be resized, or for all to remain in the same position and size but with updated detail? We can't determine that, but having both scale and size in place makes little sense as the behavior will be unpredictable when the source data changes. Having one or the other as the principal means to resize elements gives the user the option to chose the behavior when source data changes.
The text was updated successfully, but these errors were encountered: