Skip to content
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

Additional Movable Commands #8

Closed
DerinGoulartUlcay opened this issue Nov 14, 2022 · 9 comments
Closed

Additional Movable Commands #8

DerinGoulartUlcay opened this issue Nov 14, 2022 · 9 comments
Labels
enhancement New feature or request

Comments

@DerinGoulartUlcay
Copy link

DerinGoulartUlcay commented Nov 14, 2022

Greetings!

First of all, thank you for developing and sharing this awesome website with the world!

I briefly attempted to contribute some features on my own but seem to lacking an understanding of how to navigate the dart file ecosystem. Would you be so kind as to either reply with a brief explanation on how to alter movable token commands or help implement the following features?

User submitted feature request #1: Movable Token Rotations

Possible implementations:
(preferred)
When token selected, make Alt+Left Mouse Click rotate the token character (originally the bottom side) towards the pointer position
or
When mouse pointer on movable token, make Ctrl or Shift + Left Mouse Drag rotate the token

User submitted feature request #2: User Movement Sequencing Similar to the Measurement Tool

Possible implementation:
When moving a token, make Right Mouse Click leave a point that becomes the new next measurement origin, the cumulative distance is displayed

Thanks again for this beautiful tool!

Best regards,
Derin

@doodlezucc doodlezucc added the enhancement New feature or request label Nov 14, 2022
@doodlezucc
Copy link
Owner

Hi there, thanks for your feature request!

Right, so token rotation is something I hadn't thought of before but which is actually a great addition to the VTT. Kudos for your proposed implementations :)
Regarding the second request, I agree distance pins really should be possible when moving tokens across the board to further consistency and overall ease of use.

I'll admit the source code may be a mess to get into right now due to a lack of inline documentation (:trollface:) - sorry about that. I'll have a look at implementing your preferred proposals for the next update and maybe work out some code comments on the way.

Cheers!

@DerinGoulartUlcay
Copy link
Author

Thank you very much for the quick reply, I appreciate your hard work!

@doodlezucc
Copy link
Owner

doodlezucc commented Dec 20, 2022

Hi, your features have been implemented and can be tested at dungeonclub.net right now :) If you've got ideas on how to improve them, let me know.

Cheers!

@DerinGoulartUlcay
Copy link
Author

DerinGoulartUlcay commented Dec 21, 2022

Hello!

Thank you for implementing the changes promptly, right on time for the holiday season :)

The distance pin implementation feels great! As for token rotation, I think it is also a fine addition. I checked it on all the grid types and I like that you have chosen a snapping rotation for the gridded maps and to pointer position for the ungridded map. I have a few questions:

  • Is there a reason why you chose the top of the token as the reference/indicator? (Given the token assets provided by 2 minute token editor are downwards facing)
  • Do you think it would be difficult to change token rotation on gridded maps so that the rotation can snap to any grid cell? (To more distant ones as well) I believe this would make the rotation more intuitive and useful while still preserving the option to snap to the directions you have implemented by choosing the nearest cells.

Thank you and happy holidays!

@doodlezucc
Copy link
Owner

doodlezucc commented Dec 22, 2022

Hi, regarding your questions:

  • I picked the top of the token because it seemed the most consistent across code and styling (0° angle = 0° visual rotation), but you're totally right - didn't consider the fact that the assets are actually facing downwards.
  • Very neat idea which luckily nowadays should be easy to implement because of the latest grid update and the shared methods of all grid types.

Fortunately, these changes are only frontend related, which means that you can expect to see them on the website later today :)

@doodlezucc
Copy link
Owner

Come to think of it, how do you think tokens that aren't snapped to the grid should be rotated?
Should the rotation still snap towards an actual center of a grid cell, or should we fallback to the way rotations are currently done (e.g. simply snapping to any 45° angle on a square grid)?

Unsnapped token inbetween to grid cells

@DerinGoulartUlcay
Copy link
Author

DerinGoulartUlcay commented Dec 22, 2022

This is a great question! I see value in both your propositions: I think being able to face a grid cell makes more sense while story telling but alligning the token with the grid would indeed be a bit circuitous (first allign position, then rotate, then position back). A few ways you could approach this would be: (with my opinion in parenthesis)

  • Implement a way to snap to both to grid cells and the angles (most exciting, however this could turn into a disorderly creative coding problem if it's not straight forward to implement)
  • Implement a modifier key to snap to angles instead (fullfills most requests but we might be running out of modifier keys)
  • Leave it as is until we collect more feedback/opinions (the circuitous solution it is, which is not that bad)
  • Fallback to angle snapping (feels bad for facing other directions/objects)
  • Implement a modifier key to make rotation not snap, a la ungridded map (doesn't actually solve the implicit problem you posed :/ ; but could be a general answer to every future problem )

@doodlezucc
Copy link
Owner

Hey, I've given your first proposed approach a try and it does feel pretty good in my opinion. The changes are visible on the website right now. What are your thoughts?

@DerinGoulartUlcay
Copy link
Author

Feels great! Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants