benopotamus

Code for zooming and paning in Phaser

Recommended Posts

Hello. I'm struggling with zooming in Phaser and would like someone to code that aspect for me. I can offer $20 through PayPal (I know it's not much) sent to you or your favourite open source project.

 

The features I'm looking for:

  • Zoom with mouse wheel (where the zoom zooms towards the mouse pointer)

  • Pinch zoom

  • Be able to set the zoom rate for mouse wheel and pinch zooming

  • Panning with mouse click + drag

  • Panning with touch + drag

  • Still be able to interact with game elements with a click or a touch

  • Bonus points for tweening when zooming and easing on pan

 

This demo has all the basics (no tweening or easing) but I'm not sure how it's actually working :-P https://www.iforce2d.net/rube/loaders/phaser/basic.html

 

I'd like it to be wrapped up in a nice package and MIT licensed so people in the future can use it on their Phaser projects easily.

Share this post


Link to post
Share on other sites

I have done some panning as "scrollable" group in client work that act similar to iOS list view (can pan in whatever direction needed) and zooming in my own work (programmatically). None of them involved mouse scrolling and pinch to zoom. Mouse scrolling should be easy, but pinch to zoom functionality was in my plan for guesture plugin for Phaser. I would like very much looking into this (since it's already in my plan) but since I'm pretty busy with client works, the progress might be a bit limited. I'll post some gifs of my works related to this matter as soon as I reach my computer. :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.