asny / three-d

2D/3D renderer - makes it simple to draw stuff across platforms (including web)
MIT License
1.33k stars 110 forks source link

Move action handling to CameraAction #496

Closed thatcomputerguy0101 closed 1 week ago

thatcomputerguy0101 commented 1 month ago

This separation makes it more reasonable to respond to additional events with camera actions. This is relevant when responding to keyboard input or modifier keys on mouse input, as the default camera control handler doesn't check that information. This helps resolve the modifier dilemma in #482. (There will probably be a merge conflict between this and #482, which I can fix once either is merged.)

asny commented 1 week ago

Sorry for the late response 😬 I really like the concept of applying camera actions to the camera! That also removes most of the code from CameraControl 👍 Did a few adjustments to the API, so that applying the action didn't return a bool.