pixi-viewport
    Preparing search index...

    Class EdgeScroll

    Scroll the viewport when the mouse is near one of the screen edges (or outside a radius from the center).

    Replaces MouseEdges: speed is in screen pixels per second, so scrolling is the same at every zoom level and frame rate.

    edge-scroll-start(Viewport) emitted when edge scrolling starts edge-scroll-end(Viewport) emitted when edge scrolling ends

    Hierarchy (View Summary)

    Index
    bottom: number | null = null
    directionX: number = 0

    Current scroll direction for each axis, between -1 and 1 (screen direction the view moves toward)

    directionY: number = 0
    left: number | null = null

    Scroll region boundaries in screen pixels (null = no scrolling on that side)

    Options used to initialize this plugin, cannot be modified later.

    parent: Viewport

    The viewport to which this plugin is attached.

    paused: boolean

    Flags whether this plugin has been "paused".

    • Plugin#pause
    • Plugin#resume
    right: number | null = null
    scrolling: boolean = false

    Whether the viewport is currently scrolling (used for start/end events)

    top: number | null = null
    • Parameters

      • velocity: { x?: number; y?: number }

      Returns void

    • Stops scrolling without handing off to decelerate, and emits edge-scroll-end if it was scrolling

      Returns void

    • Stop scrolling on both axes, handing the current velocity to the decelerate plugin

      Returns void

    • Velocity of the viewport's position in screen pixels per millisecond (the unit decelerate uses)

      Parameters

      • direction: number

      Returns number