[Phaser 3] Class ScrollingCamera V2

Hi all,
New version of ScrollingCamera with important improvements.
ScrollingCamera extends the class Phaser.Cameras.Scene2D.Camera of Phaser 3 framework, adding the capacity of vertical and horizontal scrolling by dragging or using the mouse wheel, with optional snap system.
Repository: https://github.com/jjcapellan/Phaser3-ScrollingCamera
Live demo: https://jjcapellan.github.io/Phaser3-ScrollingCamera/

Features

  • Vertical or horizontal scroll
  • Natural snap effect (Thanks Sir Newton :smile:)
  • Snap event (sends the snap position)
  • Interactive, even behind other cameras
  • Accepts dragging and mouse wheel as input (keyboard supported via setSpeed())
  • Now installable vía NPM as module
  • Source in typescript

Demo screenshot

Important

This version breaks compatibility with the previous one.
For more information, please, visit the repository.
I hope you like it.
Greetings.

2 Likes