Scrolling with the mouse wheel or by dragging

Is there a way to scroll with the mouse wheel or by dragging with the mouse?

Use the following code for this

Default script:

if(!scrollY){
    window.addEventListener('wheel', function(e){
        window.scrollY += e.deltaY;
    });
}
window.scrollY = 0;

Update script:

this.project.pan.y=scrollY/15;
this.project.zoom = 1;

Use the following code for this

Update script:

if(isMouseDown())
this.project.pan.y+=mouseMoveY;

If anything doesn’t work here let me know.

2 Likes