Skip to content

problem with viewport.events #59

@aram88888

Description

@aram88888

Just not working.
package.json
{
"name": "pixiscr",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo "Error: no test specified" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {
"pixi-scrollbox": "^2.3.1",
"pixi-viewport": "^5.0.2",
"pixi.js": "^7.3.2",
"webpack": "^5.89.0",
"webpack-cli": "^5.1.4"
}
}

const PIXI = require('pixi.js')
const Scrollbox = require('pixi-scrollbox').Scrollbox

// create the scrollbox
const scrollbox = new Scrollbox({ boxWidth: 200, boxHeight: 200})
// add the viewport to the stage
const app = new PIXI.Application()
document.body.appendChild(app.view)
app.stage.addChild(scrollbox);

ERRORS in console

  1. Uncaught TypeError: Cannot read properties of undefined (reading 'domElement')---- this.viewport.options.events.domElement
  2. Uncaught TypeError: Cannot read properties of undefined (reading 'update') --- this.plugins.update(t)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions