aframe

A-Frame. Zoom on wheel scroll


I've come through the official docs but wasn't able to locate information about how possibility of zooming in/out panorama images, is it supported in the A-Frame or maybe there is a workaround to read about implementing some of three.js on top of it?


Solution

  • You could either:

    1. Scale an <a-sphere> up or down when detecting the mouse wheel event
    2. zoom in or out the camera, like documented here

    This article might be helpful, as it covers using the mousewheel event on multiple browsers.

    I think scaling may screw up Your setup, or be a resource waste, so I'd go with 2.