chuanqisun / spacemouse-anywhere

Bring 3DConnexion SpaceMouse to more places on the web
MIT License
19 stars 3 forks source link

Question / Enhancement - rotation support in Figma prototype #2

Closed Design2Well closed 4 years ago

Design2Well commented 4 years ago

Hi Chuanqisun,

I just installed this plugin without a SpaceMouse connected as I was curious to see your Figma integration. Also looked at the code a bit (even though I have not written a Figma plugin yet).

From my understanding your plugin is listening to scroll events and mapping them to the viewport when in Figma's design view ...is this correct?

I am thinking about a variation events where trigger transitions between frames in Figma's Prototype mode.

What events are communicated from the Spacemouse? And do you think this is in the realm of feasible within a Figma plugin?

Much appreciated, Scott

chuanqisun commented 4 years ago

Hey Scott, the plugin is currently using the HTML Gamepad API to detect the movement of the knob. I have access to knob position in X, Y, Z and it Roll, Pitch, Yaw. Scroll events are not used in this case. (I was listening to it to prevent unwanted scroll)

I'm not sure the Figma API allows you to make changes in Prototype mode (this post says its "readonly"). It might be something possible in the future.