Jump to content

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.

Link to comment
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. :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...