-
Notifications
You must be signed in to change notification settings - Fork 6
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
Add default grab/release sounds to MeasuringTapeNode. #846
Comments
Suggested improvement to options below. There is 1 usage of - keyboardDragListenerOptions?: {
- baseDragSpeed?: number;
- baseShiftDragSpeed?: number;
- tipDragSpeed?: number;
- tipShiftDragSpeed?: number;
- };
+ baseDragListenerOptions?: RichDragListenerOptions;
+ tipDragListenerOptions?: RichDragListenerOptions;
+ baseKeyboardDragListenerOptions?: RichKeyboardDragListenerOptions;
+ tipKeyboardDragListenerOptions?: RichKeyboardDragListenerOptions; |
Work completed in the above commits. @samreid would you mind taking a look? Reminder that this impacts phetsims/projectile-data-lab#270. |
This worked well in my testing. In the code review I observed these options: baseKeyboardDragListenerOptions: {
dragSpeed: KEYBOARD_DRAG_SPEED,
shiftDragSpeed: KEYBOARD_DRAG_SPEED / 2
},
tipKeyboardDragListenerOptions: {
dragSpeed: KEYBOARD_DRAG_SPEED,
shiftDragSpeed: 150
} Should both |
These are the values that were in the code, I did not change them. I don't know the motivation for having a different default |
I'll self-unassign until we hear from @AgustinVallejo |
If I recall correctly, we lowered the default tip drag speed from I could see reasons not to increase the tip's shiftDragSpeed, but decreasing the base's shiftDragSpeed seems a correct approach. |
I don't have a sim that is using MeasuringTapeNode, and I took this issue on as a courtesy when reviewing PDL, which has a MeasuringTapeNode. My task here was to add the grab/release sounds, not decide on whether/how to change the drag speeds, and I don't have time to get involved in that aspect. I think it would be more appropriate to sort this out for PDL, so assigning back to @samreid. |
Spoke with @samreid on Slack. He said:
Above commit addresses this. |
I'll also note that this issue is about sounds, which are independent of drag speeds. So changing shiftDragSpeed feels like it should be in a new issue. |
It looks like everything here is completed. Nice work @pixelzoom and @AgustinVallejo. Closing. |
Shouldn't grab/release sounds be included for MeasuringTapeNode in the new PDL sim? See phetsims/projectile-data-lab#270.
Adding support involves a quick conversion to RichDragListener and RichKeyboardDragListener. Patch included below.
Adding options to be propagated to the 4 listeners would be a bit more work, especially given the odd definition of MeasuringTapeNodeOptions.keyboardDragListenerOptions.
MeasuringTapeNode patch
The text was updated successfully, but these errors were encountered: