Class: Scrollview

Scrollview

Class that represents a PixiJS Scrollview.

new Scrollview ()

Creates an instance of a Scrollview.

See:
Example
// Create the app
const app = new PIXIApp({
    view: canvas,
    width: 900,
    height: 250
}).setup().run()

// Create the Scrollview
app.loader
    .add('elephant', './assets/elephant-1.jpg')
    .load((loader, resources) => {
        const sprite = new PIXI.Sprite(resources.elephant.texture)
        const scrollview = new Scrollview({boxWidth: 400, boxHeight: 180})
        scrollview.content.addChild(sprite)
        app.scene.addChild(scrollview)

Extends

  • PIXI.extras.Scrollbox

Methods

Should be called to refresh the layout of the Scrollview. Can be used after resizing.

Returns:
Type Description
Scrollview A reference to the Scrollview for chaining.