this.hammer = new Hammer.Manager(this.canvas); const pinch = new Hammer.Pinch(); this.hammer.add([pinch]); this.hammer.on('pinchmove', (event) => { mainCamera.zoom = (mainCamera.zoom * 0.9 + mainCamera.zoom * event.scale * 0.1); });