Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

problem with viewport.events #59

Open
aram88888 opened this issue Dec 29, 2023 · 1 comment · May be fixed by #61
Open

problem with viewport.events #59

aram88888 opened this issue Dec 29, 2023 · 1 comment · May be fixed by #61

Comments

@aram88888
Copy link

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)
@hanaogu
Copy link

hanaogu commented Feb 20, 2024

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants