>>>> - Make use of the arrow key events for rotation of the scene >>>> (pitch and yaw) >>> >>> You need to call define-gestures with an alist mapping keyboard >>> gestures to quotations with effect ( gadget -- ). Grep around for >>> define-gestures, you'll find plenty of examples. >>> >>> Slava >> >> But that doesn't seem to be how it's done in spheres.factor (or in >> demo-support.factor). There's no mention of define-gestures there, >> and yet >> the arrow keys work! How? > > The keyboard and mouse interaction in spheres is factored into the > opengl.demo-support vocabulary, which defines a demo-gadget tuple > class that the spheres gadget inherits from. The bunny demo also > inherits from opengl.demo-support. > > -Joe
Hi Joe, I think I understand what you're saying, but in my pyramids.factor I've copied a whole lot of code from your spheres, incl. the use of the demo-gadget. However, I must have missed something that's needed for the arrow keys to work. If you haven't allready looked at my code, I'd be very thankful if you had time to take look. It's right here in the zip: <https://vortex.uio.no/brukere/jkleiser/factor/> Thanks, /Jon ------------------------------------------------------------------------------ _______________________________________________ Factor-talk mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/factor-talk
