We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpPrograms › Global Zoom In
Page Index Toggle Pages: 1
Global Zoom In (Read 693 times)
Global Zoom In
Mar 17th, 2010, 10:49am
 
Hi all,

I have created a 2D environment in which several sound shapes/animations exist across the whole screen. I want to create a zoom function, whereby the sketch will zoom in at the cursors location, and then follow the cursor as it is moved, allowing the user to still explore (and interact with) the world when zoomed in.

What is the best way to go about this? Scale? Translate?

Many thanks.
Re: Global Zoom In
Reply #1 - Mar 17th, 2010, 10:52am
 
camera() maybe
Re: Global Zoom In
Reply #2 - Mar 17th, 2010, 10:59am
 
Thanks for quick reply.

Doesn't camera() only work with a 3D renderer?
Re: Global Zoom In
Reply #3 - Mar 18th, 2010, 1:24am
 
Yes, a combination of scale and translate should do the trick.
Page Index Toggle Pages: 1